KiCad PCB EDA Suite
EDA_3D_VIEWER Class Reference

Class EDA_3D_VIEWER Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard. More...

#include <eda_3d_viewer.h>

Inheritance diagram for EDA_3D_VIEWER:
KIWAY_PLAYER EDA_BASE_FRAME KIWAY_HOLDER

Public Member Functions

 EDA_3D_VIEWER (KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxString &aTitle, long style=KICAD_DEFAULT_3D_DRAWFRAME_STYLE)
 
 ~EDA_3D_VIEWER ()
 
PCB_BASE_FRAMEParent () const
 
BOARDGetBoard ()
 
void ReloadRequest ()
 
void NewDisplay (int dummy=0)
 
void SetDefaultFileName (const wxString &aFn)
 Function SetDefaultFileName Set the default file name (eg: to be suggested to a screenshot) More...
 
const wxString & GetDefaultFileName () const
 Function GetDefaultFileName. More...
 
CINFO3D_VISUGetSettings ()
 Function GetSettings. More...
 
bool Set3DColorFromUser (SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
 Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog. More...
 
bool Set3DSolderMaskColorFromUser ()
 Function Set3DSolderMaskColorFromUser Set the solder mask color from a set of colors. More...
 
bool Set3DSolderPasteColorFromUser ()
 Function Set3DSolderPasteColorFromUser Set the solder mask color from a set of colors. More...
 
bool Set3DCopperColorFromUser ()
 Function Set3DCopperColorFromUser Set the copper color from a set of colors. More...
 
bool Set3DBoardBodyColorFromUser ()
 Function Set3DBoardBodyBodyColorFromUser Set the copper color from a set of colors. More...
 
bool Set3DSilkScreenColorFromUser ()
 Function Set3DSilkScreenColorFromUser Set the silkscreen color from a set of colors. More...
 
VTBL_ENTRY bool OpenProjectFiles (const std::vector< wxString > &aFileList, int aCtl=0)
 Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList. More...
 
VTBL_ENTRY bool ShowModal (wxString *aResult=NULL, wxWindow *aResultantFocusWindow=NULL)
 Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal(). More...
 
virtual void KiwayMailIn (KIWAY_EXPRESS &aEvent)
 Function KiwayMailIn receives KIWAY_EXPRESS messages from other players. More...
 
bool Destroy () override
 Our version of Destroy() which is virtual from wxWidgets. More...
 
bool ProcessEvent (wxEvent &aEvent) override
 Function ProcessEvent overrides the default process event handler to implement the auto save feature. More...
 
bool Enable (bool enable) override
 
void SetAutoSaveInterval (int aInterval)
 
int GetAutoSaveInterval () const
 
bool IsType (FRAME_T aType) const
 
void GetKicadHelp (wxCommandEvent &event)
 
void GetKicadContribute (wxCommandEvent &event)
 
void GetKicadAbout (wxCommandEvent &event)
 
void PrintMsg (const wxString &text)
 
wxString ConfigBaseName ()
 Function ConfigBaseName. More...
 
virtual void SaveProjectSettings (bool aAskForSave)
 Function SaveProjectSettings saves changes to the project settings to the project (.pro) file. More...
 
virtual void OnSelectPreferredEditor (wxCommandEvent &event)
 Function OnSelectPreferredEditor Open a dialog to select the editor that will used in KiCad to edit or display files (reports ... More...
 
int ReadHotkeyConfig (struct EDA_HOTKEY_CONFIG *aDescList)
 Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys. More...
 
virtual int WriteHotkeyConfig (struct EDA_HOTKEY_CONFIG *aDescList, wxString *aFullFileName=NULL)
 Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mechanism or a file. More...
 
int ReadHotkeyConfigFile (const wxString &aFilename, struct EDA_HOTKEY_CONFIG *aDescList)
 Function ReadHotkeyConfigFile Read an old configuration file (&ltfile&gt.key) and fill the current hotkey list with hotkeys. More...
 
void ImportHotkeyConfigFromFile (EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
 Function ImportHotkeyConfigFromFile Prompt the user for an old hotkey file to read, and read it. More...
 
void ExportHotkeyConfigToFile (EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
 Function ExportHotkeyConfigToFile Prompt the user for an old hotkey file to read, and read it. More...
 
wxString GetFileFromHistory (int cmdId, const wxString &type, wxFileHistory *aFileHistory=NULL)
 Function GetFileFromHistory fetches the file name from the file history list. More...
 
void UpdateFileHistory (const wxString &FullFileName, wxFileHistory *aFileHistory=NULL)
 Function UpdateFileHistory Updates the list of recently opened files. More...
 
void SetMruPath (const wxString &aPath)
 
wxString GetMruPath () const
 
virtual void ReCreateMenuBar ()
 Function ReCreateMenuBar Creates recreates the menu bar. More...
 
bool IsWritable (const wxFileName &aFileName)
 Function IsWritable checks if aFileName can be written. More...
 
void CheckForAutoSaveFile (const wxFileName &aFileName, const wxString &aBackupFileExtension)
 Function CheckForAutoSaveFile checks if an auto save file exists for aFileName and takes the appropriate action depending on the user input. More...
 
virtual void ShowChangedLanguage ()
 Function ShowChangedLanguage redraws the menus and what not in current language. More...
 
virtual void ShowChangedIcons ()
 Function ShowChangedIcons redraws items menus after a icon was changed option. More...
 
void AddMenuIconsOptions (wxMenu *MasterMenu)
 Function AddMenuIconsOptions creates a menu list for icons in menu and icon sizes choice, and add it as submenu to MasterMenu. More...
 
bool PostCommandMenuEvent (int evt_type)
 Function PostCommandMenuEvent. More...
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Protected Member Functions

bool IsModal ()
 
void SetModal (bool aIsModal)
 
bool IsDismissed ()
 Function IsDismissed returns false only if both the frame is acting in modal mode and it has not been dismissed yet with DismissModal(). More...
 
void DismissModal (bool aRetVal, const wxString &aResult=wxEmptyString)
 
void kiway_express (KIWAY_EXPRESS &aEvent)
 event handler, routes to derivative specific virtual KiwayMailIn() More...
 
void language_change (wxCommandEvent &event)
 Function language_change is an event handler called on a language menu selection. More...
 
void OnChangeIconsOptions (wxCommandEvent &event) override
 Function OnChangeIconsOptions is an event handler called on a icons options in menus or toolbars menu selection. More...
 
void onAutoSaveTimer (wxTimerEvent &aEvent)
 Function onAutoSaveTimer handles the auto save timer event. More...
 
virtual bool isAutoSaveRequired () const
 Function autoSaveRequired returns the auto save status of the application. More...
 
virtual bool doAutoSave ()
 Function doAutoSave should be overridden by the derived class to handle the auto save feature. More...
 
virtual wxConfigBase * config ()
 Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME. More...
 
virtual const SEARCH_STACKsys_search ()
 Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_MANAGER_FRAME. More...
 
virtual wxString help_name ()
 

Protected Attributes

bool m_modal
 
WX_EVENT_LOOPm_modal_loop
 
wxWindow * m_modal_resultant_parent
 
wxString m_modal_string
 
bool m_modal_ret_val
 
FRAME_T m_Ident
 Id Type (pcb, schematic, library..) More...
 
wxPoint m_FramePos
 
wxSize m_FrameSize
 
wxString m_configFrameName
 prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTOR is used More...
 
wxAuiToolBar * m_mainToolBar
 Standard horizontal Toolbar. More...
 
wxString m_AboutTitle
 Name of program displayed in About. More...
 
wxAuiManager m_auimgr
 
bool m_hasAutoSave
 Flag to indicate if this frame supports auto save. More...
 
bool m_autoSaveState
 Flag to indicate the last auto save state. More...
 
int m_autoSaveInterval
 The auto save interval time in seconds. More...
 
wxTimer * m_autoSaveTimer
 The timer used to implement the auto save feature;. More...
 
wxString m_perspective
 wxAuiManager perspective. More...
 
wxString m_mruPath
 Most recently used path. More...
 

Private Member Functions

void Exit3DFrame (wxCommandEvent &event)
 Exit3DFrame - Called when user press the File->Exit. More...
 
void OnCloseWindow (wxCloseEvent &event)
 
void Process_Special_Functions (wxCommandEvent &event)
 
void On3DGridSelection (wxCommandEvent &event)
 
void OnRenderEngineSelection (wxCommandEvent &event)
 
void OnUpdateMenus (wxUpdateUIEvent &event)
 
void ProcessZoom (wxCommandEvent &event)
 
void OnActivate (wxActivateEvent &event)
 
void OnSetFocus (wxFocusEvent &event)
 
void Install3DViewOptionDialog (wxCommandEvent &event)
 
void CreateMenuBar ()
 
void DisplayHotKeys ()
 
void SetMenuBarOptionsState ()
 Set the state of toggle menus according to the current display options. More...
 
void ReCreateMainToolbar ()
 
void SetToolbars ()
 
void SaveSettings (wxConfigBase *aCfg) override
 Function SaveSettings saves common frame parameters to a configuration data file. More...
 
void LoadSettings (wxConfigBase *aCfg) override
 Function LoadSettings loads common frame parameters from a configuration file. More...
 
void OnLeftClick (wxDC *DC, const wxPoint &MousePos)
 
void OnRightClick (const wxPoint &MousePos, wxMenu *PopMenu)
 
void RedrawActiveWindow (wxDC *DC, bool EraseBg)
 
void takeScreenshot (wxCommandEvent &event)
 Function TakeScreenshot Create a Screenshot of the current 3D view. More...
 
void RenderEngineChanged ()
 RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged. More...
 
 DECLARE_EVENT_TABLE ()
 

Private Attributes

wxString m_defaultFileName
 Filename to propose for save a screenshot. More...
 
EDA_3D_CANVASm_canvas
 The canvas where the openGL context will be rendered. More...
 
CINFO3D_VISU m_settings
 Store all the settings and options to be used by the renders. More...
 

Static Private Attributes

static const wxChar * m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" )
 Trace mask used to enable or disable the trace output of this class. More...
 

Detailed Description

Class EDA_3D_VIEWER Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.

Definition at line 50 of file eda_3d_viewer.h.

Constructor & Destructor Documentation

EDA_3D_VIEWER::Process_Special_Functions EDA_3D_VIEWER::On3DGridSelection EDA_3D_VIEWER::OnUpdateMenus EDA_3D_VIEWER::EDA_3D_VIEWER ( KIWAY aKiway,
PCB_BASE_FRAME aParent,
const wxString &  aTitle,
long  style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE 
)

Definition at line 148 of file eda_3d_viewer.cpp.

References DIM, COGL_ATT_LIST::GetAttributesList(), EDA_PANEINFO::HorizontalToolbarPane(), ID_RENDER_CURRENT_VIEW, KiBitmap(), Prj(), RENDER_ENGINE_OPENGL_LEGACY, and EDA_3D_CANVAS::SetStatusBar().

151  :
152 
153  KIWAY_PLAYER( aKiway,
154  aParent,
156  aTitle,
157  wxDefaultPosition,
158  wxDefaultSize,
159  style,
161 {
162  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::EDA_3D_VIEWER %s" ), aTitle );
163 
164  m_canvas = NULL;
165  m_defaultFileName = "";
166 
167  // Give it an icon
168  wxIcon icon;
169  icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
170  SetIcon( icon );
171 
172  LoadSettings( config() );
173  SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
174 
175  // Create the status line
176  static const int status_dims[4] = { -1, 130, 130, 170 };
177 
178  wxStatusBar *status_bar = CreateStatusBar( DIM( status_dims ) );
179  SetStatusWidths( DIM( status_dims ), status_dims );
180 
181  CreateMenuBar();
183 
184  m_canvas = new EDA_3D_CANVAS( this,
186  aParent->GetBoard(),
187  m_settings,
188  Prj().Get3DCacheManager() );
189 
190  if( m_canvas )
191  m_canvas->SetStatusBar( status_bar );
192 
193  m_auimgr.SetManagedWindow( this );
194 
195  EDA_PANEINFO horiztb;
196  horiztb.HorizontalToolbarPane();
197 
198  m_auimgr.AddPane( m_mainToolBar,
199  wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() );
200 
201  if( m_canvas )
202  m_auimgr.AddPane( m_canvas,
203  wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() );
204 
205  m_auimgr.Update();
206 
209 
210  // Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
211  // in order to receive mouse events. Otherwise, the user has to click somewhere on
212  // the canvas before it will respond to mouse wheel events.
213  if( m_canvas )
214  m_canvas->SetFocus();
215 }
EDA_PANEINFO & HorizontalToolbarPane()
Function HorizontalToolbarPane Change *this to a horizontal toolbar for KiCad.
Definition: wxstruct.h:474
#define DIM(x)
of elements in an array
Definition: macros.h:98
static const int * GetAttributesList(bool aUseAntiAliasing)
Get a list of attributes to pass to wxGLCanvas.
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aWdoName=wxFrameNameStr)
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void SetStatusBar(wxStatusBar *aStatusBar)
Definition: eda_3d_canvas.h:74
Class EDA_3D_CANVAS Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:53
BOARD * GetBoard() const
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
Definition: basicframe.cpp:361
wxAuiManager m_auimgr
Definition: wxstruct.h:139
Specialization of the wxAuiPaneInfo class for KiCad panels.
Definition: wxstruct.h:465
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
wxPoint m_FramePos
Definition: wxstruct.h:129
void ReCreateMainToolbar()
Definition: 3d_toolbar.cpp:39
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:135
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
wxString m_defaultFileName
Filename to propose for save a screenshot.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void CreateMenuBar()
Definition: 3d_toolbar.cpp:133
wxSize m_FrameSize
Definition: wxstruct.h:130
#define VIEWER3D_FRAMENAME
Definition: eda_3d_viewer.h:44
EDA_3D_VIEWER::~EDA_3D_VIEWER ( )

Definition at line 218 of file eda_3d_viewer.cpp.

References EDA_BASE_FRAME::m_auimgr.

219 {
220  m_auimgr.UnInit();
221 
222  // m_canvas delete will be called by wxWidget manager
223  //delete m_canvas;
224  //m_canvas = 0;
225 }
wxAuiManager m_auimgr
Definition: wxstruct.h:139

Member Function Documentation

void EDA_BASE_FRAME::AddMenuIconsOptions ( wxMenu *  MasterMenu)
inherited

Function AddMenuIconsOptions creates a menu list for icons in menu and icon sizes choice, and add it as submenu to MasterMenu.

Parameters
MasterMenuThe main menu. The sub menu list will be accessible from the menu item with id ID_KICAD_SELECT_ICONS_OPTIONS

Definition at line 671 of file basicframe.cpp.

References AddMenuItem(), ID_KICAD_SELECT_ICONS_IN_MENUS, ID_KICAD_SELECT_ICONS_OPTIONS, KiBitmap(), and Pgm().

Referenced by preparePreferencesMenu(), PL_EDITOR_FRAME::ReCreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), and GERBVIEW_FRAME::ReCreateMenuBar().

672 {
673  wxMenu* menu = NULL;
674  wxMenuItem* item = MasterMenu->FindItem( ID_KICAD_SELECT_ICONS_OPTIONS );
675 
676  if( item ) // This menu exists, do nothing
677  return;
678 
679  menu = new wxMenu;
680 
681  menu->Append( new wxMenuItem( menu, ID_KICAD_SELECT_ICONS_IN_MENUS,
682  _( "Icons in Menus" ), wxEmptyString,
683  wxITEM_CHECK ) );
684  menu->Check( ID_KICAD_SELECT_ICONS_IN_MENUS, Pgm().GetUseIconsInMenus() );
685 
686  AddMenuItem( MasterMenu, menu,
688  _( "Icons Options" ),
689  _( "Select show icons in menus and icons sizes" ),
690  KiBitmap( hammer_xpm ) );
691 }
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Function AddMenuItem is an inline helper function to create and insert a menu item with an icon into ...
Definition: bitmap.cpp:55
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
void EDA_BASE_FRAME::CheckForAutoSaveFile ( const wxFileName &  aFileName,
const wxString &  aBackupFileExtension 
)
inherited

Function CheckForAutoSaveFile checks if an auto save file exists for aFileName and takes the appropriate action depending on the user input.

If an auto save file exists for aFileName, the user is prompted if they wish to replace file aFileName with the auto saved file. If the user chooses to replace the file, the backup file of aFileName is removed, aFileName is renamed to the backup file name, and the auto save file is renamed to aFileName. If user chooses to keep the existing version of aFileName, the auto save file is removed.

Parameters
aFileNameA wxFileName object containing the file name to check.
aBackupFileExtensionA wxString object containing the backup file extension used to create the backup file name.

Definition at line 576 of file basicframe.cpp.

References AUTOSAVE_PREFIX_FILENAME, Format(), GetChars(), Pgm(), and traceAutoSave.

Referenced by SCH_EDIT_FRAME::LoadOneEEFile(), and PCB_EDIT_FRAME::OpenProjectFiles().

578 {
579  wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
580  wxCHECK_RET( !aBackupFileExtension.IsEmpty(), wxT( "Invalid backup file extension!" ) );
581 
582  wxFileName autoSaveFileName = aFileName;
583 
584  // Check for auto save file.
585  autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
586 
587  wxLogTrace( traceAutoSave,
588  wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
589 
590  if( !autoSaveFileName.FileExists() )
591  return;
592 
593  wxString msg = wxString::Format( _(
594  "Well this is potentially embarrassing!\n"
595  "It appears that the last time you were editing the file\n"
596  "'%s'\n"
597  "it was not saved properly. Do you wish to restore the last saved edits you made?" ),
598  GetChars( aFileName.GetFullName() )
599  );
600 
601  int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
602 
603  // Make a backup of the current file, delete the file, and rename the auto save file to
604  // the file name.
605  if( response == wxYES )
606  {
607  // Get the backup file name.
608  wxFileName backupFileName = aFileName;
609  backupFileName.SetExt( aBackupFileExtension );
610 
611  // If an old backup file exists, delete it. If an old copy of the file exists, rename
612  // it to the backup file name
613  if( aFileName.FileExists() )
614  {
615  // Remove the old file backup file.
616  if( backupFileName.FileExists() )
617  wxRemoveFile( backupFileName.GetFullPath() );
618 
619  // Rename the old file to the backup file name.
620  if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
621  {
622  msg.Printf( _( "Could not create backup file <%s>" ),
623  GetChars( backupFileName.GetFullPath() ) );
624  wxMessageBox( msg );
625  }
626  }
627 
628  if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
629  {
630  wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
631  Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
632  }
633  }
634  else
635  {
636  wxLogTrace( traceAutoSave,
637  wxT( "Removing auto save file " ) + autoSaveFileName.GetFullPath() );
638 
639  // Remove the auto save file when using the previous file as is.
640  wxRemoveFile( autoSaveFileName.GetFullPath() );
641  }
642 }
const wxChar traceAutoSave[]
Custom trace mask to enable and disable auto save tracing.
Definition: basicframe.cpp:53
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
#define AUTOSAVE_PREFIX_FILENAME
a prefix to create filenames for schematic files or other difile when auto-saved to retrieve a crash ...
Definition: wxstruct.h:70
wxConfigBase * EDA_BASE_FRAME::config ( )
protectedvirtualinherited
wxString EDA_BASE_FRAME::ConfigBaseName ( )
inlineinherited

Function ConfigBaseName.

Returns
a base name prefix used in Load/Save settings to build the full name of keys used in config. This is usually the name of the frame set by CTOR, unless m_configFrameName contains a base name. this is the case of frames which can be shown in normal or modal mode. This is needed because we want only one base name prefix, regardless the mode used.

Definition at line 255 of file wxstruct.h.

References EDA_BASE_FRAME::m_configFrameName.

Referenced by EDA_BASE_FRAME::LoadSettings(), EDA_DRAW_FRAME::LoadSettings(), EDA_BASE_FRAME::SaveSettings(), and EDA_DRAW_FRAME::SaveSettings().

256  {
257  wxString baseCfgName = m_configFrameName.IsEmpty() ? GetName() : m_configFrameName;
258  return baseCfgName;
259  }
wxString m_configFrameName
prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTO...
Definition: wxstruct.h:132
void EDA_3D_VIEWER::CreateMenuBar ( )
private

Definition at line 133 of file 3d_toolbar.cpp.

References AddMenuItem(), GRID3D_10MM, GRID3D_1MM, GRID3D_2P5MM, GRID3D_5MM, GRID3D_NONE, CINFO3D_VISU::GridGet(), ID_MENU3D_ADHESIVE_ONOFF, ID_MENU3D_AXIS_ONOFF, ID_MENU3D_BGCOLOR, ID_MENU3D_BGCOLOR_BOTTOM_SELECTION, ID_MENU3D_BGCOLOR_TOP_SELECTION, ID_MENU3D_COLOR, ID_MENU3D_COMMENTS_ONOFF, ID_MENU3D_COPPER_COLOR_SELECTION, ID_MENU3D_ECO_ONOFF, ID_MENU3D_ENGINE, ID_MENU3D_ENGINE_OPENGL_LEGACY, ID_MENU3D_ENGINE_RAYTRACING, ID_MENU3D_FL, ID_MENU3D_FL_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX, ID_MENU3D_FL_RAYTRACING, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES, ID_MENU3D_FL_RAYTRACING_REFLECTIONS, ID_MENU3D_FL_RAYTRACING_REFRACTIONS, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS, ID_MENU3D_FL_RENDER_MATERIAL, ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE, ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY, ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL, ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES, ID_MENU3D_GRID, ID_MENU3D_GRID_10_MM, ID_MENU3D_GRID_1_MM, ID_MENU3D_GRID_2P5_MM, ID_MENU3D_GRID_5_MM, ID_MENU3D_GRID_NOGRID, ID_MENU3D_HELP_HOTKEY_SHOW_CURRENT_LIST, ID_MENU3D_LAYERS, ID_MENU3D_MODULE_ONOFF, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL, ID_MENU3D_MOUSEWHEEL_PANNING, ID_MENU3D_PCB_BODY_COLOR_SELECTION, ID_MENU3D_REALISTIC_MODE, ID_MENU3D_RESET_DEFAULTS, ID_MENU3D_SHOW_BOARD_BODY, ID_MENU3D_SILKSCREEN_COLOR_SELECTION, ID_MENU3D_SILKSCREEN_ONOFF, ID_MENU3D_SOLDER_MASK_ONOFF, ID_MENU3D_SOLDER_PASTE_ONOFF, ID_MENU3D_SOLDERMASK_COLOR_SELECTION, ID_MENU3D_SOLDERPASTE_COLOR_SELECTION, ID_MENU3D_ZONE_ONOFF, ID_MENU_SCREENCOPY_JPEG, ID_MENU_SCREENCOPY_PNG, ID_TOOL_SCREENCOPY_TOCLIBBOARD, KiBitmap(), m_logTrace, m_settings, RENDER_ENGINE_OPENGL_LEGACY, RENDER_ENGINE_RAYTRACING, CINFO3D_VISU::RenderEngineGet(), and SetMenuBarOptionsState().

134 {
135  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::CreateMenuBar" ) );
136 
137  wxMenuBar* menuBar = new wxMenuBar;
138  wxMenu* fileMenu = new wxMenu;
139  wxMenu* prefsMenu = new wxMenu;
140  wxMenu* helpMenu = new wxMenu;
141 
142  menuBar->Append( fileMenu, _( "&File" ) );
143 
145  _( "Create Image (png format)" ),
146  KiBitmap( export_xpm ) );
147 
149  _( "Create Image (jpeg format)" ),
150  KiBitmap( export_xpm ) );
151 
152  fileMenu->AppendSeparator();
154  _( "Copy 3D Image to Clipboard" ),
155  KiBitmap( copy_button_xpm ) );
156 
157  fileMenu->AppendSeparator();
158  AddMenuItem( fileMenu, wxID_EXIT,
159  _( "&Exit" ),
160  KiBitmap( exit_xpm ) );
161 
162  menuBar->Append( prefsMenu, _( "&Preferences" ) );
163 
165  _( "Use Touchpad to Pan" ),
166  KiBitmap( tools_xpm ), wxITEM_CHECK );
167 
168  prefsMenu->AppendSeparator();
169 
171  _( "Realistic Mode" ),
172  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
173 
174  wxMenu * renderEngineList = new wxMenu;
175  AddMenuItem( prefsMenu, renderEngineList, ID_MENU3D_ENGINE,
176  _( "Render Engine" ), KiBitmap( render_mode_xpm ) );
177 
178  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_OPENGL_LEGACY,
179  _( "OpenGL" ),
180  wxEmptyString );
181 
182  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_RAYTRACING,
183  _( "Raytracing" ),
184  wxEmptyString );
185 
186  renderEngineList->Check( ID_MENU3D_ENGINE_OPENGL_LEGACY,
188 
189  renderEngineList->Check( ID_MENU3D_ENGINE_RAYTRACING,
191 
192  wxMenu * renderOptionsMenu = new wxMenu;
193  AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_FL,
194  _( "Render Options" ), KiBitmap( options_3drender_xpm ) );
195 
197  _( "Show Holes in Zones" ),
198  _( "Holes inside a copper layer copper zones are shown, "
199  "but the calculation time is longer" ),
200  KiBitmap( green_xpm ), wxITEM_CHECK );
201 
202  wxMenu * materialsList = new wxMenu;
203  AddMenuItem( renderOptionsMenu, materialsList, ID_MENU3D_FL_RENDER_MATERIAL,
204  _( "Material Properties" ), KiBitmap( color_materials_xpm ) );
205 
206  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL,
207  _( "Use all properties" ),
208  _( "Use all material properties from each 3D model file" ) );
209 
210  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY,
211  _( "Use diffuse only" ),
212  _( "Use only the diffuse color property from model 3D model file " ) );
213 
214  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE,
215  _( "CAD color style" ),
216  _( "Use a CAD color style based on the diffuse color of the material" ) );
217 
218  // Add specific preferences for OpenGL
219  // /////////////////////////////////////////////////////////////////////////
220  wxMenu * renderOptionsMenu_OPENGL = new wxMenu;
221 
222  AddMenuItem( renderOptionsMenu, renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL,
223  _( "OpenGL Options" ), KiBitmap( tools_xpm ) );
224 
225  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS,
226  _( "Show Copper Thickness" ),
227  _( "Shows the copper thickness on copper layers (slower loading)"),
228  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
229 
230  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX,
231  _( "Show Model Bounding Boxes" ),
232  KiBitmap( green_xpm ), wxITEM_CHECK );
233 
234 
235  // Add specific preferences for Raytracing
236  // /////////////////////////////////////////////////////////////////////////
237  wxMenu * renderOptionsMenu_RAYTRACING = new wxMenu;
238  AddMenuItem( renderOptionsMenu, renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING,
239  _( "Raytracing Options" ), KiBitmap( tools_xpm ) );
240 
241  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS,
242  _( "Render Shadows" ),
243  KiBitmap( green_xpm ), wxITEM_CHECK );
244 
245  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES,
246  _( "Procedural Textures" ),
247  _( "Apply procedural textures to materials (slow)"),
248  KiBitmap( green_xpm ), wxITEM_CHECK );
249 
250  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR,
251  _( "Add floor" ),
252  _( "Adds a floor plane below the board (slow)"),
253  KiBitmap( green_xpm ), wxITEM_CHECK );
254 
255  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFRACTIONS,
256  _( "Refractions" ),
257  _( "Render materials with refractions properties on final render (slow)"),
258  KiBitmap( green_xpm ), wxITEM_CHECK );
259 
260  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFLECTIONS,
261  _( "Reflections" ),
262  _( "Render materials with reflections properties on final render (slow)"),
263  KiBitmap( green_xpm ), wxITEM_CHECK );
264 
265  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING,
266  _( "Anti-aliasing" ),
267  _( "Render with improoved quality on final render (slow)"),
268  KiBitmap( green_xpm ), wxITEM_CHECK );
269 
270  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING,
271  _( "Post-processing" ),
272  _( "Apply Screen Space Ambient Occlusion and Global Illumination reflections on final render (slow)"),
273  KiBitmap( green_xpm ), wxITEM_CHECK );
274 
275  prefsMenu->AppendSeparator();
276 
277 
278  // Colors, axis and grid elements
279  // /////////////////////////////////////////////////////////////////////////
280 
281  // Add submenu set Colors
282  wxMenu * setColorMenu = new wxMenu;
283  AddMenuItem( prefsMenu, setColorMenu, ID_MENU3D_COLOR,
284  _( "Choose Colors" ), KiBitmap( palette_xpm ) );
285 
286  wxMenu * setBgColorMenu = new wxMenu;
287  AddMenuItem( setColorMenu, setBgColorMenu, ID_MENU3D_BGCOLOR,
288  _( "Background Color" ), KiBitmap( palette_xpm ) );
289 
291  _( "Background Top Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
292 
294  _( "Background Bottom Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
295 
297  _( "Silkscreen Color" ), KiBitmap( setcolor_silkscreen_xpm ) );
298 
300  _( "Solder Mask Color" ), KiBitmap( setcolor_soldermask_xpm ) );
301 
303  _( "Solder Paste Color" ), KiBitmap( setcolor_solderpaste_xpm ) );
304 
306  _( "Copper/Surface Finish Color" ), KiBitmap( setcolor_copper_xpm ) );
307 
309  _( "Board Body Color" ), KiBitmap( setcolor_board_body_xpm ) );
310 
311  AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
312  _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
313 
314 
315  // Creates grid menu
316  // /////////////////////////////////////////////////////////////////////////
317 
318  wxMenu * gridlistMenu = new wxMenu;
319  AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
320  _( "3D Grid" ), KiBitmap( grid_xpm ) );
321  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
322  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
323  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
324  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
325  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
326 
327  // If the grid is on, check the corresponding menuitem showing the grid size
328  if( m_settings.GridGet() != GRID3D_NONE )
329  {
330  gridlistMenu->Check( ID_MENU3D_GRID_10_MM, m_settings.GridGet() == GRID3D_10MM );
331  gridlistMenu->Check( ID_MENU3D_GRID_5_MM, m_settings.GridGet() == GRID3D_5MM );
332  gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, m_settings.GridGet() == GRID3D_2P5MM );
333  gridlistMenu->Check( ID_MENU3D_GRID_1_MM, m_settings.GridGet() == GRID3D_1MM );
334  }
335  else
336  gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
337 
338 
339  // Display elements options
340  // /////////////////////////////////////////////////////////////////////////
341  prefsMenu->AppendSeparator();
342 
344  _( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
345 
346  AddMenuItem( prefsMenu, ID_MENU3D_ZONE_ONOFF,
347  _( "Show Zone &Filling" ), KiBitmap( add_zone_xpm ), wxITEM_CHECK );
348 
349  wxMenu * moduleAttributes = new wxMenu;
350  AddMenuItem( prefsMenu, moduleAttributes, ID_MENU3D_MODULE_ONOFF,
351  _( "Show 3D M&odels" ), KiBitmap( shape_3d_xpm ) );
352  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL,
353  _( "Through hole" ),
354  _( "Footprint Properties -> Placement type -> Through hole" ) );
355 
356  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT,
357  _( "Surface mount" ),
358  _( "Footprint Properties -> Placement type -> Surface mount" ) );
359 
360  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL,
361  _( "Virtual" ),
362  _( "Footprint Properties -> Placement type -> Virtual (eg: edge connectors, test points, mechanical parts)" ) );
363 
364  // Layer options
365  // /////////////////////////////////////////////////////////////////////////
366  prefsMenu->AppendSeparator();
367 
368  wxMenu * layersMenu = new wxMenu;
369  AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
370  _( "Show &Layers" ), KiBitmap( tools_xpm ) );
371 
373  _( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
374 
376  _( "Show &Silkscreen Layers" ), KiBitmap( add_text_xpm ), wxITEM_CHECK );
377 
379  _( "Show Solder &Mask Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
380 
382  _( "Show Solder &Paste Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
383 
384  // Other layers are not "board" layers, and are not shown in realistic mode
385  // These menus will be disabled in in realistic mode
387  _( "Show &Comments and Drawings Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
388 
389  AddMenuItem( layersMenu, ID_MENU3D_ECO_ONOFF,
390  _( "Show &Eco Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
391 
392  // Reset options
393  // /////////////////////////////////////////////////////////////////////////
394  prefsMenu->AppendSeparator();
395 
397  _( "Reset to default settings" ),
398  KiBitmap( tools_xpm ) );
399 
400  // Help menu
401  // /////////////////////////////////////////////////////////////////////////
402  menuBar->Append( helpMenu, _( "&Help" ) );
403 
405  _( "&List Hotkeys" ),
406  _( "Displays the current hotkeys list and corresponding commands" ),
407  KiBitmap( hotkeys_xpm ) );
408 
409  SetMenuBar( menuBar );
411 }
GRID3D_TYPE GridGet() const
GridGet - get the current grid.
Definition: cinfo3d_visu.h:216
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Function AddMenuItem is an inline helper function to create and insert a menu item with an icon into ...
Definition: bitmap.cpp:55
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:414
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
EDA_3D_VIEWER::DECLARE_EVENT_TABLE ( )
private
void KIWAY_PLAYER::DismissModal ( bool  aRetVal,
const wxString &  aResult = wxEmptyString 
)
protectedinherited
void EDA_3D_VIEWER::DisplayHotKeys ( )
private

Definition at line 1244 of file eda_3d_viewer.cpp.

References DisplayHotkeyList().

Referenced by Process_Special_Functions().

1245 {
1247 }
void DisplayHotkeyList(EDA_BASE_FRAME *aFrame, struct EDA_HOTKEY_CONFIG *aDescList)
Function DisplayHotkeyList Displays the current hotkey list.
struct EDA_HOTKEY_CONFIG g_3DViewer_Hokeys_Descr[]
bool EDA_BASE_FRAME::doAutoSave ( )
protectedvirtualinherited

Function doAutoSave should be overridden by the derived class to handle the auto save feature.

Returns
true if the auto save was successful otherwise false.

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 231 of file basicframe.cpp.

Referenced by EDA_BASE_FRAME::onAutoSaveTimer().

232 {
233  wxCHECK_MSG( false, true, wxT( "Auto save timer function not overridden. Bad programmer!" ) );
234 }
bool EDA_BASE_FRAME::Enable ( bool  enable)
overrideinherited

Definition at line 192 of file basicframe.cpp.

Referenced by FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), and KIWAY_PLAYER::ShowModal().

193 {
194  // so we can do logging of this state change:
195 
196 #if defined(DEBUG)
197  const char* type_id = typeid( *this ).name();
198  printf( "wxFrame %-28s: %s\n", type_id, enable ? "enabled" : "disabled" );
199 #endif
200 
201  return wxFrame::Enable( enable );
202 }
void EDA_3D_VIEWER::Exit3DFrame ( wxCommandEvent &  event)
private

Exit3DFrame - Called when user press the File->Exit.

Parameters
event

Definition at line 239 of file eda_3d_viewer.cpp.

References m_logTrace.

240 {
241  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::Exit3DFrame" ) );
242 
243  Close( true );
244 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_BASE_FRAME::ExportHotkeyConfigToFile ( EDA_HOTKEY_CONFIG aDescList,
const wxString &  aDefaultShortname 
)
inherited

Function ExportHotkeyConfigToFile Prompt the user for an old hotkey file to read, and read it.

Parameters
aDescList= current hotkey list descr. to initialize.
aDefaultShortname= a default short name (extention not needed) like eechema, kicad...

Definition at line 768 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, EDA_FILE_SELECTOR(), EDA_BASE_FRAME::GetMruPath(), Prj(), EDA_BASE_FRAME::SetMruPath(), and EDA_BASE_FRAME::WriteHotkeyConfig().

Referenced by KICAD_MANAGER_FRAME::Process_Config(), LIB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Config(), PL_EDITOR_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), GERBVIEW_FRAME::Process_Config(), and FOOTPRINT_EDIT_FRAME::ProcessPreferences().

770 {
771  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
772  wxString mask = wxT( "*." ) + ext;
773 
774 #if 0
775  wxString path = wxPathOnly( Prj().GetProjectFullName() );
776 #else
777  wxString path = GetMruPath();
778 #endif
779  wxFileName fn( aDefaultShortname );
780  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
781 
782  wxString filename = EDA_FILE_SELECTOR( _( "Write Hotkey Configuration File:" ),
783  path,
784  fn.GetFullPath(),
785  ext,
786  mask,
787  this,
788  wxFD_SAVE,
789  true );
790 
791  if( filename.IsEmpty() )
792  return;
793 
794  WriteHotkeyConfig( aDescList, &filename );
795  SetMruPath( wxFileName( filename ).GetPath() );
796 }
void SetMruPath(const wxString &aPath)
Definition: wxstruct.h:356
PROJECT & Prj()
Definition: kicad.cpp:293
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
virtual int WriteHotkeyConfig(struct EDA_HOTKEY_CONFIG *aDescList, wxString *aFullFileName=NULL)
Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mec...
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
wxString GetMruPath() const
Definition: wxstruct.h:358
int EDA_BASE_FRAME::GetAutoSaveInterval ( ) const
inlineinherited

Definition at line 214 of file wxstruct.h.

References EDA_BASE_FRAME::m_autoSaveInterval.

Referenced by DIALOG_GENERALOPTIONS::init(), and SCH_EDIT_FRAME::OnPreferencesOptions().

214 { return m_autoSaveInterval; }
int m_autoSaveInterval
The auto save interval time in seconds.
Definition: wxstruct.h:148
BOARD* EDA_3D_VIEWER::GetBoard ( )
inline

Definition at line 64 of file eda_3d_viewer.h.

References PCB_BASE_FRAME::GetBoard(), and Parent().

Referenced by ReloadRequest().

64 { return Parent()->GetBoard(); }
PCB_BASE_FRAME * Parent() const
Definition: eda_3d_viewer.h:62
BOARD * GetBoard() const
const wxString& EDA_3D_VIEWER::GetDefaultFileName ( ) const
inline

Function GetDefaultFileName.

Returns
the default suggested file name

Definition at line 88 of file eda_3d_viewer.h.

References m_defaultFileName.

88 { return m_defaultFileName; }
wxString m_defaultFileName
Filename to propose for save a screenshot.
wxString EDA_BASE_FRAME::GetFileFromHistory ( int  cmdId,
const wxString &  type,
wxFileHistory *  aFileHistory = NULL 
)
inherited

Function GetFileFromHistory fetches the file name from the file history list.

and removes the selected file, if this file does not exists Note also the menu is updated, if wxFileHistory::UseMenu was called at init time

Parameters
cmdIdThe command ID associated with the aFileHistory object.
typePlease document me!
aFileHistoryThe wxFileHistory in use. If null, the main application file history is used
Returns
a wxString containing the selected filename

Definition at line 400 of file basicframe.cpp.

References Format(), GetChars(), KIFACE_I::GetFileHistory(), and Kiface().

Referenced by GERBVIEW_FRAME::OnDrlFileHistory(), KICAD_MANAGER_FRAME::OnFileHistory(), PL_EDITOR_FRAME::OnFileHistory(), PCB_EDIT_FRAME::OnFileHistory(), GERBVIEW_FRAME::OnGbrFileHistory(), and GERBVIEW_FRAME::OnZipFileHistory().

402 {
403  wxFileHistory* fileHistory = aFileHistory;
404 
405  if( !fileHistory )
406  fileHistory = &Kiface().GetFileHistory();
407 
408  int baseId = fileHistory->GetBaseId();
409 
410  wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() );
411 
412  unsigned i = cmdId - baseId;
413 
414  if( i < fileHistory->GetCount() )
415  {
416  wxString fn = fileHistory->GetHistoryFile( i );
417 
418  if( wxFileName::FileExists( fn ) )
419  return fn;
420  else
421  {
422  wxString msg = wxString::Format(
423  wxT( "file '%s' was not found." ),
424  GetChars( fn ) );
425 
426  wxMessageBox( msg );
427 
428  fileHistory->RemoveFileFromHistory( i );
429  }
430  }
431 
432  return wxEmptyString;
433 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxFileHistory & GetFileHistory()
Definition: kiface_i.h:121
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
void EDA_BASE_FRAME::GetKicadAbout ( wxCommandEvent &  event)
inherited

Definition at line 525 of file basicframe.cpp.

References ShowAboutDialog().

526 {
527  bool ShowAboutDialog(wxWindow * parent);
528  ShowAboutDialog( this );
529 }
bool ShowAboutDialog(wxWindow *parent)
void EDA_BASE_FRAME::GetKicadContribute ( wxCommandEvent &  event)
inherited

Definition at line 514 of file basicframe.cpp.

References URL_GET_INVOLVED.

515 {
516  if( !wxLaunchDefaultBrowser( URL_GET_INVOLVED ) )
517  {
518  wxString msg = _( "Could not launch the default browser. For information on how to help the KiCad project, visit " );
519  msg.Append( URL_GET_INVOLVED );
520  wxMessageBox( msg, _( "Get involved with KiCad" ), wxOK, this );
521  }
522 }
#define URL_GET_INVOLVED
Definition: basicframe.cpp:51
void EDA_BASE_FRAME::GetKicadHelp ( wxCommandEvent &  event)
inherited

Definition at line 436 of file basicframe.cpp.

References DIM, Format(), GetAssociatedDocument(), GetChars(), EDA_BASE_FRAME::help_name(), SearchHelpFileFullPath(), and EDA_BASE_FRAME::sys_search().

437 {
438  const SEARCH_STACK& search = sys_search();
439 
440  /* We have to get document for beginners,
441  * or the full specific doc
442  * if event id is wxID_INDEX, we want the document for beginners.
443  * else the specific doc file (its name is in Kiface().GetHelpFileName())
444  * The document for beginners is the same for all KiCad utilities
445  */
446  if( event.GetId() == wxID_INDEX )
447  {
448  // List of possible names for Getting Started in KiCad
449  const wxChar* names[2] = {
450  wxT( "getting_started_in_kicad" ),
451  wxT( "Getting_Started_in_KiCad" )
452  };
453 
454  wxString helpFile;
455  // Search for "getting_started_in_kicad.html" or "getting_started_in_kicad.pdf"
456  // or "Getting_Started_in_KiCad.html" or "Getting_Started_in_KiCad.pdf"
457  for( unsigned ii = 0; ii < DIM( names ); ii++ )
458  {
459  helpFile = SearchHelpFileFullPath( search, names[ii] );
460 
461  if( !helpFile.IsEmpty() )
462  break;
463  }
464 
465  if( !helpFile )
466  {
467  wxString msg = wxString::Format( _(
468  "Html or pdf help file \n'%s'\n or\n'%s' could not be found." ), names[0], names[1] );
469  wxMessageBox( msg );
470  }
471  else
472  {
473  GetAssociatedDocument( this, helpFile );
474  }
475 
476  return;
477  }
478 
479  wxString base_name = help_name();
480  wxString helpFile = SearchHelpFileFullPath( search, base_name );
481 
482  if( !helpFile )
483  {
484  wxString msg = wxString::Format( _(
485  "Help file '%s' could not be found." ),
486  GetChars( base_name )
487  );
488  wxMessageBox( msg );
489  }
490  else
491  {
492  GetAssociatedDocument( this, helpFile );
493  }
494 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, const wxPathList *aPaths)
Function GetAssociatedDocument open a document (file) with the suitable browser.
Definition: eda_doc.cpp:86
Class SEARCH_STACK looks for files in a number of places.
Definition: search_stack.h:41
virtual const SEARCH_STACK & sys_search()
Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_M...
Definition: basicframe.cpp:370
wxString SearchHelpFileFullPath(const SEARCH_STACK &aSStack, const wxString &aBaseName)
Function SearchHelpFileFullPath returns the help file's full path.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
virtual wxString help_name()
Definition: basicframe.cpp:376
wxString EDA_BASE_FRAME::GetMruPath ( ) const
inlineinherited

Definition at line 358 of file wxstruct.h.

References EDA_BASE_FRAME::m_mruPath.

Referenced by EDA_BASE_FRAME::ExportHotkeyConfigToFile(), EDA_BASE_FRAME::ImportHotkeyConfigFromFile(), and KICAD_MANAGER_FRAME::OnLoadProject().

358 { return m_mruPath; }
wxString m_mruPath
Most recently used path.
Definition: wxstruct.h:155
CINFO3D_VISU& EDA_3D_VIEWER::GetSettings ( )
inline

Function GetSettings.

Returns
current settings

Definition at line 94 of file eda_3d_viewer.h.

References m_settings.

94 { return m_settings; }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
wxString EDA_BASE_FRAME::help_name ( )
protectedvirtualinherited

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 376 of file basicframe.cpp.

References KIFACE_I::GetHelpFileName(), and Kiface().

Referenced by EDA_BASE_FRAME::GetKicadHelp().

377 {
378  return Kiface().GetHelpFileName();
379 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
const wxString & GetHelpFileName() const
Function GetHelpFileName returns just the basename portion of the current help file.
Definition: kiface_i.h:119
void EDA_BASE_FRAME::ImportHotkeyConfigFromFile ( EDA_HOTKEY_CONFIG aDescList,
const wxString &  aDefaultShortname 
)
inherited

Function ImportHotkeyConfigFromFile Prompt the user for an old hotkey file to read, and read it.

Parameters
aDescList= current hotkey list descr. to initialize.
aDefaultShortname= a default short name (extention not needed) like eechema, kicad...

Definition at line 737 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, EDA_FILE_SELECTOR(), EDA_BASE_FRAME::GetMruPath(), Prj(), EDA_BASE_FRAME::ReadHotkeyConfigFile(), and EDA_BASE_FRAME::SetMruPath().

Referenced by KICAD_MANAGER_FRAME::Process_Config(), LIB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Config(), PL_EDITOR_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), GERBVIEW_FRAME::Process_Config(), and FOOTPRINT_EDIT_FRAME::ProcessPreferences().

739 {
740  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
741  wxString mask = wxT( "*." ) + ext;
742 
743 #if 0 // pass in the project dir as an argument
744  wxString path = wxPathOnly( Prj().GetProjectFullName() );
745 #else
746  wxString path = GetMruPath();
747 #endif
748  wxFileName fn( aDefaultShortname );
749  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
750 
751  wxString filename = EDA_FILE_SELECTOR( _( "Read Hotkey Configuration File:" ),
752  path,
753  fn.GetFullPath(),
754  ext,
755  mask,
756  this,
757  wxFD_OPEN,
758  true );
759 
760  if( filename.IsEmpty() )
761  return;
762 
763  ReadHotkeyConfigFile( filename, aDescList );
764  SetMruPath( wxFileName( filename ).GetPath() );
765 }
void SetMruPath(const wxString &aPath)
Definition: wxstruct.h:356
int ReadHotkeyConfigFile(const wxString &aFilename, struct EDA_HOTKEY_CONFIG *aDescList)
Function ReadHotkeyConfigFile Read an old configuration file (<file>.key) and fill the current ho...
PROJECT & Prj()
Definition: kicad.cpp:293
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
wxString GetMruPath() const
Definition: wxstruct.h:358
void EDA_3D_VIEWER::Install3DViewOptionDialog ( wxCommandEvent &  event)
private

Definition at line 48 of file dialog_3D_view_option.cpp.

References NewDisplay(), and SetMenuBarOptionsState().

49 {
50  DIALOG_3D_VIEW_OPTIONS dlg( this );
51 
52  if( dlg.ShowModal() == wxID_OK )
53  {
55  NewDisplay();
56  }
57 }
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:414
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
virtual bool EDA_BASE_FRAME::isAutoSaveRequired ( ) const
inlineprotectedvirtualinherited

Function autoSaveRequired returns the auto save status of the application.

Override this function if your derived frame supports automatic file saving.

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 168 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::ProcessEvent().

168 { return false; }
bool KIWAY_PLAYER::IsDismissed ( )
protectedinherited

Function IsDismissed returns false only if both the frame is acting in modal mode and it has not been dismissed yet with DismissModal().

IOW, it will return true if the dialog is not modal or if it is modal and has been dismissed.

Definition at line 163 of file kiway_player.cpp.

References DBG, and KIWAY_PLAYER::m_modal_loop.

Referenced by LIB_VIEW_FRAME::OnCloseWindow(), FOOTPRINT_VIEWER_FRAME::OnCloseWindow(), and FOOTPRINT_WIZARD_FRAME::OnCloseWindow().

164 {
165  bool ret = !m_modal_loop;
166 
167  DBG(printf( "%s: ret:%d\n", __func__, ret );)
168 
169  return ret;
170 }
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:247
#define DBG(x)
Definition: fctsys.h:33
bool EDA_BASE_FRAME::IsType ( FRAME_T  aType) const
inlineinherited
bool EDA_BASE_FRAME::IsWritable ( const wxFileName &  aFileName)
inherited

Function IsWritable checks if aFileName can be written.

The function performs a number of tests on aFileName to verify that it can be saved. If aFileName defines a path with no file name, them the path is tested for user write permission. If aFileName defines a file name that does not exist in the path, the path is tested for user write permission. If aFileName defines a file that already exits, the file name is tested for user write permissions.

Note
The file name path must be set or an assertion will be raised on debug builds and return false on release builds.
Parameters
aFileNameThe full path and/or file name of the file to test.
Returns
False if aFileName cannot be written.

Definition at line 532 of file basicframe.cpp.

References GetChars().

Referenced by SCH_EDIT_FRAME::doAutoSave(), LIB_EDIT_FRAME::SaveActiveLibrary(), SCH_EDIT_FRAME::SaveEEFile(), PCB_EDIT_FRAME::SavePcbCopy(), PCB_EDIT_FRAME::SavePcbFile(), CVPCB_MAINFRAME::SaveProjectFile(), and SCH_EDIT_FRAME::SaveProjectSettings().

533 {
534  wxString msg;
535  wxFileName fn = aFileName;
536 
537  // Check for absence of a file path with a file name. Unfortunately KiCad
538  // uses paths relative to the current project path without the ./ part which
539  // confuses wxFileName. Making the file name path absolute may be less than
540  // elegant but it solves the problem.
541  if( fn.GetPath().IsEmpty() && fn.HasName() )
542  fn.MakeAbsolute();
543 
544  wxCHECK_MSG( fn.IsOk(), false,
545  wxT( "File name object is invalid. Bad programmer!" ) );
546  wxCHECK_MSG( !fn.GetPath().IsEmpty(), false,
547  wxT( "File name object path <" ) + fn.GetFullPath() +
548  wxT( "> is not set. Bad programmer!" ) );
549 
550  if( fn.IsDir() && !fn.IsDirWritable() )
551  {
552  msg.Printf( _( "You do not have write permissions to folder <%s>." ),
553  GetChars( fn.GetPath() ) );
554  }
555  else if( !fn.FileExists() && !fn.IsDirWritable() )
556  {
557  msg.Printf( _( "You do not have write permissions to save file <%s> to folder <%s>." ),
558  GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
559  }
560  else if( fn.FileExists() && !fn.IsFileWritable() )
561  {
562  msg.Printf( _( "You do not have write permissions to save file <%s>." ),
563  GetChars( fn.GetFullPath() ) );
564  }
565 
566  if( !msg.IsEmpty() )
567  {
568  wxMessageBox( msg );
569  return false;
570  }
571 
572  return true;
573 }
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway.

Referenced by SCH_EDIT_FRAME::AppendOneEEProject(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), CVPCB_MAINFRAME::CreateScreenCmp(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_SHIM::DIALOG_SHIM(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers(), LIB_EDIT_FRAME::InstallConfigFrame(), PCB_EDIT_FRAME::InstallModuleOptionsFrame(), KIWAY_PLAYER::language_change(), SCH_SHEET::Load(), CVPCB_MAINFRAME::LoadFootprintFiles(), KIWAY_PLAYER::OnChangeIconsOptions(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLeftClick(), SCH_BASE_FRAME::OnOpenLibraryViewer(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndLinkFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_EDIT_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and DIALOG_EXCHANGE_MODULE::ViewAndSelectFootprint().

61  {
62  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
63  return *m_kiway;
64  }
KIWAY * m_kiway
Definition: kiway_player.h:85
void KIWAY_PLAYER::kiway_express ( KIWAY_EXPRESS aEvent)
protectedinherited

event handler, routes to derivative specific virtual KiwayMailIn()

Definition at line 188 of file kiway_player.cpp.

References KIWAY_EXPRESS::Command(), KIWAY_EXPRESS::GetPayload(), and KIWAY_PLAYER::KiwayMailIn().

189 {
190  // logging support
191 #if defined(DEBUG)
192  const char* class_name = typeid( this ).name();
193 
194  printf( "%s: received cmd:%d pay:'%s'\n", class_name,
195  aEvent.Command(), aEvent.GetPayload().c_str() );
196 #endif
197 
198  KiwayMailIn( aEvent ); // call the virtual, override in derived.
199 }
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
const std::string & GetPayload()
Function Payload returns the payload, which can be any text but it typicall self identifying s-expres...
Definition: kiway_express.h:62
MAIL_T Command()
Function Command returns the MAIL_T associated with this mail.
Definition: kiway_express.h:52
void KIWAY_PLAYER::KiwayMailIn ( KIWAY_EXPRESS aEvent)
virtualinherited

Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.

Merely override it in derived classes.

Reimplemented in SCH_EDIT_FRAME, PCB_EDIT_FRAME, and CVPCB_MAINFRAME.

Definition at line 75 of file kiway_player.cpp.

Referenced by KIWAY_PLAYER::kiway_express(), and KIWAY::ProcessEvent().

76 {
77  // override this in derived classes.
78 }
void KIWAY_PLAYER::language_change ( wxCommandEvent &  event)
protectedinherited

Function language_change is an event handler called on a language menu selection.

Definition at line 202 of file kiway_player.cpp.

References KIWAY_HOLDER::Kiway(), and KIWAY::SetLanguage().

203 {
204  int id = event.GetId();
205 
206  // tell all the KIWAY_PLAYERs about the language change.
207  Kiway().SetLanguage( id );
208 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
VTBL_ENTRY void SetLanguage(int aLanguage)
Function SetLanguage changes the language and then calls ShowChangedLanguage() on all KIWAY_PLAYERs...
Definition: kiway.cpp:396
void EDA_3D_VIEWER::LoadSettings ( wxConfigBase *  aCfg)
overrideprivatevirtual

Function LoadSettings loads common frame parameters from a configuration file.

Don't forget to call the base method or your frames won't remember their positions and sizes.

Reimplemented from EDA_BASE_FRAME.

Definition at line 698 of file eda_3d_viewer.cpp.

References FL_ADHESIVE, FL_AXIS, FL_COMMENTS, FL_ECO, FL_MODULE_ATTRIBUTES_NORMAL, FL_MODULE_ATTRIBUTES_NORMAL_INSERT, FL_MODULE_ATTRIBUTES_VIRTUAL, FL_MOUSEWHEEL_PANNING, FL_RENDER_OPENGL_COPPER_THICKNESS, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_BACKFLOOR, FL_RENDER_RAYTRACING_POST_PROCESSING, FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, FL_RENDER_SHOW_HOLES_IN_ZONES, FL_SHOW_BOARD_BODY, FL_SILKSCREEN, FL_SOLDERMASK, FL_SOLDERPASTE, FL_USE_REALISTIC_MODE, FL_ZONE, GRID3D_NONE, CINFO3D_VISU::GridSet(), keyBgColor_Blue, keyBgColor_Blue_Top, keyBgColor_Green, keyBgColor_Green_Top, keyBgColor_Red, keyBgColor_Red_Top, keyBoardBodyColor_Blue, keyBoardBodyColor_Green, keyBoardBodyColor_Red, keyCopperColor_Blue, keyCopperColor_Green, keyCopperColor_Red, keyMousewheelPanning, keyRenderEngine, keyRenderMaterial, keyRenderOGL_ShowCopperTck, keyRenderOGL_ShowModelBBox, keyRenderRAY_AAliasing, keyRenderRAY_Backfloor, keyRenderRAY_PostProcess, keyRenderRAY_ProceduralT, keyRenderRAY_Reflections, keyRenderRAY_Refractions, keyRenderRAY_Shadows, keyRenderRemoveHoles, keyShowAdhesiveLayers, keyShowAxis, keyShowBoardBody, keyShowCommentsLayer, keyShowEcoLayers, keyShowFootprints_Insert, keyShowFootprints_Normal, keyShowFootprints_Virtual, keyShowGrid, keyShowRealisticMode, keyShowSilkScreenLayers, keyShowSolderMaskLayers, keyShowSolderPasteLayers, keyShowZones, keySilkColor_Blue, keySilkColor_Green, keySilkColor_Red, keySMaskColor_Blue, keySMaskColor_Green, keySMaskColor_Red, keySPasteColor_Blue, keySPasteColor_Green, keySPasteColor_Red, EDA_BASE_FRAME::LoadSettings(), CINFO3D_VISU::m_BgColorBot, CINFO3D_VISU::m_BgColorTop, CINFO3D_VISU::m_BoardBodyColor, CINFO3D_VISU::m_CopperColor, m_logTrace, m_settings, CINFO3D_VISU::m_SilkScreenColor, CINFO3D_VISU::m_SolderMaskColor, CINFO3D_VISU::m_SolderPasteColor, MATERIAL_MODE_NORMAL, CINFO3D_VISU::MaterialModeSet(), RENDER_ENGINE_OPENGL_LEGACY, CINFO3D_VISU::RenderEngineSet(), and CINFO3D_VISU::SetFlag().

Referenced by Process_Special_Functions().

699 {
701 
702  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::LoadSettings" ) );
703 
704  aCfg->Read( keyBgColor_Red, &m_settings.m_BgColorBot.r, 0.4 );
705  aCfg->Read( keyBgColor_Green, &m_settings.m_BgColorBot.g, 0.4 );
706  aCfg->Read( keyBgColor_Blue, &m_settings.m_BgColorBot.b, 0.5 );
707 
708  aCfg->Read( keyBgColor_Red_Top, &m_settings.m_BgColorTop.r, 0.8 );
709  aCfg->Read( keyBgColor_Green_Top, &m_settings.m_BgColorTop.g, 0.8 );
710  aCfg->Read( keyBgColor_Blue_Top, &m_settings.m_BgColorTop.b, 0.9 );
711 
712  // m_SolderMaskColor default value = dark grey-green
713  aCfg->Read( keySMaskColor_Red, &m_settings.m_SolderMaskColor.r, 100.0 * 0.2 / 255.0 );
714  aCfg->Read( keySMaskColor_Green, &m_settings.m_SolderMaskColor.g, 255.0 * 0.2 / 255.0 );
715  aCfg->Read( keySMaskColor_Blue, &m_settings.m_SolderMaskColor.b, 180.0 * 0.2 / 255.0 );
716 
717  // m_SolderPasteColor default value = light grey
718  aCfg->Read( keySPasteColor_Red, &m_settings.m_SolderPasteColor.r, 128.0 /255.0 );
719  aCfg->Read( keySPasteColor_Green, &m_settings.m_SolderPasteColor.g, 128.0 /255.0 );
720  aCfg->Read( keySPasteColor_Blue, &m_settings.m_SolderPasteColor.b, 128.0 /255.0 );
721 
722  // m_SilkScreenColor default value = white
723  aCfg->Read( keySilkColor_Red, &m_settings.m_SilkScreenColor.r, 0.9 );
724  aCfg->Read( keySilkColor_Green, &m_settings.m_SilkScreenColor.g, 0.9 );
725  aCfg->Read( keySilkColor_Blue, &m_settings.m_SilkScreenColor.b, 0.9 );
726 
727  // m_CopperColor default value = gold
728  aCfg->Read( keyCopperColor_Red, &m_settings.m_CopperColor.r, 255.0 * 0.7 / 255.0 );
729  aCfg->Read( keyCopperColor_Green, &m_settings.m_CopperColor.g, 223.0 * 0.7 / 255.0 );
730  aCfg->Read( keyCopperColor_Blue, &m_settings.m_CopperColor.b, 0.0 /255.0 );
731 
732  // m_BoardBodyColor default value = FR4, in realistic mode
733  aCfg->Read( keyBoardBodyColor_Red, &m_settings.m_BoardBodyColor.r, 51.0 / 255.0 );
734  aCfg->Read( keyBoardBodyColor_Green, &m_settings.m_BoardBodyColor.g, 43.0 / 255.0 );
735  aCfg->Read( keyBoardBodyColor_Blue, &m_settings.m_BoardBodyColor.b, 22.0 /255.0 );
736 
737 
738  bool tmp;
739  aCfg->Read( keyMousewheelPanning, &tmp, false );
741 
742  aCfg->Read( keyShowRealisticMode, &tmp, true );
744 
745  aCfg->Read( keyRenderRemoveHoles, &tmp, true );
747 
748  // OpenGL options
749  aCfg->Read( keyRenderOGL_ShowCopperTck, &tmp, true );
751 
752  aCfg->Read( keyRenderOGL_ShowModelBBox, &tmp, false );
754 
755  // Raytracing options
756  aCfg->Read( keyRenderRAY_Shadows, &tmp, true );
758 
759  aCfg->Read( keyRenderRAY_Backfloor, &tmp, true );
761 
762  aCfg->Read( keyRenderRAY_Refractions, &tmp, true );
764 
765  aCfg->Read( keyRenderRAY_Reflections, &tmp, true );
767 
768  aCfg->Read( keyRenderRAY_PostProcess, &tmp, true );
770 
771  aCfg->Read( keyRenderRAY_AAliasing, &tmp, true );
773 
774  aCfg->Read( keyRenderRAY_ProceduralT, &tmp, true );
776 
777  aCfg->Read( keyShowAxis, &tmp, true );
778  m_settings.SetFlag( FL_AXIS, tmp );
779 
780  aCfg->Read( keyShowFootprints_Normal, &tmp, true );
782 
783  aCfg->Read( keyShowFootprints_Insert, &tmp, true );
785 
786  aCfg->Read( keyShowFootprints_Virtual, &tmp, true );
788 
789  aCfg->Read( keyShowZones, &tmp, true );
790  m_settings.SetFlag( FL_ZONE, tmp );
791 
792  aCfg->Read( keyShowAdhesiveLayers, &tmp, true );
794 
795  aCfg->Read( keyShowSilkScreenLayers, &tmp, true );
797 
798  aCfg->Read( keyShowSolderMaskLayers, &tmp, true );
800 
801  aCfg->Read( keyShowSolderPasteLayers, &tmp, true );
803 
804  aCfg->Read( keyShowCommentsLayer, &tmp, true );
806 
807  aCfg->Read( keyShowEcoLayers, &tmp, true );
808  m_settings.SetFlag( FL_ECO, tmp );
809 
810  aCfg->Read( keyShowBoardBody, &tmp, true );
812 
813  int tmpi;
814  aCfg->Read( keyShowGrid, &tmpi, (int)GRID3D_NONE );
815  m_settings.GridSet( (GRID3D_TYPE)tmpi );
816 
817  aCfg->Read( keyRenderEngine, &tmpi, (int)RENDER_ENGINE_OPENGL_LEGACY );
819 
820  aCfg->Read( keyRenderMaterial, &tmpi, (int)MATERIAL_MODE_NORMAL );
822 }
static const wxChar keyShowSolderMaskLayers[]
static const wxChar keyShowFootprints_Normal[]
static const wxChar keyRenderRAY_ProceduralT[]
static const wxChar keyShowGrid[]
static const wxChar keyShowBoardBody[]
static const wxChar keyRenderRAY_Reflections[]
static const wxChar keyRenderRemoveHoles[]
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
static const wxChar keyBgColor_Red_Top[]
static const wxChar keySilkColor_Blue[]
static const wxChar keyMousewheelPanning[]
static const wxChar keyBgColor_Blue_Top[]
void GridSet(GRID3D_TYPE aGridType)
GridSet - set the current grid.
Definition: cinfo3d_visu.h:222
static const wxChar keyRenderEngine[]
static const wxChar keyBgColor_Red[]
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:509
static const wxChar keyShowFootprints_Insert[]
static const wxChar keyCopperColor_Green[]
static const wxChar keyShowFootprints_Virtual[]
static const wxChar keyShowAdhesiveLayers[]
static const wxChar keySilkColor_Green[]
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:503
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:504
void MaterialModeSet(MATERIAL_MODE aMaterialMode)
MaterialModeSet.
Definition: cinfo3d_visu.h:240
static const wxChar keyShowRealisticMode[]
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:505
static const wxChar keyCopperColor_Blue[]
static const wxChar keySMaskColor_Green[]
static const wxChar keyBgColor_Green_Top[]
static const wxChar keyShowSolderPasteLayers[]
void RenderEngineSet(RENDER_ENGINE aRenderEngine)
RenderEngineSet.
Definition: cinfo3d_visu.h:228
static const wxChar keySPasteColor_Red[]
static const wxChar keyShowSilkScreenLayers[]
static const wxChar keyCopperColor_Red[]
static const wxChar keyShowZones[]
static const wxChar keyRenderMaterial[]
static const wxChar keyRenderRAY_AAliasing[]
virtual void LoadSettings(wxConfigBase *aCfg)
Function LoadSettings loads common frame parameters from a configuration file.
Definition: basicframe.cpp:256
static const wxChar keyBgColor_Green[]
static const wxChar keyBoardBodyColor_Blue[]
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:91
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:507
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:506
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:72
static const wxChar keyRenderOGL_ShowModelBBox[]
static const wxChar keySPasteColor_Green[]
Use all material properties from model file.
Definition: 3d_enums.h:93
static const wxChar keyBoardBodyColor_Red[]
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:508
static const wxChar keySilkColor_Red[]
static const wxChar keyBgColor_Blue[]
static const wxChar keySMaskColor_Red[]
static const wxChar keyRenderRAY_Refractions[]
static const wxChar keyRenderOGL_ShowCopperTck[]
static const wxChar keyRenderRAY_Backfloor[]
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
static const wxChar keySMaskColor_Blue[]
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:83
static const wxChar keyBoardBodyColor_Green[]
static const wxChar keyShowAxis[]
static const wxChar keySPasteColor_Blue[]
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
static const wxChar keyShowEcoLayers[]
static const wxChar keyShowCommentsLayer[]
static const wxChar keyRenderRAY_Shadows[]
static const wxChar keyRenderRAY_PostProcess[]
void EDA_3D_VIEWER::On3DGridSelection ( wxCommandEvent &  event)
private

Definition at line 549 of file eda_3d_viewer.cpp.

References GRID3D_10MM, GRID3D_1MM, GRID3D_2P5MM, GRID3D_5MM, GRID3D_NONE, CINFO3D_VISU::GridSet(), ID_MENU3D_GRID, ID_MENU3D_GRID_10_MM, ID_MENU3D_GRID_1_MM, ID_MENU3D_GRID_2P5_MM, ID_MENU3D_GRID_5_MM, ID_MENU3D_GRID_END, ID_MENU3D_GRID_NOGRID, m_canvas, m_logTrace, m_settings, and EDA_3D_CANVAS::Request_refresh().

550 {
551  int id = event.GetId();
552 
553  wxASSERT( id < ID_MENU3D_GRID_END );
554  wxASSERT( id > ID_MENU3D_GRID );
555 
556  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::On3DGridSelection id:%d" ), id );
557 
558  switch( id )
559  {
562  break;
563 
566  break;
567 
568  case ID_MENU3D_GRID_5_MM:
570  break;
571 
574  break;
575 
576  case ID_MENU3D_GRID_1_MM:
578  break;
579 
580  default:
581  wxLogMessage( wxT( "EDA_3D_VIEWER::On3DGridSelection() error: unknown command %d" ), id );
582  return;
583  }
584 
585  if( m_canvas )
587 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
void GridSet(GRID3D_TYPE aGridType)
GridSet - set the current grid.
Definition: cinfo3d_visu.h:222
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
EDA_3D_VIEWER::Process_Special_Functions ID_MENU3D_GRID_END
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_3D_VIEWER::OnActivate ( wxActivateEvent &  event)
private

Definition at line 669 of file eda_3d_viewer.cpp.

References EDA_3D_CANVAS::IsReloadRequestPending(), m_canvas, m_logTrace, and EDA_3D_CANVAS::Request_refresh().

670 {
671  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnActivate" ) );
672 
673  if( m_canvas )
674  {
675  // Reload data if 3D frame shows a board,
676  // because it can be changed since last frame activation
679 
680  // Activates again the focus of the canvas so it will catch mouse and key events
681  m_canvas->SetFocus();
682  }
683 
684  event.Skip(); // required under wxMAC
685 }
bool IsReloadRequestPending() const
IsReloadRequestPending - Query if there is a pending reload request.
Definition: eda_3d_canvas.h:82
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_BASE_FRAME::onAutoSaveTimer ( wxTimerEvent &  aEvent)
protectedinherited

Function onAutoSaveTimer handles the auto save timer event.

Definition at line 224 of file basicframe.cpp.

References EDA_BASE_FRAME::doAutoSave(), EDA_BASE_FRAME::m_autoSaveInterval, and EDA_BASE_FRAME::m_autoSaveTimer.

Referenced by EDA_BASE_FRAME::EDA_BASE_FRAME().

225 {
226  if( !doAutoSave() )
227  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
228 }
virtual bool doAutoSave()
Function doAutoSave should be overridden by the derived class to handle the auto save feature...
Definition: basicframe.cpp:231
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
Definition: wxstruct.h:151
int m_autoSaveInterval
The auto save interval time in seconds.
Definition: wxstruct.h:148
void KIWAY_PLAYER::OnChangeIconsOptions ( wxCommandEvent &  event)
overrideprotectedvirtualinherited

Function OnChangeIconsOptions is an event handler called on a icons options in menus or toolbars menu selection.

Reimplemented from EDA_BASE_FRAME.

Definition at line 211 of file kiway_player.cpp.

References KIWAY_HOLDER::Kiway(), EDA_BASE_FRAME::OnChangeIconsOptions(), and KIWAY::ShowChangedIcons().

212 {
215 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
virtual void OnChangeIconsOptions(wxCommandEvent &event)
Function OnChangeIconsOptions Selects the current icons options in menus (or toolbars) in Kicad (the ...
Definition: basicframe.cpp:660
VTBL_ENTRY void ShowChangedIcons()
Function ShowChangedIcons Calls ShowChangedIcons() on all KIWAY_PLAYERs.
Definition: kiway.cpp:432
void EDA_3D_VIEWER::OnCloseWindow ( wxCloseEvent &  event)
private

Definition at line 247 of file eda_3d_viewer.cpp.

References KIWAY_PLAYER::Destroy(), m_canvas, and m_logTrace.

248 {
249  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnCloseWindow" ) );
250 
251  if( m_canvas )
252  m_canvas->Close();
253 
254  // m_canvas delete will be called by wxWidget manager
255  //delete m_canvas;
256  //m_canvas = 0;
257 
258  Destroy();
259  event.Skip( true );
260 }
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
void EDA_3D_VIEWER::OnLeftClick ( wxDC *  DC,
const wxPoint MousePos 
)
private

Definition at line 900 of file eda_3d_viewer.cpp.

References m_logTrace.

901 {
902  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnLeftClick" ) );
903  // Do nothing
904 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_3D_VIEWER::OnRenderEngineSelection ( wxCommandEvent &  event)
private

Definition at line 590 of file eda_3d_viewer.cpp.

References ID_MENU3D_ENGINE, ID_MENU3D_ENGINE_END, ID_MENU3D_ENGINE_OPENGL_LEGACY, ID_MENU3D_ENGINE_RAYTRACING, m_logTrace, m_settings, RENDER_ENGINE_OPENGL_LEGACY, RENDER_ENGINE_RAYTRACING, RenderEngineChanged(), CINFO3D_VISU::RenderEngineGet(), and CINFO3D_VISU::RenderEngineSet().

591 {
592  int id = event.GetId();
593 
594  wxASSERT( id < ID_MENU3D_ENGINE_END );
595  wxASSERT( id > ID_MENU3D_ENGINE );
596 
597  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnRenderEngineSelection id:%d" ), id );
598 
599  const RENDER_ENGINE old_engine = m_settings.RenderEngineGet();
600 
601  switch( id )
602  {
604  if( old_engine != RENDER_ENGINE_OPENGL_LEGACY )
606  break;
607 
609  if( old_engine != RENDER_ENGINE_RAYTRACING )
611  break;
612 
613  default:
614  wxLogMessage( wxT( "EDA_3D_VIEWER::OnRenderEngineSelection() error: unknown command %d" ), id );
615  return;
616  }
617 
618  if( old_engine != m_settings.RenderEngineGet() )
619  {
621  }
622 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
void RenderEngineSet(RENDER_ENGINE aRenderEngine)
RenderEngineSet.
Definition: cinfo3d_visu.h:228
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
void RenderEngineChanged()
RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:83
void EDA_3D_VIEWER::OnRightClick ( const wxPoint MousePos,
wxMenu *  PopMenu 
)
private

Definition at line 907 of file eda_3d_viewer.cpp.

References m_logTrace.

908 {
909  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnRightClick" ) );
910  // Do nothing
911 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_BASE_FRAME::OnSelectPreferredEditor ( wxCommandEvent &  event)
virtualinherited

Function OnSelectPreferredEditor Open a dialog to select the editor that will used in KiCad to edit or display files (reports ...

) The full filename editor is saved in configuration (global params)

Definition at line 497 of file basicframe.cpp.

References PGM_BASE::AskUserForPreferredEditor(), PGM_BASE::GetEditorName(), Pgm(), and PGM_BASE::SetEditorName().

498 {
499  // Ask for the current editor and instruct GetEditorName() to not show
500  // unless we pass false as argument.
501  wxString editorname = Pgm().GetEditorName( false );
502 
503  // Ask the user to select a new editor, but suggest the current one as the default.
504  editorname = Pgm().AskUserForPreferredEditor( editorname );
505 
506  // If we have a new editor name request it to be copied to m_editor_name and saved
507  // to the preferences file. If the user cancelled the dialog then the previous
508  // value will be retained.
509  if( !editorname.IsEmpty() )
510  Pgm().SetEditorName( editorname );
511 }
VTBL_ENTRY void SetEditorName(const wxString &aFileName)
Definition: pgm_base.cpp:328
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
VTBL_ENTRY const wxString AskUserForPreferredEditor(const wxString &aDefaultEditor=wxEmptyString)
Shows a dialog that instructs the user to select a new preferred editor.
Definition: pgm_base.cpp:373
VTBL_ENTRY const wxString & GetEditorName(bool aCanShowFileChooser=true)
Return the preferred editor name.
Definition: pgm_base.cpp:336
void EDA_3D_VIEWER::OnSetFocus ( wxFocusEvent &  event)
private

Definition at line 688 of file eda_3d_viewer.cpp.

References m_canvas.

689 {
690  // Activates again the focus of the canvas so it will catch mouse and key events
691  if( m_canvas )
692  m_canvas->SetFocus();
693 
694  event.Skip();
695 }
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void EDA_3D_VIEWER::OnUpdateMenus ( wxUpdateUIEvent &  event)
private

TODO: verify how many times this event is called and check if that is OK

Definition at line 625 of file eda_3d_viewer.cpp.

References SetMenuBarOptionsState().

626 {
628  // to have it working this way
630 }
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:414
VTBL_ENTRY bool KIWAY_PLAYER::OpenProjectFiles ( const std::vector< wxString > &  aFileList,
int  aCtl = 0 
)
inlineinherited

Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList.

This is generalized in the direction of worst case. In a typical case aFileList will only hold a single file, like "myboard.kicad_pcb", because any KIWAY_PLAYER is only in one KIWAY and the KIWAY owns the PROJECT. Therefore opening files from multiple projects into the same KIWAY_PLAYER is precluded.

Each derived class should handle this in a way specific to its needs. No filename prompting is done inside here for any file or project. There should be no need to call this with aFileList which is empty. However, calling it with a single filename which does not exist should indicate to the implementor that a new session is being started and that the given name is the desired name for the data file at time of save.

This function does not support "appending". Use a different function for that. Any prior project data tree should be cleared before loading the new stuff.

Therefore, one of the first things an implementation should do is test for existence of the first file in the list, and if it does not exist, treat it as a new session, possibly with a UI notification to that effect.

After loading the window should update its Title as part of this operation. If the KIWAY_PLAYER needs to, it can load the *.pro file as part of this operation.

If the KIWAY_PLAYER cannot load any of the file(s) in the list, then it should say why through some GUI interface, and return false.

Parameters
aFileListincludes files that this frame should open according to the knowledge in the derived wxFrame. In almost every case, the list will have only a single file in it.
aCtlis a set of bit flags ORed together from the set of KICTL_* #defined above.
Returns
bool - true if all requested files were opened OK, else false.

Definition at line 170 of file kiway_player.h.

Referenced by PGM_SINGLE_TOP::MacOpenFile(), SCH_EDIT_FRAME::OnOpenPcbnew(), PGM_SINGLE_TOP::OnPgmInit(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OnUpdatePCBFromSch(), KICAD_MANAGER_FRAME::RunEeschema(), and KICAD_MANAGER_FRAME::RunPcbNew().

171  {
172  // overload me for your wxFrame type.
173 
174  // Any overload should probably do this also:
175  // Prj().MaybeLoadProjectSettings();
176 
177  // Then update the window title.
178 
179  return false;
180  }
PCB_BASE_FRAME* EDA_3D_VIEWER::Parent ( ) const
inline

Definition at line 62 of file eda_3d_viewer.h.

Referenced by GetBoard(), and takeScreenshot().

62 { return (PCB_BASE_FRAME*)GetParent(); }
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
bool EDA_BASE_FRAME::PostCommandMenuEvent ( int  evt_type)
inherited

Function PostCommandMenuEvent.

Post a menu event to the frame, which can be used to trigger actions bound to menu items.

Definition at line 645 of file basicframe.cpp.

Referenced by FOOTPRINT_EDIT_FRAME::OnHotKey(), FOOTPRINT_EDIT_FRAME::OnHotkeyDeleteItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyDuplicateItem(), PCB_EDIT_FRAME::OnHotkeyDuplicateOrArrayItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItemExact(), and FOOTPRINT_EDIT_FRAME::OnHotkeyRotateItem().

646 {
647  if( evt_type != 0 )
648  {
649  wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED );
650  evt.SetEventObject( this );
651  evt.SetId( evt_type );
652  wxPostEvent( this, evt );
653  return true;
654  }
655 
656  return false;
657 }
void EDA_BASE_FRAME::PrintMsg ( const wxString &  text)
inherited

Definition at line 382 of file basicframe.cpp.

Referenced by SCH_EDIT_FRAME::LoadOneEEFile(), and EDA_DRAW_PANEL::OnMouseEvent().

383 {
384  SetStatusText( text );
385 }
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Function Prj returns a reference to the PROJECT "associated with" this KIWAY.

Definition at line 34 of file kiway_holder.cpp.

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), LIB_VIEW_FRAME::BestZoom(), DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile(), DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_MODULE_MODULE_EDITOR::Cfg3DPath(), DIALOG_MODULE_BOARD_EDITOR::Cfg3DPath(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_SCREEN::CheckComponentsToPartsLinks(), SCH_EDIT_FRAME::ConvertPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), SCH_EDIT_FRAME::CreateArchiveLibrary(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), LIB_EDIT_FRAME::DeleteOnePart(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG(), DIALOG_FP_LIB_TABLE::DIALOG_FP_LIB_TABLE(), DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD(), LIB_VIEW_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName(), DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName(), SCH_EDIT_FRAME::EditComponentFieldText(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportToGenCAD(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), LIB_EDIT_FRAME::GetCurPart(), FOOTPRINT_EDIT_FRAME::GetCurrentLib(), FOOTPRINT_EDIT_FRAME::getLibPath(), DIALOG_BOM::getPluginFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::InitBuffers(), DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), LIB_EDIT_FRAME::InstallConfigFrame(), SCH_EDIT_FRAME::InstallConfigFrame(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), CVPCB_MAINFRAME::LoadFootprintFiles(), SCH_EDIT_FRAME::LoadOneEEFile(), LIB_EDIT_FRAME::LoadOneLibraryPart(), LIB_EDIT_FRAME::LoadOneSymbol(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), LIB_EDIT_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), DIALOG_GENDRILL::OnGenReportFile(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_MODULE_POSITION::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), DIALOG_NETLIST::OnSaveMessagesToFile(), SCH_EDIT_FRAME::OnSaveProject(), DIALOG_SPICE_MODEL::onSelectIcLib(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OnSelectUnit(), DIALOG_SPICE_MODEL::onSemiSelectLib(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_EDITOR_CONTROL::PlaceModule(), SCH_EDIT_FRAME::prepareForNetlist(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndLinkFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), LIB_VIEW_FRAME::RedrawActiveWindow(), ReloadRequest(), SCH_EDIT_FRAME::RescueProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_SCREEN::Save(), LIB_EDIT_FRAME::SaveActiveLibrary(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibrary(), FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), takeScreenshot(), DIALOG_ERC::TestErc(), DIALOG_SPICE_MODEL::updateFromFile(), SIM_PLOT_FRAME::updateNetlistExporter(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), CVPCB_MAINFRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR(), and DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR().

35 {
36  return Kiway().Prj();
37 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:144
void EDA_3D_VIEWER::Process_Special_Functions ( wxCommandEvent &  event)
private

Definition at line 264 of file eda_3d_viewer.cpp.

References CINFO3D_VISU::CameraGet(), DisplayHotKeys(), FL_ADHESIVE, FL_AXIS, FL_COMMENTS, FL_ECO, FL_MODULE_ATTRIBUTES_NORMAL, FL_MODULE_ATTRIBUTES_NORMAL_INSERT, FL_MODULE_ATTRIBUTES_VIRTUAL, FL_MOUSEWHEEL_PANNING, FL_RENDER_OPENGL_COPPER_THICKNESS, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_BACKFLOOR, FL_RENDER_RAYTRACING_POST_PROCESSING, FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, FL_RENDER_SHOW_HOLES_IN_ZONES, FL_SHOW_BOARD_BODY, FL_SILKSCREEN, FL_SOLDERMASK, FL_SOLDERPASTE, FL_USE_REALISTIC_MODE, FL_ZONE, ID_MENU3D_ADHESIVE_ONOFF, ID_MENU3D_AXIS_ONOFF, ID_MENU3D_BGCOLOR_BOTTOM_SELECTION, ID_MENU3D_BGCOLOR_TOP_SELECTION, ID_MENU3D_COMMENTS_ONOFF, ID_MENU3D_COPPER_COLOR_SELECTION, ID_MENU3D_ECO_ONOFF, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES, ID_MENU3D_FL_RAYTRACING_REFLECTIONS, ID_MENU3D_FL_RAYTRACING_REFRACTIONS, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS, ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE, ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY, ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL, ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES, ID_MENU3D_HELP_HOTKEY_SHOW_CURRENT_LIST, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL, ID_MENU3D_MOUSEWHEEL_PANNING, ID_MENU3D_PCB_BODY_COLOR_SELECTION, ID_MENU3D_REALISTIC_MODE, ID_MENU3D_RESET_DEFAULTS, ID_MENU3D_SHOW_BOARD_BODY, ID_MENU3D_SILKSCREEN_COLOR_SELECTION, ID_MENU3D_SILKSCREEN_ONOFF, ID_MENU3D_SOLDER_MASK_ONOFF, ID_MENU3D_SOLDER_PASTE_ONOFF, ID_MENU3D_SOLDERMASK_COLOR_SELECTION, ID_MENU3D_SOLDERPASTE_COLOR_SELECTION, ID_MENU3D_ZONE_ONOFF, ID_MENU_SCREENCOPY_JPEG, ID_MENU_SCREENCOPY_PNG, ID_MOVE3D_DOWN, ID_MOVE3D_LEFT, ID_MOVE3D_RIGHT, ID_MOVE3D_UP, ID_ORTHO, ID_RELOAD3D_BOARD, ID_RENDER_CURRENT_VIEW, ID_ROTATE3D_X_NEG, ID_ROTATE3D_X_POS, ID_ROTATE3D_Y_NEG, ID_ROTATE3D_Y_POS, ID_ROTATE3D_Z_NEG, ID_ROTATE3D_Z_POS, ID_TOOL_SCREENCOPY_TOCLIBBOARD, LoadSettings(), CINFO3D_VISU::m_BgColorBot, CINFO3D_VISU::m_BgColorTop, m_canvas, m_logTrace, m_settings, MATERIAL_MODE_CAD_MODE, MATERIAL_MODE_DIFFUSE_ONLY, MATERIAL_MODE_NORMAL, CINFO3D_VISU::MaterialModeSet(), ReloadRequest(), RENDER_ENGINE_OPENGL_LEGACY, RenderEngineChanged(), CINFO3D_VISU::RenderEngineGet(), EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), ROT_ANGLE, CCAMERA::RotateX(), CCAMERA::RotateY(), CCAMERA::RotateZ(), Set3DBoardBodyColorFromUser(), Set3DColorFromUser(), Set3DCopperColorFromUser(), Set3DSilkScreenColorFromUser(), Set3DSolderMaskColorFromUser(), Set3DSolderPasteColorFromUser(), CINFO3D_VISU::SetFlag(), SetMenuBarOptionsState(), EDA_3D_CANVAS::SetView3D(), takeScreenshot(), and CCAMERA::ToggleProjection().

265 {
266  int id = event.GetId();
267  bool isChecked = event.IsChecked();
268 
269  wxLogTrace( m_logTrace,
270  wxT( "EDA_3D_VIEWER::Process_Special_Functions id:%d isChecked:%d" ),
271  id, isChecked );
272 
273  if( m_canvas == NULL )
274  return;
275 
276  switch( id )
277  {
280  break;
281 
282  case ID_RELOAD3D_BOARD:
283  ReloadRequest();
285  break;
286 
287  case ID_ROTATE3D_X_POS:
288  m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) );
290  break;
291 
292  case ID_ROTATE3D_X_NEG:
293  m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) );
295  break;
296 
297  case ID_ROTATE3D_Y_POS:
298  m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) );
300  break;
301 
302  case ID_ROTATE3D_Y_NEG:
303  m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) );
305  break;
306 
307  case ID_ROTATE3D_Z_POS:
308  m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) );
310  break;
311 
312  case ID_ROTATE3D_Z_NEG:
313  m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) );
315  break;
316 
317  case ID_MOVE3D_LEFT:
318  m_canvas->SetView3D( WXK_LEFT );
319  return;
320 
321  case ID_MOVE3D_RIGHT:
322  m_canvas->SetView3D( WXK_RIGHT );
323  return;
324 
325  case ID_MOVE3D_UP:
326  m_canvas->SetView3D( WXK_UP );
327  return;
328 
329  case ID_MOVE3D_DOWN:
330  m_canvas->SetView3D( WXK_DOWN );
331  return;
332 
333  case ID_ORTHO:
336  return;
337 
341  takeScreenshot( event );
342  return;
343 
345  if( Set3DColorFromUser( m_settings.m_BgColorBot, _( "Background Color, Bottom" ) ) )
346  {
349  else
350  ReloadRequest();
351  }
352  return;
353 
355  if( Set3DColorFromUser( m_settings.m_BgColorTop, _( "Background Color, Top" ) ) )
356  {
359  else
360  ReloadRequest();
361  }
362  return;
363 
366  return;
367 
370  return;
371 
374  return;
375 
378  break;
379 
382  break;
383 
386  break;
387 
391  ReloadRequest( );
392  return;
393 
396  ReloadRequest();
397  return;
398 
401  ReloadRequest( );
402  return;
403 
406  ReloadRequest( );
407  return;
408 
411  ReloadRequest( );
412  return;
413 
416  ReloadRequest();
417  return;
418 
422  return;
423 
427  return;
428 
431  ReloadRequest( );
432  return;
433 
436  ReloadRequest( );
437  return;
438 
442  return;
443 
447  return;
448 
451  ReloadRequest( );
452  return;
453 
457  return;
458 
460  m_settings.SetFlag( FL_SHOW_BOARD_BODY, isChecked );
461  ReloadRequest( );
462  return;
463 
465  m_settings.SetFlag( FL_AXIS, isChecked );
467  return;
468 
471  ReloadRequest( );
472  return;
473 
476  ReloadRequest( );
477  return;
478 
481  ReloadRequest( );
482  return;
483 
485  m_settings.SetFlag( FL_ZONE, isChecked );
486  ReloadRequest( );
487  return;
488 
490  m_settings.SetFlag( FL_ADHESIVE, isChecked );
491  ReloadRequest( );
492  return;
493 
495  m_settings.SetFlag( FL_SILKSCREEN, isChecked );
496  ReloadRequest( );
497  return;
498 
500  m_settings.SetFlag( FL_SOLDERMASK, isChecked );
501  ReloadRequest( );
502  return;
503 
505  m_settings.SetFlag( FL_SOLDERPASTE, isChecked );
506  ReloadRequest( );
507  return;
508 
510  m_settings.SetFlag( FL_COMMENTS, isChecked );
511  ReloadRequest( );
512  return;
513 
514  case ID_MENU3D_ECO_ONOFF:
515  m_settings.SetFlag( FL_ECO, isChecked );
516  ReloadRequest( );
517  return;
518 
520  {
521  // Reload settings with a dummy config, so it will load the defaults
522  wxConfig *fooconfig = new wxConfig("FooBarApp");
523  LoadSettings( fooconfig );
524  delete fooconfig;
525 
526  // Refresh menu option state
528 
529  // Tell canvas that we (may) changed the render engine
531 
532  ReloadRequest();
533  }
534  return;
535 
537  {
538  DisplayHotKeys();
539  }
540  return;
541 
542  default:
543  wxLogMessage( wxT( "EDA_3D_VIEWER::Process_Special_Functions() error: unknown command %d" ), id );
544  return;
545  }
546 }
bool Set3DCopperColorFromUser()
Function Set3DCopperColorFromUser Set the copper color from a set of colors.
Use only diffuse material properties.
Definition: 3d_enums.h:94
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
bool Set3DSolderMaskColorFromUser()
Function Set3DSolderMaskColorFromUser Set the solder mask color from a set of colors.
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:414
void RotateY(float aAngleInRadians)
Definition: ccamera.cpp:503
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:503
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:504
void MaterialModeSet(MATERIAL_MODE aMaterialMode)
MaterialModeSet.
Definition: cinfo3d_visu.h:240
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void RotateZ(float aAngleInRadians)
Definition: ccamera.cpp:510
void RotateX(float aAngleInRadians)
Definition: ccamera.cpp:496
void RenderRaytracingRequest()
RenderRaytracingRequest - Request to render the current view in Raytracing mode.
bool Set3DSilkScreenColorFromUser()
Function Set3DSilkScreenColorFromUser Set the silkscreen color from a set of colors.
void ToggleProjection()
Definition: ccamera.cpp:417
Use a gray shading based on diffuse material.
Definition: 3d_enums.h:95
bool Set3DSolderPasteColorFromUser()
Function Set3DSolderPasteColorFromUser Set the solder mask color from a set of colors.
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
void RenderEngineChanged()
RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged.
Use all material properties from model file.
Definition: 3d_enums.h:93
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
CCAMERA & CameraGet() const
CameraGet - get current camera in use.
Definition: cinfo3d_visu.h:210
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
#define ROT_ANGLE
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
bool Set3DBoardBodyColorFromUser()
Function Set3DBoardBodyBodyColorFromUser Set the copper color from a set of colors.
void takeScreenshot(wxCommandEvent &event)
Function TakeScreenshot Create a Screenshot of the current 3D view.
bool EDA_BASE_FRAME::ProcessEvent ( wxEvent &  aEvent)
overrideinherited

Function ProcessEvent overrides the default process event handler to implement the auto save feature.

Warning
If you override this function in a derived class, make sure you call down to this or the auto save feature will be disabled.

Definition at line 166 of file basicframe.cpp.

References EDA_BASE_FRAME::isAutoSaveRequired(), EDA_BASE_FRAME::m_autoSaveInterval, EDA_BASE_FRAME::m_autoSaveState, EDA_BASE_FRAME::m_autoSaveTimer, EDA_BASE_FRAME::m_hasAutoSave, and traceAutoSave.

Referenced by LIB_VIEW_FRAME::onSelectNextSymbol(), LIB_VIEW_FRAME::onSelectPreviousSymbol(), KIWAY::ProcessEvent(), LIB_VIEW_FRAME::ReCreateListCmp(), and PCBNEW_CONTROL::SwitchUnits().

167 {
168  if( !wxFrame::ProcessEvent( aEvent ) )
169  return false;
170 
171  if( IsShown() && m_hasAutoSave &&
173  {
174  if( !m_autoSaveState )
175  {
176  wxLogTrace( traceAutoSave, wxT( "Starting auto save timer." ) );
177  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
178  m_autoSaveState = true;
179  }
180  else if( m_autoSaveTimer->IsRunning() )
181  {
182  wxLogTrace( traceAutoSave, wxT( "Stopping auto save timer." ) );
183  m_autoSaveTimer->Stop();
184  m_autoSaveState = false;
185  }
186  }
187 
188  return true;
189 }
bool m_autoSaveState
Flag to indicate the last auto save state.
Definition: wxstruct.h:145
const wxChar traceAutoSave[]
Custom trace mask to enable and disable auto save tracing.
Definition: basicframe.cpp:53
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
Definition: wxstruct.h:151
virtual bool isAutoSaveRequired() const
Function autoSaveRequired returns the auto save status of the application.
Definition: wxstruct.h:168
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
Definition: wxstruct.h:142
int m_autoSaveInterval
The auto save interval time in seconds.
Definition: wxstruct.h:148
void EDA_3D_VIEWER::ProcessZoom ( wxCommandEvent &  event)
private

Definition at line 633 of file eda_3d_viewer.cpp.

References EDA_3D_CANVAS::DisplayStatus(), ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, m_canvas, m_logTrace, EDA_3D_CANVAS::Request_refresh(), and EDA_3D_CANVAS::SetView3D().

634 {
635  int id = event.GetId();
636 
637  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::ProcessZoom id:%d" ), id );
638 
639  if( m_canvas == NULL )
640  return;
641 
642  switch( id )
643  {
644  case ID_ZOOM_PAGE:
645  m_canvas->SetView3D( WXK_HOME );
646  break;
647 
648  case ID_ZOOM_IN:
649  m_canvas->SetView3D( WXK_F1 );
650  break;
651 
652  case ID_ZOOM_OUT:
653  m_canvas->SetView3D( WXK_F2 );
654  break;
655 
656  case ID_ZOOM_REDRAW:
658  break;
659 
660  default:
661  wxLogMessage( wxT( "EDA_3D_VIEWER::ProcessZoom() error: unknown command %d" ), id );
662  return;
663  }
664 
666 }
Definition: id.h:232
void DisplayStatus()
DisplayStatus - Update the status bar with the position information.
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
int EDA_BASE_FRAME::ReadHotkeyConfig ( struct EDA_HOTKEY_CONFIG aDescList)
inherited

Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys.

Parameters
aDescList= current hotkey list descr. to initialize.

Definition at line 658 of file hotkeys_basic.cpp.

659 {
660  ::ReadHotkeyConfig( GetName(), aDescList );
661  return 1;
662 }
int ReadHotkeyConfig(struct EDA_HOTKEY_CONFIG *aDescList)
Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys...
int EDA_BASE_FRAME::ReadHotkeyConfigFile ( const wxString &  aFilename,
struct EDA_HOTKEY_CONFIG aDescList 
)
inherited

Function ReadHotkeyConfigFile Read an old configuration file (&ltfile&gt.key) and fill the current hotkey list with hotkeys.

Parameters
aFilename= file name to read.
aDescList= current hotkey list descr. to initialize.

Definition at line 601 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, and ParseHotkeyConfig().

Referenced by EDA_BASE_FRAME::ImportHotkeyConfigFromFile().

603 {
604  wxFileName fn( aFilename );
605  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
606 
607  wxFile cfgfile( fn.GetFullPath() );
608 
609  if( !cfgfile.IsOpened() ) // There is a problem to open file
610  return 0;
611 
612  // get length
613  cfgfile.SeekEnd();
614  wxFileOffset size = cfgfile.Tell();
615  cfgfile.Seek( 0 );
616 
617  // read data
618  char* buffer = new char[size];
619  cfgfile.Read( buffer, size );
620 
621  wxString data( buffer, wxConvUTF8 );
622 
623  // parse
624  ParseHotkeyConfig( data, aDescList );
625 
626  // cleanup
627  delete[] buffer;
628  cfgfile.Close();
629  return 1;
630 }
void ParseHotkeyConfig(const wxString &data, struct EDA_HOTKEY_CONFIG *aDescList)
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
void EDA_3D_VIEWER::ReCreateMainToolbar ( )
private

Definition at line 39 of file 3d_toolbar.cpp.

References ID_H_TOOLBAR, ID_MOVE3D_DOWN, ID_MOVE3D_LEFT, ID_MOVE3D_RIGHT, ID_MOVE3D_UP, ID_ORTHO, ID_RELOAD3D_BOARD, ID_RENDER_CURRENT_VIEW, ID_ROTATE3D_X_NEG, ID_ROTATE3D_X_POS, ID_ROTATE3D_Y_NEG, ID_ROTATE3D_Y_POS, ID_ROTATE3D_Z_NEG, ID_ROTATE3D_Z_POS, ID_TOOL_SCREENCOPY_TOCLIBBOARD, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, KiBitmap(), m_logTrace, EDA_BASE_FRAME::m_mainToolBar, and SetToolbars().

40 {
41  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::ReCreateMainToolbar" ) );
42 
43  if( m_mainToolBar != NULL )
44  {
45  // Simple update to the list of old files.
46  SetToolbars();
47  return;
48  }
49 
50  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
51  wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT );
52 
53  // Set up toolbar
54  m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
55  KiBitmap( import3d_xpm ), _( "Reload board" ) );
56 
57  m_mainToolBar->AddSeparator();
58 
59  m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
60  KiBitmap( copy_button_xpm ),
61  _( "Copy 3D image to clipboard" ) );
62 
63  m_mainToolBar->AddSeparator();
64 
65  m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
66  KiBitmap( render_mode_xpm ),
67  _( "Render current view using Raytracing" ) );
68 
69  m_mainToolBar->AddSeparator();
70 
71  m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
72  _( "Zoom in" ) );
73 
74  m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
75  _( "Zoom out" ) );
76 
77  m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
78  KiBitmap( zoom_redraw_xpm ),
79  _( "Redraw view" ) );
80 
81  m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
82  _( "Fit in page" ) );
83 
84  m_mainToolBar->AddSeparator();
85  m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
86  KiBitmap( rotate_neg_x_xpm ),
87  _( "Rotate X <-" ) );
88 
89  m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
90  KiBitmap( rotate_pos_x_xpm ),
91  _( "Rotate X ->" ) );
92 
93  m_mainToolBar->AddSeparator();
94  m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
95  KiBitmap( rotate_neg_y_xpm ),
96  _( "Rotate Y <-" ) );
97 
98  m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
99  KiBitmap( rotate_pos_y_xpm ),
100  _( "Rotate Y ->" ) );
101 
102  m_mainToolBar->AddSeparator();
103  m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
104  KiBitmap( rotate_neg_z_xpm ),
105  _( "Rotate Z <-" ) );
106 
107  m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
108  KiBitmap( rotate_pos_z_xpm ),
109  _( "Rotate Z ->" ) );
110 
111  m_mainToolBar->AddSeparator();
112  m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
113  _( "Move left" ) );
114 
115  m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
116  _( "Move right" ) );
117 
118  m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
119  _( "Move up" ) );
120 
121  m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
122  _( "Move down" ) );
123 
124  m_mainToolBar->AddSeparator();
125  m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
126  _( "Enable/Disable orthographic projection" ),
127  wxITEM_CHECK );
128 
129  m_mainToolBar->Realize();
130 }
Definition: id.h:232
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:135
void SetToolbars()
Definition: 3d_toolbar.cpp:526
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_BASE_FRAME::ReCreateMenuBar ( void  )
virtualinherited
void EDA_3D_VIEWER::RedrawActiveWindow ( wxDC *  DC,
bool  EraseBg 
)
private

Definition at line 914 of file eda_3d_viewer.cpp.

References m_logTrace.

915 {
916  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::RedrawActiveWindow" ) );
917  // Do nothing
918 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_3D_VIEWER::ReloadRequest ( )

Definition at line 227 of file eda_3d_viewer.cpp.

References GetBoard(), m_canvas, KIWAY_HOLDER::Prj(), and EDA_3D_CANVAS::ReloadRequest().

Referenced by NewDisplay(), FOOTPRINT_EDIT_FRAME::OnModify(), PCB_EDIT_FRAME::OnModify(), Process_Special_Functions(), FOOTPRINT_VIEWER_FRAME::Update3D_Frame(), and FOOTPRINT_WIZARD_FRAME::Update3D_Frame().

228 {
229  // This will schedule a request to load later
230  if( m_canvas )
231  m_canvas->ReloadRequest( GetBoard(), Prj().Get3DCacheManager() );
232 
233  // This function is used by moduleframe.cpp
234  // while editing the pcb board, so it will not redraw to not slow the pcbnew
235  //m_canvas->Refresh();
236 }
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
BOARD * GetBoard()
Definition: eda_3d_viewer.h:64
void EDA_3D_VIEWER::RenderEngineChanged ( )
private

RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged.

Definition at line 997 of file eda_3d_viewer.cpp.

References ID_RENDER_CURRENT_VIEW, m_canvas, EDA_BASE_FRAME::m_mainToolBar, m_settings, RENDER_ENGINE_OPENGL_LEGACY, EDA_3D_CANVAS::RenderEngineChanged(), and CINFO3D_VISU::RenderEngineGet().

Referenced by OnRenderEngineSelection(), and Process_Special_Functions().

998 {
999  if( m_canvas )
1001 
1004 
1005  m_mainToolBar->Refresh();
1006 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void RenderEngineChanged()
RenderEngineChanged - Notify that the render engine was changed.
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:135
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
virtual void EDA_BASE_FRAME::SaveProjectSettings ( bool  aAskForSave)
inlinevirtualinherited

Function SaveProjectSettings saves changes to the project settings to the project (.pro) file.

The method is virtual so you can override it to call the suitable save method. The base method do nothing

Parameters
aAskForSave= true to open a dialog before saving the settings

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 269 of file wxstruct.h.

Referenced by DIALOG_PAGES_SETTINGS::OnOkClick().

269 {};
void EDA_3D_VIEWER::SaveSettings ( wxConfigBase *  aCfg)
overrideprivatevirtual

Function SaveSettings saves common frame parameters to a configuration data file.

Don't forget to call the base class's SaveSettings() from your derived SaveSettings() otherwise the frames won't remember their positions and sizes.

Reimplemented from EDA_BASE_FRAME.

Definition at line 825 of file eda_3d_viewer.cpp.

References FL_ADHESIVE, FL_AXIS, FL_COMMENTS, FL_ECO, FL_MODULE_ATTRIBUTES_NORMAL, FL_MODULE_ATTRIBUTES_NORMAL_INSERT, FL_MODULE_ATTRIBUTES_VIRTUAL, FL_MOUSEWHEEL_PANNING, FL_RENDER_OPENGL_COPPER_THICKNESS, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_BACKFLOOR, FL_RENDER_RAYTRACING_POST_PROCESSING, FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, FL_RENDER_SHOW_HOLES_IN_ZONES, FL_SHOW_BOARD_BODY, FL_SILKSCREEN, FL_SOLDERMASK, FL_SOLDERPASTE, FL_USE_REALISTIC_MODE, FL_ZONE, CINFO3D_VISU::GetFlag(), CINFO3D_VISU::GridGet(), keyBgColor_Blue, keyBgColor_Blue_Top, keyBgColor_Green, keyBgColor_Green_Top, keyBgColor_Red, keyBgColor_Red_Top, keyBoardBodyColor_Blue, keyBoardBodyColor_Green, keyBoardBodyColor_Red, keyCopperColor_Blue, keyCopperColor_Green, keyCopperColor_Red, keyMousewheelPanning, keyRenderEngine, keyRenderMaterial, keyRenderOGL_ShowCopperTck, keyRenderOGL_ShowModelBBox, keyRenderRAY_AAliasing, keyRenderRAY_Backfloor, keyRenderRAY_PostProcess, keyRenderRAY_ProceduralT, keyRenderRAY_Reflections, keyRenderRAY_Refractions, keyRenderRAY_Shadows, keyRenderRemoveHoles, keyShowAdhesiveLayers, keyShowAxis, keyShowBoardBody, keyShowCommentsLayer, keyShowEcoLayers, keyShowFootprints_Insert, keyShowFootprints_Normal, keyShowFootprints_Virtual, keyShowGrid, keyShowRealisticMode, keyShowSilkScreenLayers, keyShowSolderMaskLayers, keyShowSolderPasteLayers, keyShowZones, keySilkColor_Blue, keySilkColor_Green, keySilkColor_Red, keySMaskColor_Blue, keySMaskColor_Green, keySMaskColor_Red, keySPasteColor_Blue, keySPasteColor_Green, keySPasteColor_Red, CINFO3D_VISU::m_BgColorBot, CINFO3D_VISU::m_BgColorTop, CINFO3D_VISU::m_BoardBodyColor, CINFO3D_VISU::m_CopperColor, m_logTrace, m_settings, CINFO3D_VISU::m_SilkScreenColor, CINFO3D_VISU::m_SolderMaskColor, CINFO3D_VISU::m_SolderPasteColor, CINFO3D_VISU::MaterialModeGet(), CINFO3D_VISU::RenderEngineGet(), and EDA_BASE_FRAME::SaveSettings().

826 {
828 
829  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SaveSettings" ) );
830 
831  aCfg->Write( keyBgColor_Red, m_settings.m_BgColorBot.r );
832  aCfg->Write( keyBgColor_Green, m_settings.m_BgColorBot.g );
833  aCfg->Write( keyBgColor_Blue, m_settings.m_BgColorBot.b );
834 
835  aCfg->Write( keyBgColor_Red_Top, m_settings.m_BgColorTop.r );
836  aCfg->Write( keyBgColor_Green_Top, m_settings.m_BgColorTop.g );
837  aCfg->Write( keyBgColor_Blue_Top, m_settings.m_BgColorTop.b );
838 
842 
846 
850 
851  aCfg->Write( keyCopperColor_Red, m_settings.m_CopperColor.r );
853  aCfg->Write( keyCopperColor_Blue, m_settings.m_CopperColor.b );
854 
858 
860 
862 
863  aCfg->Write( keyRenderEngine, (int)m_settings.RenderEngineGet() );
864 
866 
867  aCfg->Write( keyRenderMaterial, (int)m_settings.MaterialModeGet() );
868 
869  // OpenGL options
872 
873  // Raytracing options
881 
882  aCfg->Write( keyShowAxis, m_settings.GetFlag( FL_AXIS ) );
883  aCfg->Write( keyShowGrid, (int)m_settings.GridGet() );
884 
888 
889  aCfg->Write( keyShowZones, m_settings.GetFlag( FL_ZONE ) );
895  aCfg->Write( keyShowEcoLayers, m_settings.GetFlag( FL_ECO ) );
897 }
static const wxChar keyShowSolderMaskLayers[]
static const wxChar keyShowFootprints_Normal[]
GRID3D_TYPE GridGet() const
GridGet - get the current grid.
Definition: cinfo3d_visu.h:216
static const wxChar keyRenderRAY_ProceduralT[]
static const wxChar keyShowGrid[]
static const wxChar keyShowBoardBody[]
static const wxChar keyRenderRAY_Reflections[]
static const wxChar keyRenderRemoveHoles[]
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
static const wxChar keyBgColor_Red_Top[]
MATERIAL_MODE MaterialModeGet() const
MaterialModeGet.
Definition: cinfo3d_visu.h:246
static const wxChar keySilkColor_Blue[]
static const wxChar keyMousewheelPanning[]
static const wxChar keyBgColor_Blue_Top[]
static const wxChar keyRenderEngine[]
static const wxChar keyBgColor_Red[]
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:509
static const wxChar keyShowFootprints_Insert[]
virtual void SaveSettings(wxConfigBase *aCfg)
Function SaveSettings saves common frame parameters to a configuration data file. ...
Definition: basicframe.cpp:316
static const wxChar keyCopperColor_Green[]
static const wxChar keyShowFootprints_Virtual[]
static const wxChar keyShowAdhesiveLayers[]
static const wxChar keySilkColor_Green[]
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:503
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:504
static const wxChar keyShowRealisticMode[]
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:505
static const wxChar keyCopperColor_Blue[]
static const wxChar keySMaskColor_Green[]
static const wxChar keyBgColor_Green_Top[]
static const wxChar keyShowSolderPasteLayers[]
static const wxChar keySPasteColor_Red[]
static const wxChar keyShowSilkScreenLayers[]
static const wxChar keyCopperColor_Red[]
static const wxChar keyShowZones[]
static const wxChar keyRenderMaterial[]
static const wxChar keyRenderRAY_AAliasing[]
static const wxChar keyBgColor_Green[]
static const wxChar keyBoardBodyColor_Blue[]
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:507
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:506
static const wxChar keyRenderOGL_ShowModelBBox[]
static const wxChar keySPasteColor_Green[]
static const wxChar keyBoardBodyColor_Red[]
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:508
static const wxChar keySilkColor_Red[]
static const wxChar keyBgColor_Blue[]
static const wxChar keySMaskColor_Red[]
static const wxChar keyRenderRAY_Refractions[]
static const wxChar keyRenderOGL_ShowCopperTck[]
static const wxChar keyRenderRAY_Backfloor[]
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
static const wxChar keySMaskColor_Blue[]
static const wxChar keyBoardBodyColor_Green[]
static const wxChar keyShowAxis[]
static const wxChar keySPasteColor_Blue[]
static const wxChar keyShowEcoLayers[]
static const wxChar keyShowCommentsLayer[]
static const wxChar keyRenderRAY_Shadows[]
static const wxChar keyRenderRAY_PostProcess[]
bool EDA_3D_VIEWER::Set3DBoardBodyColorFromUser ( )

Function Set3DBoardBodyBodyColorFromUser Set the copper color from a set of colors.

Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1127 of file eda_3d_viewer.cpp.

References CINFO3D_VISU::m_BoardBodyColor, m_settings, NewDisplay(), and Set3DColorFromUser().

Referenced by Process_Special_Functions().

1128 {
1129  wxColourData definedColors;
1130  unsigned int i = 0;
1131 
1132  definedColors.SetCustomColour( i++, wxColour( 51, 43, 22 ) ); // FR4 natural, dark
1133  definedColors.SetCustomColour( i++, wxColour( 109, 116, 75 ) ); // FR4 natural
1134  definedColors.SetCustomColour( i++, wxColour( 78, 14, 5 ) ); // brown/red
1135  definedColors.SetCustomColour( i++, wxColour( 146, 99, 47 ) ); // brown 1
1136  definedColors.SetCustomColour( i++, wxColour( 160, 123, 54 ) ); // brown 2
1137  definedColors.SetCustomColour( i++, wxColour( 146, 99, 47 ) ); // brown 3
1138  definedColors.SetCustomColour( i++, wxColour( 63, 126, 71 ) ); // green 1
1139  definedColors.SetCustomColour( i++, wxColour( 117, 122, 90 ) ); // green 2
1140 
1141  for(; i < wxColourData::NUM_CUSTOM;)
1142  {
1143  definedColors.SetCustomColour( i++, wxColour( 0, 0, 0 ) );
1144  }
1145 
1147  _( "Board Body Color" ),
1148  &definedColors );
1149 
1150  if( change )
1151  NewDisplay();
1152 
1153  return change;
1154 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:505
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
bool EDA_3D_VIEWER::Set3DColorFromUser ( SFVEC3D aColor,
const wxString &  aTitle,
wxColourData *  aPredefinedColors = NULL 
)

Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.

Parameters
aColoris the SFVEC3D to change
aTitleis the title displayed in the colordialog selector
aPredefinedColorsis a reference to a wxColourData which contains a few predefined colors if it is NULL, no predefined colors are used
Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1009 of file eda_3d_viewer.cpp.

References KiROUND().

Referenced by Process_Special_Functions(), Set3DBoardBodyColorFromUser(), Set3DCopperColorFromUser(), Set3DSilkScreenColorFromUser(), Set3DSolderMaskColorFromUser(), and Set3DSolderPasteColorFromUser().

1011 {
1012  wxColour newcolor, oldcolor;
1013 
1014  oldcolor.Set( KiROUND( aColor.r * 255 ),
1015  KiROUND( aColor.g * 255 ),
1016  KiROUND( aColor.b * 255 ) );
1017 
1018  wxColourData emptyColorSet; // Provides a empty predefined set of colors
1019  // if no color set available to avoid use of an
1020  // old color set
1021 
1022  if( aPredefinedColors == NULL )
1023  aPredefinedColors = &emptyColorSet;
1024 
1025  newcolor = wxGetColourFromUser( this, oldcolor, aTitle, aPredefinedColors );
1026 
1027  if( !newcolor.IsOk() ) // Cancel command
1028  return false;
1029 
1030  if( newcolor != oldcolor )
1031  {
1032  aColor.r = (double) newcolor.Red() / 255.0;
1033  aColor.g = (double) newcolor.Green() / 255.0;
1034  aColor.b = (double) newcolor.Blue() / 255.0;
1035  }
1036 
1037  return true;
1038 }
static int KiROUND(double v)
KiROUND rounds a floating point number to an int using "round halfway cases away from zero"...
Definition: common.h:107
bool EDA_3D_VIEWER::Set3DCopperColorFromUser ( )

Function Set3DCopperColorFromUser Set the copper color from a set of colors.

Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1101 of file eda_3d_viewer.cpp.

References CINFO3D_VISU::m_CopperColor, m_settings, NewDisplay(), and Set3DColorFromUser().

Referenced by Process_Special_Functions().

1102 {
1103  wxColourData definedColors;
1104  unsigned int i = 0;
1105 
1106  definedColors.SetCustomColour( i++, wxColour( 184, 115, 50) ); // Copper
1107  definedColors.SetCustomColour( i++, wxColour( 191, 155, 58) ); // Gold
1108  definedColors.SetCustomColour( i++, wxColour( 213, 213, 213) ); // Silver
1109  definedColors.SetCustomColour( i++, wxColour( 160, 160, 160) ); // tin
1110 
1111  for(; i < wxColourData::NUM_CUSTOM;)
1112  {
1113  definedColors.SetCustomColour( i++, wxColour( 0, 0, 0 ) );
1114  }
1115 
1117  _( "Copper Color" ),
1118  &definedColors );
1119 
1120  if( change )
1121  NewDisplay();
1122 
1123  return change;
1124 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:509
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
bool EDA_3D_VIEWER::Set3DSilkScreenColorFromUser ( )

Function Set3DSilkScreenColorFromUser Set the silkscreen color from a set of colors.

Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1041 of file eda_3d_viewer.cpp.

References m_settings, CINFO3D_VISU::m_SilkScreenColor, NewDisplay(), and Set3DColorFromUser().

Referenced by Process_Special_Functions().

1042 {
1043  wxColourData definedColors;
1044  unsigned int i = 0;
1045 
1046  definedColors.SetCustomColour( i++, wxColour( 241, 241, 241 ) ); // White
1047  definedColors.SetCustomColour( i++, wxColour( 4, 18, 21 ) ); // Dark
1048 
1049  for(; i < wxColourData::NUM_CUSTOM;)
1050  {
1051  definedColors.SetCustomColour( i++, wxColour( 0, 0, 0 ) );
1052  }
1053 
1055  _( "Silk Screen Color" ),
1056  &definedColors );
1057 
1058  if( change )
1059  NewDisplay();
1060 
1061  return change;
1062 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:508
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
bool EDA_3D_VIEWER::Set3DSolderMaskColorFromUser ( )

Function Set3DSolderMaskColorFromUser Set the solder mask color from a set of colors.

Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1065 of file eda_3d_viewer.cpp.

References m_settings, CINFO3D_VISU::m_SolderMaskColor, NewDisplay(), and Set3DColorFromUser().

Referenced by Process_Special_Functions().

1066 {
1067  wxColourData definedColors;
1068  unsigned int i = 0;
1069 
1070  definedColors.SetCustomColour( i++, wxColour( 20, 51, 36 ) ); // Green
1071  definedColors.SetCustomColour( i++, wxColour( 91, 168, 12 ) ); // Light Green
1072  definedColors.SetCustomColour( i++, wxColour( 13, 104, 11 ) ); // Saturated Green
1073  definedColors.SetCustomColour( i++, wxColour(181, 19, 21 ) ); // Red
1074  definedColors.SetCustomColour( i++, wxColour(239, 53, 41 ) ); // Red Light Orange
1075  definedColors.SetCustomColour( i++, wxColour(210, 40, 14 ) ); // Red 2
1076  definedColors.SetCustomColour( i++, wxColour( 2, 59, 162 ) ); // Blue
1077  definedColors.SetCustomColour( i++, wxColour( 54, 79, 116 ) ); // Light blue 1
1078  definedColors.SetCustomColour( i++, wxColour( 61, 85, 130 ) ); // Light blue 2
1079  definedColors.SetCustomColour( i++, wxColour( 21, 70, 80 ) ); // Green blue (dark)
1080  definedColors.SetCustomColour( i++, wxColour( 11, 11, 11 ) ); // Black
1081  definedColors.SetCustomColour( i++, wxColour( 245, 245,245 ) ); // White
1082  definedColors.SetCustomColour( i++, wxColour(119, 31, 91 ) ); // Purple
1083  definedColors.SetCustomColour( i++, wxColour( 32, 2, 53 ) ); // Purple Dark
1084 
1085  for(; i < wxColourData::NUM_CUSTOM;)
1086  {
1087  definedColors.SetCustomColour( i++, wxColour( 0, 0, 0 ) );
1088  }
1089 
1091  _( "Solder Mask Color" ),
1092  &definedColors );
1093 
1094  if( change )
1095  NewDisplay();
1096 
1097  return change;
1098 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:506
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
bool EDA_3D_VIEWER::Set3DSolderPasteColorFromUser ( )

Function Set3DSolderPasteColorFromUser Set the solder mask color from a set of colors.

Returns
true if a new color is chosen, false if no change or aborted by user

Definition at line 1157 of file eda_3d_viewer.cpp.

References m_settings, CINFO3D_VISU::m_SolderPasteColor, NewDisplay(), and Set3DColorFromUser().

Referenced by Process_Special_Functions().

1158 {
1159  wxColourData definedColors;
1160  unsigned int i = 0;
1161 
1162  definedColors.SetCustomColour( i++, wxColour( 128, 128, 128 ) ); // grey
1163  definedColors.SetCustomColour( i++, wxColour( 213, 213, 213 ) ); // Silver
1164  definedColors.SetCustomColour( i++, wxColour( 90, 90, 90 ) ); // grey 2
1165 
1166  for(; i < wxColourData::NUM_CUSTOM;)
1167  {
1168  definedColors.SetCustomColour( i++, wxColour( 0, 0, 0 ) );
1169  }
1170 
1172  _( "Solder Paste Color" ),
1173  &definedColors );
1174 
1175  if( change )
1176  NewDisplay();
1177 
1178  return change;
1179 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:507
void NewDisplay(int dummy=0)
Definition: eda_3d_viewer.h:71
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, wxColourData *aPredefinedColors=NULL)
Function Set3DColorFromUser Get a SFVEC3D from a wx colour dialog.
void EDA_BASE_FRAME::SetAutoSaveInterval ( int  aInterval)
inherited

Definition at line 205 of file basicframe.cpp.

References EDA_BASE_FRAME::m_autoSaveInterval, EDA_BASE_FRAME::m_autoSaveState, and EDA_BASE_FRAME::m_autoSaveTimer.

Referenced by DIALOG_GENERALOPTIONS::OnOkClick(), and SCH_EDIT_FRAME::OnPreferencesOptions().

206 {
207  m_autoSaveInterval = aInterval;
208 
209  if( m_autoSaveTimer->IsRunning() )
210  {
211  if( m_autoSaveInterval > 0 )
212  {
213  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
214  }
215  else
216  {
217  m_autoSaveTimer->Stop();
218  m_autoSaveState = false;
219  }
220  }
221 }
bool m_autoSaveState
Flag to indicate the last auto save state.
Definition: wxstruct.h:145
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
Definition: wxstruct.h:151
int m_autoSaveInterval
The auto save interval time in seconds.
Definition: wxstruct.h:148
void EDA_3D_VIEWER::SetDefaultFileName ( const wxString &  aFn)
inline

Function SetDefaultFileName Set the default file name (eg: to be suggested to a screenshot)

Parameters
aFn= file name to assign

Definition at line 78 of file eda_3d_viewer.h.

References m_defaultFileName.

Referenced by PCB_EDIT_FRAME::Show3D_Frame().

79  {
80  wxFileName fn( aFn );
81  m_defaultFileName = fn.GetName();
82  }
wxString m_defaultFileName
Filename to propose for save a screenshot.
void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

Parameters
aDestis the recipient of aKiway pointer. It is only used for debugging, since "this" is not a wxWindow*. "this" is a KIWAY_HOLDER mix-in.
aKiwayis often from a parent window, or from KIFACE::CreateWindow().

Definition at line 41 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

42 {
43 #if defined(DEBUG)
44  // offer a trap point for debugging most any window
45  wxASSERT( aDest );
46  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
47  {
48  int breakhere=1;
49  (void) breakhere;
50  }
51 #endif
52 
53  (void) aDest;
54 
55  m_kiway = aKiway;
56 }
KIWAY * m_kiway
Definition: kiway_player.h:85
void EDA_3D_VIEWER::SetMenuBarOptionsState ( )
private

Set the state of toggle menus according to the current display options.

Definition at line 414 of file 3d_toolbar.cpp.

References FL_ADHESIVE, FL_AXIS, FL_COMMENTS, FL_ECO, FL_MODULE_ATTRIBUTES_NORMAL, FL_MODULE_ATTRIBUTES_NORMAL_INSERT, FL_MODULE_ATTRIBUTES_VIRTUAL, FL_MOUSEWHEEL_PANNING, FL_RENDER_OPENGL_COPPER_THICKNESS, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_BACKFLOOR, FL_RENDER_RAYTRACING_POST_PROCESSING, FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, FL_RENDER_SHOW_HOLES_IN_ZONES, FL_SHOW_BOARD_BODY, FL_SILKSCREEN, FL_SOLDERMASK, FL_SOLDERPASTE, FL_USE_REALISTIC_MODE, FL_ZONE, CINFO3D_VISU::GetFlag(), ID_MENU3D_ADHESIVE_ONOFF, ID_MENU3D_AXIS_ONOFF, ID_MENU3D_COMMENTS_ONOFF, ID_MENU3D_ECO_ONOFF, ID_MENU3D_ENGINE_OPENGL_LEGACY, ID_MENU3D_ENGINE_RAYTRACING, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES, ID_MENU3D_FL_RAYTRACING_REFLECTIONS, ID_MENU3D_FL_RAYTRACING_REFRACTIONS, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS, ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE, ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY, ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL, ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT, ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL, ID_MENU3D_MOUSEWHEEL_PANNING, ID_MENU3D_REALISTIC_MODE, ID_MENU3D_SHOW_BOARD_BODY, ID_MENU3D_SILKSCREEN_ONOFF, ID_MENU3D_SOLDER_MASK_ONOFF, ID_MENU3D_SOLDER_PASTE_ONOFF, ID_MENU3D_ZONE_ONOFF, m_logTrace, m_settings, MATERIAL_MODE_CAD_MODE, MATERIAL_MODE_DIFFUSE_ONLY, MATERIAL_MODE_NORMAL, CINFO3D_VISU::MaterialModeGet(), RENDER_ENGINE_OPENGL_LEGACY, RENDER_ENGINE_RAYTRACING, and CINFO3D_VISU::RenderEngineGet().

Referenced by CreateMenuBar(), Install3DViewOptionDialog(), OnUpdateMenus(), and Process_Special_Functions().

415 {
416  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState" ) );
417 
418  wxMenuBar* menuBar = GetMenuBar();
419 
420  if( menuBar == NULL )
421  {
422  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState menuBar == NULL" ) );
423 
424  return;
425  }
426 
427  wxMenuItem* item;
428  // Set the state of toggle menus according to the current display options
429  item = menuBar->FindItem( ID_MENU3D_MOUSEWHEEL_PANNING );
430  item->Check( m_settings.GetFlag( FL_MOUSEWHEEL_PANNING ) );
431 
432 
433  item = menuBar->FindItem( ID_MENU3D_ENGINE_OPENGL_LEGACY );
435 
436  item = menuBar->FindItem( ID_MENU3D_ENGINE_RAYTRACING );
438 
439  item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
440  item->Check( m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
441  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
442  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
443  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
444  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
445 
446  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES );
448 
449  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL );
450  item->Check( m_settings.MaterialModeGet() == MATERIAL_MODE_NORMAL );
451 
452  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY );
454 
455  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE );
457 
458  // OpenGL
459  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS );
461 
462  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX );
464 
465  // Raytracing
466  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS );
468 
469  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_BACKFLOOR );
471 
472  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFRACTIONS );
474 
475  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFLECTIONS );
477 
478  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_POST_PROCESSING );
480 
481  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING );
483 
484  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES );
486 
487 
488  item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY );
489  item->Check( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) );
490 
491  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL );
493 
494  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT );
496 
497  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL );
499 
500  item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF );
501  item->Check( m_settings.GetFlag( FL_ZONE ) );
502 
503  item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
504  item->Check( m_settings.GetFlag( FL_AXIS ) );
505 
506  item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF );
507  item->Check( m_settings.GetFlag( FL_ADHESIVE ) );
508 
509  item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF );
510  item->Check( m_settings.GetFlag( FL_SILKSCREEN ) );
511 
512  item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF );
513  item->Check( m_settings.GetFlag( FL_SOLDERMASK ) );
514 
515  item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF );
516  item->Check( m_settings.GetFlag( FL_SOLDERPASTE ) );
517 
518  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
519  item->Check( m_settings.GetFlag( FL_COMMENTS ) );
520 
521  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
522  item->Check( m_settings.GetFlag( FL_ECO ));
523 }
Use only diffuse material properties.
Definition: 3d_enums.h:94
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
MATERIAL_MODE MaterialModeGet() const
MaterialModeGet.
Definition: cinfo3d_visu.h:246
Use a gray shading based on diffuse material.
Definition: 3d_enums.h:95
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
Use all material properties from model file.
Definition: 3d_enums.h:93
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void KIWAY_PLAYER::SetModal ( bool  aIsModal)
inlineprotectedinherited

Definition at line 217 of file kiway_player.h.

References KIWAY_PLAYER::m_modal.

217 { m_modal = aIsModal; }
void EDA_BASE_FRAME::SetMruPath ( const wxString &  aPath)
inlineinherited

Definition at line 356 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::ExportHotkeyConfigToFile(), EDA_BASE_FRAME::ImportHotkeyConfigFromFile(), and KICAD_MANAGER_FRAME::OnLoadProject().

356 { m_mruPath = aPath; }
wxString m_mruPath
Most recently used path.
Definition: wxstruct.h:155
void EDA_3D_VIEWER::SetToolbars ( )
private

Definition at line 526 of file 3d_toolbar.cpp.

Referenced by ReCreateMainToolbar().

527 {
528 }
void EDA_BASE_FRAME::ShowChangedIcons ( )
virtualinherited

Function ShowChangedIcons redraws items menus after a icon was changed option.

Definition at line 249 of file basicframe.cpp.

References EDA_BASE_FRAME::ReCreateMenuBar().

Referenced by KIWAY::ShowChangedIcons().

250 {
251  ReCreateMenuBar();
252  GetMenuBar()->Refresh();
253 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
Definition: basicframe.cpp:237
void EDA_BASE_FRAME::ShowChangedLanguage ( )
virtualinherited

Function ShowChangedLanguage redraws the menus and what not in current language.

Reimplemented in PCB_EDIT_FRAME, and GERBVIEW_FRAME.

Definition at line 242 of file basicframe.cpp.

References EDA_BASE_FRAME::ReCreateMenuBar().

Referenced by KIWAY::SetLanguage(), GERBVIEW_FRAME::ShowChangedLanguage(), and PCB_EDIT_FRAME::ShowChangedLanguage().

243 {
244  ReCreateMenuBar();
245  GetMenuBar()->Refresh();
246 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
Definition: basicframe.cpp:237
bool KIWAY_PLAYER::ShowModal ( wxString *  aResult = NULL,
wxWindow *  aResultantFocusWindow = NULL 
)
inherited

Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal().

That is, behavior is similar to a modal dialog window. Not all KIWAY_PLAYERs use this interface, so don't call this unless the implementation knows how to call DismissModal() on a button click or double click or some special event which ends the modal behavior.

Parameters
aResultif not NULL, indicates a place to put a resultant string.
aResultantFocusWindowif not NULL, indicates what window to pass focus to on return.
Returns
bool - true if frame implementation called KIWAY_PLAYER::DismissModal() with aRetVal of true.

Definition at line 81 of file kiway_player.cpp.

References DBG, EDA_BASE_FRAME::Enable(), KIWAY_PLAYER::IsModal(), KIWAY_PLAYER::m_modal_loop, KIWAY_PLAYER::m_modal_resultant_parent, KIWAY_PLAYER::m_modal_ret_val, KIWAY_PLAYER::m_modal_string, TO_UTF8, and WX_EVENT_LOOP.

Referenced by DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), PCB_BASE_FRAME::SelectFootprintFromLibBrowser(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler(), and DIALOG_EXCHANGE_MODULE::ViewAndSelectFootprint().

82 {
83  wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) );
84 
85  /*
86  This function has a nice interface but a necessarily unsightly implementation.
87  Now the implementation is encapsulated, localizing future changes.
88 
89  It works in tandem with DismissModal(). But only ShowModal() is in the
90  vtable and therefore cross-module capable.
91  */
92 
93  // This is an exception safe way to zero a pointer before returning.
94  // Yes, even though DismissModal() clears this first normally, this is
95  // here in case there's an exception before the dialog is dismissed.
96  struct NULLER
97  {
98  void*& m_what;
99  NULLER( void*& aPtr ) : m_what( aPtr ) {}
100  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
101  } clear_this( (void*&) m_modal_loop );
102 
103 
104  m_modal_resultant_parent = aResultantFocusWindow;
105 
106  Show( true );
107  Raise(); // Needed on some Window managers to always display the frame
108 
109  SetFocus();
110 
111  {
112  // We have to disable all frames but the the modal one.
113  // wxWindowDisabler does that, but it also disables all top level windows
114  // We do not want to disable top level windows which are child of the modal one,
115  // if they are enabled.
116  // An example is an aui toolbar which was moved
117  // or a dialog or an other frame or miniframe opened by the modal one.
118  wxWindowList wlist = GetChildren();
119  std::vector<wxWindow*> enabledTopLevelWindows;
120 
121  for( unsigned ii = 0; ii < wlist.size(); ii++ )
122  if( wlist[ii]->IsTopLevel() && wlist[ii]->IsEnabled() )
123  enabledTopLevelWindows.push_back( wlist[ii] );
124 
125  // exception safe way to disable all top level windows except the modal one,
126  // re-enables only those that were disabled on exit
127  wxWindowDisabler toggle( this );
128 
129  for( unsigned ii = 0; ii < enabledTopLevelWindows.size(); ii++ )
130  enabledTopLevelWindows[ii]->Enable( true );
131 
132  WX_EVENT_LOOP event_loop;
133  m_modal_loop = &event_loop;
134  event_loop.Run();
135 
136  } // End of scope for some variables.
137  // End nesting before setting focus below.
138 
139  if( aResult )
140  *aResult = m_modal_string;
141 
142  DBG(printf( "~%s: aResult:'%s' ret:%d\n",
143  __func__, TO_UTF8( m_modal_string ), m_modal_ret_val );)
144 
145  if( aResultantFocusWindow )
146  {
147  aResultantFocusWindow->Raise();
148 
149  // have the final say, after wxWindowDisabler reenables my parent and
150  // the events settle down, set the focus
151  wxSafeYield();
152  aResultantFocusWindow->SetFocus();
153  }
154 
155  return m_modal_ret_val;
156 }
bool m_modal_ret_val
Definition: kiway_player.h:250
#define WX_EVENT_LOOP
Definition: kiway_player.h:91
wxWindow * m_modal_resultant_parent
Definition: kiway_player.h:248
wxString m_modal_string
Definition: kiway_player.h:249
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
bool Enable(bool enable) override
Definition: basicframe.cpp:192
bool IsModal()
Definition: kiway_player.h:216
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:247
#define DBG(x)
Definition: fctsys.h:33
const SEARCH_STACK & EDA_BASE_FRAME::sys_search ( )
protectedvirtualinherited

Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_MANAGER_FRAME.

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 370 of file basicframe.cpp.

References Kiface(), and KIFACE_I::KifaceSearch().

Referenced by EDA_BASE_FRAME::GetKicadHelp().

371 {
372  return Kiface().KifaceSearch();
373 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
SEARCH_STACK & KifaceSearch()
Only for DSO specific 'non-library' files.
Definition: kiface_i.h:125
void EDA_3D_VIEWER::takeScreenshot ( wxCommandEvent &  event)
private

Function TakeScreenshot Create a Screenshot of the current 3D view.

Output file format is png or jpeg, or image is copied to the clipboard

Definition at line 921 of file eda_3d_viewer.cpp.

References EDA_FILE_SELECTOR(), PROJECT::GetProjectFullName(), EDA_3D_CANVAS::GetScreenshot(), ID_MENU_SCREENCOPY_JPEG, ID_TOOL_SCREENCOPY_TOCLIBBOARD, m_canvas, m_defaultFileName, Parent(), KIWAY_HOLDER::Prj(), and Refresh().

Referenced by Process_Special_Functions().

922 {
923  wxString fullFileName;
924  bool fmt_is_jpeg = false;
925 
926  if( event.GetId() == ID_MENU_SCREENCOPY_JPEG )
927  fmt_is_jpeg = true;
928 
929  if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
930  {
931  // Remember path between saves during this session only.
932  static wxFileName fn;
933  const wxString file_ext = fmt_is_jpeg ? wxT( "jpg" ) : wxT( "png" );
934  const wxString mask = wxT( "*." ) + file_ext;
935 
936  // First time path is set to the project path.
937  if( !fn.IsOk() )
938  fn = Parent()->Prj().GetProjectFullName();
939 
940  fn.SetExt( file_ext );
941 
942  fullFileName = EDA_FILE_SELECTOR( _( "3D Image File Name:" ), fn.GetPath(),
943  m_defaultFileName, file_ext, mask, this,
944  wxFD_SAVE | wxFD_OVERWRITE_PROMPT, true );
945 
946  if( fullFileName.IsEmpty() )
947  return;
948 
949  fn = fullFileName;
950 
951  // Be sure the screen area destroyed by the file dialog is redrawn
952  // before making a screen copy.
953  // Without this call, under Linux the screen refresh is made to late.
954  wxYield();
955  }
956 
957  // Be sure we have the latest 3D view (remember 3D view is buffered)
958  Refresh();
959  wxYield();
960 
961  // Build image from the 3D buffer
962  wxWindowUpdateLocker noUpdates( this );
963 
964  wxImage screenshotImage;
965 
966  if( m_canvas )
967  m_canvas->GetScreenshot( screenshotImage );
968 
969  if( event.GetId() == ID_TOOL_SCREENCOPY_TOCLIBBOARD )
970  {
971  wxBitmap bitmap( screenshotImage );
972 
973  if( wxTheClipboard->Open() )
974  {
975  wxBitmapDataObject* dobjBmp = new wxBitmapDataObject( bitmap );
976 
977  if( !wxTheClipboard->SetData( dobjBmp ) )
978  wxMessageBox( _( "Failed to copy image to clipboard" ) );
979 
980  wxTheClipboard->Flush(); /* the data in clipboard will stay
981  * available after the application exits */
982  wxTheClipboard->Close();
983  }
984  }
985  else
986  {
987  if( !screenshotImage.SaveFile( fullFileName,
988  fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : wxBITMAP_TYPE_PNG ) )
989  wxMessageBox( _( "Can't save file" ) );
990 
991  screenshotImage.Destroy();
992  }
993 
994 }
PCB_BASE_FRAME * Parent() const
Definition: eda_3d_viewer.h:62
VTBL_ENTRY const wxString GetProjectFullName() const
Function GetProjectFullName returns the full path and name of the project.
Definition: project.cpp:96
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
void Refresh()
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
void GetScreenshot(wxImage &aDstImage)
Request a screenshot and output it to the aDstImage.
wxString m_defaultFileName
Filename to propose for save a screenshot.
void EDA_BASE_FRAME::UpdateFileHistory ( const wxString &  FullFileName,
wxFileHistory *  aFileHistory = NULL 
)
inherited

Function UpdateFileHistory Updates the list of recently opened files.

Note also the menu is updated, if wxFileHistory::UseMenu was called at init time

Parameters
FullFileNameThe full file name including the path.
aFileHistoryThe wxFileHistory in use. If NULL, the main application file history is used.

Definition at line 388 of file basicframe.cpp.

References KIFACE_I::GetFileHistory(), and Kiface().

Referenced by GERBVIEW_FRAME::LoadExcellonFiles(), GERBVIEW_FRAME::LoadGerberFiles(), PL_EDITOR_FRAME::LoadPageLayoutDescrFile(), KICAD_MANAGER_FRAME::OnCloseWindow(), KICAD_MANAGER_FRAME::OnLoadProject(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::SavePcbFile(), and GERBVIEW_FRAME::unarchiveFiles().

390 {
391  wxFileHistory* fileHistory = aFileHistory;
392 
393  if( !fileHistory )
394  fileHistory = &Kiface().GetFileHistory();
395 
396  fileHistory->AddFileToHistory( FullFileName );
397 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxFileHistory & GetFileHistory()
Definition: kiface_i.h:121
int EDA_BASE_FRAME::WriteHotkeyConfig ( struct EDA_HOTKEY_CONFIG aDescList,
wxString *  aFullFileName = NULL 
)
virtualinherited

Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mechanism or a file.

Parameters
aDescList= pointer to the current hotkey list.
aFullFileName= a wxString pointer to a full file name. if NULL, use the standard wxConfig mechanism (default) the output format is: shortcut "key" "function" lines starting with # are comments

Reimplemented in EDA_DRAW_FRAME.

Definition at line 534 of file hotkeys_basic.cpp.

References AddDelimiterString(), EDA_BASE_FRAME::config(), DEFAULT_HOTKEY_FILENAME_EXT, GetChars(), GetNewConfig(), HOTKEYS_CONFIG_KEY, KeyNameFromKeyCode(), EDA_HOTKEY_CONFIG::m_HK_InfoList, EDA_HOTKEY::m_InfoMsg, EDA_HOTKEY::m_KeyCode, EDA_HOTKEY_CONFIG::m_SectionTag, EDA_HOTKEY_CONFIG::m_Title, and TO_UTF8.

Referenced by EDA_BASE_FRAME::ExportHotkeyConfigToFile(), HOTKEYS_EDITOR_DIALOG::TransferDataFromWindow(), and EDA_DRAW_FRAME::WriteHotkeyConfig().

536 {
537  wxString msg;
538  wxString keyname, infokey;
539 
540  msg = wxT( "$hotkey list\n" );
541 
542  // Print the current hotkey list
543  EDA_HOTKEY** list;
544 
545  for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
546  {
547  if( aDescList->m_Title )
548  {
549  msg += wxT( "# " );
550  msg += *aDescList->m_Title;
551  msg += wxT( "\n" );
552  }
553 
554  msg += *aDescList->m_SectionTag;
555  msg += wxT( "\n" );
556 
557  list = aDescList->m_HK_InfoList;
558 
559  for( ; *list != NULL; list++ )
560  {
561  EDA_HOTKEY* hk_decr = *list;
562  msg += wxT( "shortcut " );
563  keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
564  AddDelimiterString( keyname );
565  infokey = hk_decr->m_InfoMsg;
566  AddDelimiterString( infokey );
567  msg += keyname + wxT( ": " ) + infokey + wxT( "\n" );
568  }
569  }
570 
571  msg += wxT( "$Endlist\n" );
572 
573  if( aFullFileName )
574  {
575  FILE* file = wxFopen( *aFullFileName, wxT( "wt" ) );
576 
577  if( file )
578  {
579  fputs( TO_UTF8( msg ), file );
580  fclose( file );
581  }
582  else
583  {
584  msg.Printf( wxT( "Unable to write file %s" ), GetChars( *aFullFileName ) );
585  return 0;
586  }
587  }
588  else
589  {
590  wxFileName fn( GetName() );
591  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
592  wxConfigBase* config = GetNewConfig( fn.GetFullPath() );
593  config->Write( HOTKEYS_CONFIG_KEY, msg );
594  delete config;
595  }
596 
597  return 1;
598 }
EDA_HOTKEY ** m_HK_InfoList
Definition: hotkeys_basic.h:91
wxConfigBase * GetNewConfig(const wxString &aProgName)
Function GetNewConfig.
Definition: common.cpp:205
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
Definition: basicframe.cpp:361
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
#define HOTKEYS_CONFIG_KEY
void AddDelimiterString(wxString &string)
Function AddDelimiterString Add un " to the start and the end of string (if not already done)...
Definition: gestfich.cpp:44
wxString * m_SectionTag
Definition: hotkeys_basic.h:90
wxString m_InfoMsg
Definition: hotkeys_basic.h:64
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
wxString * m_Title
Definition: hotkeys_basic.h:92
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Function KeyNameFromKeyCode return the key name from the key code Only some wxWidgets key values are ...
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34

Member Data Documentation

wxString EDA_BASE_FRAME::m_AboutTitle
protectedinherited

Name of program displayed in About.

Definition at line 137 of file wxstruct.h.

bool EDA_BASE_FRAME::m_autoSaveState
protectedinherited
wxTimer* EDA_BASE_FRAME::m_autoSaveTimer
protectedinherited
EDA_3D_CANVAS* EDA_3D_VIEWER::m_canvas
private

The canvas where the openGL context will be rendered.

Definition at line 222 of file eda_3d_viewer.h.

Referenced by On3DGridSelection(), OnActivate(), OnCloseWindow(), OnSetFocus(), Process_Special_Functions(), ProcessZoom(), ReloadRequest(), RenderEngineChanged(), and takeScreenshot().

wxString EDA_BASE_FRAME::m_configFrameName
protectedinherited

prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTOR is used

Definition at line 132 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::ConfigBaseName().

wxString EDA_3D_VIEWER::m_defaultFileName
private

Filename to propose for save a screenshot.

Definition at line 217 of file eda_3d_viewer.h.

Referenced by GetDefaultFileName(), SetDefaultFileName(), and takeScreenshot().

bool EDA_BASE_FRAME::m_hasAutoSave
protectedinherited

Flag to indicate if this frame supports auto save.

Definition at line 142 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::EDA_BASE_FRAME(), EDA_BASE_FRAME::LoadSettings(), EDA_BASE_FRAME::ProcessEvent(), and EDA_BASE_FRAME::SaveSettings().

FRAME_T EDA_BASE_FRAME::m_Ident
protectedinherited

Id Type (pcb, schematic, library..)

Definition at line 128 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::EDA_BASE_FRAME().

const wxChar * EDA_3D_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" )
staticprivate

Trace mask used to enable or disable the trace output of this class.

The debug output can be turned on by setting the WXTRACE environment variable to "KI_TRACE_EDA_3D_VIEWER". See the wxWidgets documentation on wxLogTrace for more information.

Definition at line 235 of file eda_3d_viewer.h.

Referenced by CreateMenuBar(), Exit3DFrame(), LoadSettings(), On3DGridSelection(), OnActivate(), OnCloseWindow(), OnLeftClick(), OnRenderEngineSelection(), OnRightClick(), Process_Special_Functions(), ProcessZoom(), ReCreateMainToolbar(), RedrawActiveWindow(), SaveSettings(), and SetMenuBarOptionsState().

bool KIWAY_PLAYER::m_modal
protectedinherited

Definition at line 246 of file kiway_player.h.

Referenced by KIWAY_PLAYER::IsModal(), and KIWAY_PLAYER::SetModal().

WX_EVENT_LOOP* KIWAY_PLAYER::m_modal_loop
protectedinherited
wxWindow* KIWAY_PLAYER::m_modal_resultant_parent
protectedinherited

Definition at line 248 of file kiway_player.h.

Referenced by KIWAY_PLAYER::ShowModal().

bool KIWAY_PLAYER::m_modal_ret_val
protectedinherited
wxString KIWAY_PLAYER::m_modal_string
protectedinherited

Definition at line 249 of file kiway_player.h.

Referenced by KIWAY_PLAYER::DismissModal(), and KIWAY_PLAYER::ShowModal().

wxString EDA_BASE_FRAME::m_perspective
protectedinherited

wxAuiManager perspective.

Definition at line 153 of file wxstruct.h.

Referenced by EDA_BASE_FRAME::LoadSettings().


The documentation for this class was generated from the following files: