KiCad PCB EDA Suite
EDA_3D_VIEWER Class Reference

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 ()
 Request reloading the 3D view. More...
 
void NewDisplay (bool aForceImmediateRedraw=false)
 Reload and refresh (rebuild) the 3D scene. More...
 
void SetDefaultFileName (const wxString &aFn)
 Set the default file name (eg: to be suggested to a screenshot) More...
 
const wxFileName & GetDefaultFileName () const
 
CINFO3D_VISUGetSettings ()
 
bool Set3DColorFromUser (SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
 Get a SFVEC3D from a wx colour dialog. More...
 
bool Set3DSolderMaskColorFromUser ()
 Set the solder mask color from a set of colors. More...
 
bool Set3DSolderPasteColorFromUser ()
 Set the solder mask color from a set of colors. More...
 
bool Set3DCopperColorFromUser ()
 Set the copper color from a set of colors. More...
 
bool Set3DBoardBodyColorFromUser ()
 Set the copper color from a set of colors. More...
 
bool 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...
 
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)
 
bool ShowPreferences (EDA_HOTKEY_CONFIG *aHotkeys, EDA_HOTKEY_CONFIG *aShowHotkeys, const wxString &aHotkeysNickname)
 
void PrintMsg (const wxString &text)
 
virtual void InstallPreferences (PAGED_DIALOG *aParent)
 Function InstallPreferences allows a Frame to load its preference panels (if any) into the preferences dialog. More...
 
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 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...
 
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 CommonSettingsChanged ()
 Function CommonSettingsChanged Notification event that some of the common (suite-wide) settings have changed. 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...
 
VTBL_ENTRY EDA_UNITS_T GetUserUnits () const
 Function GetUserUnits Allows participation in KEYWAY_PLAYER/DIALOG_SHIM userUnits inheritance. 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 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...
 

Static Protected Attributes

static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND
 

Default style flags used for wxAUI toolbars

More...
 

Private Member Functions

void Exit3DFrame (wxCommandEvent &event)
 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 OnKeyEvent (wxKeyEvent &event)
 
void RedrawActiveWindow (wxDC *DC, bool EraseBg)
 
void takeScreenshot (wxCommandEvent &event)
 Create a Screenshot of the current 3D view. More...
 
void RenderEngineChanged ()
 RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged. More...
 

Private Attributes

wxFileName m_defaultSaveScreenshotFileName
 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

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

Definition at line 49 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 arrayDim(), PCAD2KICAD::Center, PGM_BASE::CommonSettings(), ENBL_MOUSEWHEEL_PAN_KEY, FL_MOUSEWHEEL_PANNING, COGL_ATT_LIST::GetAttributesList(), ID_RENDER_CURRENT_VIEW, KiBitmap(), OnKeyEvent(), Pgm(), Prj(), RENDER_ENGINE_OPENGL_LEGACY, and EDA_3D_CANVAS::SetStatusBar().

149  :
150 
151  KIWAY_PLAYER( aKiway, aParent,
152  FRAME_PCB_DISPLAY3D, aTitle,
153  wxDefaultPosition, wxDefaultSize,
154  style, VIEWER3D_FRAMENAME )
155 {
156  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::EDA_3D_VIEWER %s", aTitle );
157 
158  m_canvas = NULL;
159 
160  // Give it an icon
161  wxIcon icon;
162  icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
163  SetIcon( icon );
164 
165  bool option;
166  Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
168 
169  LoadSettings( config() );
170  SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
171 
172  // Create the status line
173  static const int status_dims[4] = { -1, 130, 130, 170 };
174 
175  wxStatusBar *status_bar = CreateStatusBar( arrayDim( status_dims ) );
176  SetStatusWidths( arrayDim( status_dims ), status_dims );
177 
178  CreateMenuBar();
180 
181  m_canvas = new EDA_3D_CANVAS( this,
183  aParent->GetBoard(),
184  m_settings,
185  Prj().Get3DCacheManager() );
186 
187  if( m_canvas )
188  m_canvas->SetStatusBar( status_bar );
189 
190  m_auimgr.SetManagedWindow( this );
191 
192  m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
193  m_auimgr.AddPane( m_canvas, EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
194 
195  m_auimgr.Update();
196 
199 
200  m_mainToolBar->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( EDA_3D_VIEWER::OnKeyEvent ),
201  NULL, this );
202 
203  // Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
204  // in order to receive mouse events. Otherwise, the user has to click somewhere on
205  // the canvas before it will respond to mouse wheel events.
206  if( m_canvas )
207  m_canvas->SetFocus();
208 }
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 OnKeyEvent(wxKeyEvent &event)
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...
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:66
wxAuiManager m_auimgr
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)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
#define ENBL_MOUSEWHEEL_PAN_KEY
Definition: pgm_base.h:49
void ReCreateMainToolbar()
Definition: 3d_toolbar.cpp:39
Specialization of the wxAuiPaneInfo class for KiCad panels.
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
of elements in an array. This implements type-safe compile time checking
Definition: macros.h:99
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
VTBL_ENTRY wxConfigBase * CommonSettings() const
Definition: pgm_base.h:189
void CreateMenuBar()
Definition: 3d_menubar.cpp:41
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
#define VIEWER3D_FRAMENAME
Definition: eda_3d_viewer.h:44
EDA_3D_VIEWER::~EDA_3D_VIEWER ( )

Definition at line 211 of file eda_3d_viewer.cpp.

References EDA_BASE_FRAME::m_auimgr, EDA_BASE_FRAME::m_mainToolBar, and OnKeyEvent().

212 {
213  m_mainToolBar->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( EDA_3D_VIEWER::OnKeyEvent ), NULL, this );
214 
215  m_auimgr.UnInit();
216 
217  // m_canvas delete will be called by wxWidget manager
218  //delete m_canvas;
219  //m_canvas = 0;
220 }
void OnKeyEvent(wxKeyEvent &event)
wxAuiManager m_auimgr
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.

Member Function Documentation

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 585 of file eda_base_frame.cpp.

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

Referenced by EDA_BASE_FRAME::GetMruPath(), and PCB_EDIT_FRAME::OpenProjectFiles().

587 {
588  wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
589  wxCHECK_RET( !aBackupFileExtension.IsEmpty(), wxT( "Invalid backup file extension!" ) );
590 
591  wxFileName autoSaveFileName = aFileName;
592 
593  // Check for auto save file.
594  autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
595 
596  wxLogTrace( traceAutoSave,
597  wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
598 
599  if( !autoSaveFileName.FileExists() )
600  return;
601 
602  wxString msg = wxString::Format( _(
603  "Well this is potentially embarrassing!\n"
604  "It appears that the last time you were editing the file\n"
605  "\"%s\"\n"
606  "it was not saved properly. Do you wish to restore the last saved edits you made?" ),
607  GetChars( aFileName.GetFullName() )
608  );
609 
610  int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
611 
612  // Make a backup of the current file, delete the file, and rename the auto save file to
613  // the file name.
614  if( response == wxYES )
615  {
616  // Get the backup file name.
617  wxFileName backupFileName = aFileName;
618  backupFileName.SetExt( aBackupFileExtension );
619 
620  // If an old backup file exists, delete it. If an old copy of the file exists, rename
621  // it to the backup file name
622  if( aFileName.FileExists() )
623  {
624  // Remove the old file backup file.
625  if( backupFileName.FileExists() )
626  wxRemoveFile( backupFileName.GetFullPath() );
627 
628  // Rename the old file to the backup file name.
629  if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
630  {
631  msg.Printf( _( "Could not create backup file \"%s\"" ),
632  GetChars( backupFileName.GetFullPath() ) );
633  wxMessageBox( msg );
634  }
635  }
636 
637  if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
638  {
639  wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
640  Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
641  }
642  }
643  else
644  {
645  wxLogTrace( traceAutoSave,
646  wxT( "Removing auto save file " ) + autoSaveFileName.GetFullPath() );
647 
648  // Remove the auto save file when using the previous file as is.
649  wxRemoveFile( autoSaveFileName.GetFullPath() );
650  }
651 }
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:66
#define AUTOSAVE_PREFIX_FILENAME
Prefix to create filenames for schematic files or other difile when auto-saved to retrieve a crash...
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::CommonSettingsChanged ( )
virtualinherited

Function CommonSettingsChanged Notification event that some of the common (suite-wide) settings have changed.

Update menus, toolbars, local variables, etc.

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, LIB_EDIT_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, FOOTPRINT_EDIT_FRAME, KICAD_MANAGER_FRAME, and EDA_DRAW_FRAME.

Definition at line 244 of file eda_base_frame.cpp.

References EDA_BASE_FRAME::ReCreateMenuBar().

Referenced by EDA_DRAW_FRAME::CommonSettingsChanged(), KIWAY::CommonSettingsChanged(), and EDA_BASE_FRAME::GetMruPath().

245 {
246  if( GetMenuBar() )
247  {
248  // For icons in menus, icon scaling & hotkeys
249  ReCreateMenuBar();
250  GetMenuBar()->Refresh();
251  }
252 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
wxConfigBase * EDA_BASE_FRAME::config ( )
protectedvirtualinherited

Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 360 of file eda_base_frame.cpp.

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

Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDA_BASE_FRAME::isAutoSaveRequired(), SIM_PLOT_FRAME::onClose(), FOOTPRINT_WIZARD_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnPreferencesOptions(), SCH_EDIT_FRAME::OnPreferencesOptions(), SCH_EDIT_FRAME::OpenProjectFiles(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and EDA_BASE_FRAME::windowClosing().

361 {
362  // KICAD_MANAGER_FRAME overrides this
363  wxConfigBase* ret = Kiface().KifaceSettings();
364  //wxASSERT( ret );
365  return ret;
366 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103
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 269 of file eda_base_frame.h.

References EDA_BASE_FRAME::m_configFrameName.

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

270  {
271  wxString baseCfgName = m_configFrameName.IsEmpty() ? GetName() : m_configFrameName;
272  return baseCfgName;
273  }
wxString m_configFrameName
prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTO...
void EDA_3D_VIEWER::CreateMenuBar ( )
private

Definition at line 41 of file 3d_menubar.cpp.

References AddHotkeyName(), AddMenuItem(), g_3DViewer_Hokeys_Descr, GRID3D_10MM, GRID3D_1MM, GRID3D_2P5MM, GRID3D_5MM, GRID3D_NONE, CINFO3D_VISU::GridGet(), HELP_ZOOM_FIT, HELP_ZOOM_IN, HELP_ZOOM_OUT, HELP_ZOOM_REDRAW, HK_HELP, ID_HELP_GET_INVOLVED, ID_MENU3D_AXIS_ONOFF, ID_MENU3D_BGCOLOR, ID_MENU3D_BGCOLOR_BOTTOM_SELECTION, ID_MENU3D_BGCOLOR_TOP_SELECTION, ID_MENU3D_COLOR, ID_MENU3D_COPPER_COLOR_SELECTION, 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_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_PCB_BODY_COLOR_SELECTION, ID_MENU3D_RESET_DEFAULTS, ID_MENU3D_SILKSCREEN_COLOR_SELECTION, ID_MENU3D_SOLDERMASK_COLOR_SELECTION, ID_MENU3D_SOLDERPASTE_COLOR_SELECTION, ID_MENU_SCREENCOPY_JPEG, ID_MENU_SCREENCOPY_PNG, ID_MOVE3D_DOWN, ID_MOVE3D_LEFT, ID_MOVE3D_RIGHT, ID_MOVE3D_UP, 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_TOOL_SET_VISIBLE_ITEMS, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, KiBitmap(), m_logTrace, m_settings, RENDER_ENGINE_OPENGL_LEGACY, RENDER_ENGINE_RAYTRACING, CINFO3D_VISU::RenderEngineGet(), and SetMenuBarOptionsState().

Referenced by GetSettings().

42 {
43  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::CreateMenuBar" ) );
44 
45  wxMenuBar* menuBar = new wxMenuBar;
46  wxMenu* fileMenu = new wxMenu;
47  wxMenu* editMenu = new wxMenu;
48  wxMenu* viewMenu = new wxMenu;
49  wxMenu* prefsMenu = new wxMenu;
50  wxMenu* helpMenu = new wxMenu;
51 
52  menuBar->Append( fileMenu, _( "&File" ) );
53 
55  _( "Export Current View as PNG..." ),
56  KiBitmap( export_xpm ) );
57 
59  _( "Export Current View as JPEG..." ),
60  KiBitmap( export_xpm ) );
61 
62  fileMenu->AppendSeparator();
63  AddMenuItem( fileMenu, wxID_EXIT,
64  _( "&Exit" ),
65  KiBitmap( exit_xpm ) );
66 
67  menuBar->Append( editMenu, _( "&Edit" ) );
68 
70  _( "Copy 3D Image" ),
71  KiBitmap( copy_xpm ) );
72 
73  menuBar->Append( viewMenu, _( "&View" ) );
74 
75  AddMenuItem( viewMenu, ID_ZOOM_IN,
76  _( "Zoom &In" ), HELP_ZOOM_IN,
77  KiBitmap( zoom_in_xpm ) );
78 
79  AddMenuItem( viewMenu, ID_ZOOM_OUT,
80  _( "Zoom &Out" ), HELP_ZOOM_OUT,
81  KiBitmap( zoom_out_xpm ) );
82 
83  AddMenuItem( viewMenu, ID_ZOOM_PAGE,
84  _( "Zoom to &Fit" ), HELP_ZOOM_FIT,
85  KiBitmap( zoom_fit_in_page_xpm ) );
86 
87  AddMenuItem( viewMenu, ID_ZOOM_REDRAW,
88  _( "&Redraw" ), HELP_ZOOM_REDRAW,
89  KiBitmap( zoom_redraw_xpm ) );
90 
91  viewMenu->AppendSeparator();
92 
93  AddMenuItem( viewMenu, ID_ROTATE3D_X_NEG,
94  _( "Rotate X Clockwise" ),
95  KiBitmap( rotate_neg_x_xpm ) );
96 
97  AddMenuItem( viewMenu, ID_ROTATE3D_X_POS,
98  _( "Rotate X Counterclockwise" ),
99  KiBitmap( rotate_pos_x_xpm ) );
100 
101  viewMenu->AppendSeparator();
102 
103  AddMenuItem( viewMenu, ID_ROTATE3D_Y_NEG,
104  _( "Rotate Y Clockwise" ),
105  KiBitmap( rotate_neg_y_xpm ) );
106 
107  AddMenuItem( viewMenu, ID_ROTATE3D_Y_POS,
108  _( "Rotate Y Counterclockwise" ),
109  KiBitmap( rotate_pos_y_xpm ) );
110 
111  viewMenu->AppendSeparator();
112 
113  AddMenuItem( viewMenu, ID_ROTATE3D_Z_NEG,
114  _( "Rotate Z Clockwise" ),
115  KiBitmap( rotate_neg_z_xpm ) );
116 
117  AddMenuItem( viewMenu, ID_ROTATE3D_Z_POS,
118  _( "Rotate Z Counterclockwise" ),
119  KiBitmap( rotate_pos_z_xpm ) );
120 
121  viewMenu->AppendSeparator();
122 
123  AddMenuItem( viewMenu, ID_MOVE3D_LEFT,
124  _( "Move left" ),
125  KiBitmap( left_xpm ) );
126 
127  AddMenuItem( viewMenu, ID_MOVE3D_RIGHT,
128  _( "Move right" ),
129  KiBitmap( right_xpm ) );
130 
131  AddMenuItem( viewMenu, ID_MOVE3D_UP,
132  _( "Move up" ),
133  KiBitmap( up_xpm ) );
134 
135  AddMenuItem( viewMenu, ID_MOVE3D_DOWN,
136  _( "Move down" ),
137  KiBitmap( down_xpm ) );
138 
139  menuBar->Append( prefsMenu, _( "&Preferences" ) );
140 
142  _( "Display Options" ),
143  KiBitmap( read_setup_xpm ) );
144 
145  wxMenu * renderEngineList = new wxMenu;
146  AddMenuItem( prefsMenu, renderEngineList, ID_MENU3D_ENGINE,
147  _( "Render Engine" ), KiBitmap( render_mode_xpm ) );
148 
149  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_OPENGL_LEGACY,
150  _( "OpenGL" ),
151  wxEmptyString );
152 
153  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_RAYTRACING,
154  _( "Raytracing" ),
155  wxEmptyString );
156 
157  renderEngineList->Check( ID_MENU3D_ENGINE_OPENGL_LEGACY,
159 
160  renderEngineList->Check( ID_MENU3D_ENGINE_RAYTRACING,
162 
163  wxMenu * renderOptionsMenu = new wxMenu;
164  AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_FL,
165  _( "Render Options" ), KiBitmap( options_3drender_xpm ) );
166 
167  wxMenu * materialsList = new wxMenu;
168  AddMenuItem( renderOptionsMenu, materialsList, ID_MENU3D_FL_RENDER_MATERIAL,
169  _( "Material Properties" ), KiBitmap( color_materials_xpm ) );
170 
171  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL,
172  _( "Use All Properties" ),
173  _( "Use all material properties from each 3D model file" ) );
174 
175  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY,
176  _( "Use Diffuse Only" ),
177  _( "Use only the diffuse color property from model 3D model file" ) );
178 
179  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE,
180  _( "CAD Color Style" ),
181  _( "Use a CAD color style based on the diffuse color of the material" ) );
182 
183  // Add specific preferences for OpenGL
184  // /////////////////////////////////////////////////////////////////////////
185  wxMenu * renderOptionsMenu_OPENGL = new wxMenu;
186 
187  AddMenuItem( renderOptionsMenu, renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL,
188  _( "OpenGL Options" ), KiBitmap( tools_xpm ) );
189 
190  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS,
191  _( "Show Copper Thickness" ),
192  _( "Shows the copper thickness on copper layers (slower loading)"),
193  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
194 
195  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX,
196  _( "Show Model Bounding Boxes" ),
197  KiBitmap( ortho_xpm ), wxITEM_CHECK );
198 
199 
200  // Add specific preferences for Raytracing
201  // /////////////////////////////////////////////////////////////////////////
202  wxMenu * renderOptionsMenu_RAYTRACING = new wxMenu;
203  AddMenuItem( renderOptionsMenu, renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING,
204  _( "Raytracing Options" ), KiBitmap( tools_xpm ) );
205 
206  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS,
207  _( "Render Shadows" ),
208  KiBitmap( green_xpm ), wxITEM_CHECK );
209 
210  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES,
211  _( "Procedural Textures" ),
212  _( "Apply procedural textures to materials (slow)"),
213  KiBitmap( green_xpm ), wxITEM_CHECK );
214 
215  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR,
216  _( "Add Floor" ),
217  _( "Adds a floor plane below the board (slow)"),
218  KiBitmap( green_xpm ), wxITEM_CHECK );
219 
220  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFRACTIONS,
221  _( "Refractions" ),
222  _( "Render materials with refractions properties on final render (slow)"),
223  KiBitmap( green_xpm ), wxITEM_CHECK );
224 
225  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFLECTIONS,
226  _( "Reflections" ),
227  _( "Render materials with reflections properties on final render (slow)"),
228  KiBitmap( green_xpm ), wxITEM_CHECK );
229 
230  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING,
231  _( "Anti-aliasing" ),
232  _( "Render with improved quality on final render (slow)"),
233  KiBitmap( green_xpm ), wxITEM_CHECK );
234 
235  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING,
236  _( "Post-processing" ),
237  _( "Apply Screen Space Ambient Occlusion and Global Illumination reflections on final render (slow)"),
238  KiBitmap( green_xpm ), wxITEM_CHECK );
239 
240  prefsMenu->AppendSeparator();
241 
242 
243  // Colors, axis and grid elements
244  // /////////////////////////////////////////////////////////////////////////
245 
246  // Add submenu set Colors
247  wxMenu * setColorMenu = new wxMenu;
248  AddMenuItem( prefsMenu, setColorMenu, ID_MENU3D_COLOR,
249  _( "Choose Colors" ), KiBitmap( palette_xpm ) );
250 
251  wxMenu * setBgColorMenu = new wxMenu;
252  AddMenuItem( setColorMenu, setBgColorMenu, ID_MENU3D_BGCOLOR,
253  _( "Background Color" ), KiBitmap( palette_xpm ) );
254 
256  _( "Background Top Color..." ), KiBitmap( setcolor_3d_bg_xpm ) );
257 
259  _( "Background Bottom Color..." ), KiBitmap( setcolor_3d_bg_xpm ) );
260 
262  _( "Silkscreen Color..." ), KiBitmap( setcolor_silkscreen_xpm ) );
263 
265  _( "Solder Mask Color..." ), KiBitmap( setcolor_soldermask_xpm ) );
266 
268  _( "Solder Paste Color..." ), KiBitmap( setcolor_solderpaste_xpm ) );
269 
271  _( "Copper/Surface Finish Color..." ), KiBitmap( setcolor_copper_xpm ) );
272 
274  _( "Board Body Color..." ), KiBitmap( setcolor_board_body_xpm ) );
275 
276  AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
277  _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
278 
279 
280  // Creates grid menu
281  // /////////////////////////////////////////////////////////////////////////
282 
283  wxMenu * gridlistMenu = new wxMenu;
284  AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
285  _( "3D Grid" ), KiBitmap( grid_xpm ) );
286  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
287  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
288  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
289  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
290  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
291 
292  // If the grid is on, check the corresponding menuitem showing the grid size
293  if( m_settings.GridGet() != GRID3D_NONE )
294  {
295  gridlistMenu->Check( ID_MENU3D_GRID_10_MM, m_settings.GridGet() == GRID3D_10MM );
296  gridlistMenu->Check( ID_MENU3D_GRID_5_MM, m_settings.GridGet() == GRID3D_5MM );
297  gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, m_settings.GridGet() == GRID3D_2P5MM );
298  gridlistMenu->Check( ID_MENU3D_GRID_1_MM, m_settings.GridGet() == GRID3D_1MM );
299  }
300  else
301  gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
302 
303  // Reset options
304  // /////////////////////////////////////////////////////////////////////////
305  prefsMenu->AppendSeparator();
306 
308  _( "Reset to Default Settings" ),
309  KiBitmap( tools_xpm ) );
310 
311  // Help menu
312  // /////////////////////////////////////////////////////////////////////////
313  menuBar->Append( helpMenu, _( "&Help" ) );
314 
315  AddMenuItem( helpMenu, wxID_HELP,
316  _( "Pcbnew &Manual" ),
317  _( "Open Pcbnew Manual" ),
318  KiBitmap( online_help_xpm ) );
319 
320  AddMenuItem( helpMenu, wxID_INDEX,
321  _( "&Getting Started in KiCad" ),
322  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
323  KiBitmap( help_xpm ) );
324 
325  wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_3DViewer_Hokeys_Descr, HK_HELP );
327  text,
328  _( "Displays the current hotkeys list and corresponding commands" ),
329  KiBitmap( hotkeys_xpm ) );
330 
331  helpMenu->AppendSeparator();
332 
334  _( "Get &Involved" ),
335  _( "Contribute to KiCad (opens a web browser)" ),
336  KiBitmap( info_xpm ) );
337 
338  helpMenu->AppendSeparator();
339 
340  AddMenuItem( helpMenu, wxID_ABOUT,
341  _( "&About KiCad" ),
342  _( "Display KiCad About dialog" ),
343  KiBitmap( about_xpm ) );
344 
345  SetMenuBar( menuBar );
347 }
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:223
#define HELP_ZOOM_FIT
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_menubar.cpp:350
Definition: id.h:241
#define HELP_ZOOM_OUT
#define HELP_ZOOM_REDRAW
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
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.
wxString AddHotkeyName(const wxString &aText, EDA_HOTKEY **aList, int aCommandId, HOTKEY_ACTION_TYPE aShortCutType)
Function AddHotkeyName Add the key name from the Command id value ( m_Idcommand member value) ...
struct EDA_HOTKEY_CONFIG g_3DViewer_Hokeys_Descr[]
#define HELP_ZOOM_IN
void KIWAY_PLAYER::DismissModal ( bool  aRetVal,
const wxString &  aResult = wxEmptyString 
)
protectedinherited
void EDA_3D_VIEWER::DisplayHotKeys ( )
private

Definition at line 96 of file 3d-viewer/3d_viewer/hotkeys.cpp.

References DisplayHotkeyList().

Referenced by GetSettings(), and Process_Special_Functions().

97 {
99 }
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 223 of file eda_base_frame.cpp.

Referenced by EDA_BASE_FRAME::isAutoSaveRequired(), and EDA_BASE_FRAME::onAutoSaveTimer().

224 {
225  wxCHECK_MSG( false, true, wxT( "Auto save timer function not overridden. Bad programmer!" ) );
226 }
void EDA_3D_VIEWER::Exit3DFrame ( wxCommandEvent &  event)
private

Called when user press the File->Exit.

Definition at line 242 of file eda_3d_viewer.cpp.

References m_logTrace.

Referenced by GetSettings().

243 {
244  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::Exit3DFrame" );
245 
246  Close( true );
247 }
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 738 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, EDA_FILE_SELECTOR(), and Prj().

Referenced by PANEL_HOTKEYS_EDITOR::installButtons(), and EDA_BASE_FRAME::SaveProjectSettings().

740 {
741  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
742  wxString mask = wxT( "*." ) + ext;
743 
744 #if 0
745  wxString path = wxPathOnly( Prj().GetProjectFullName() );
746 #else
747  wxString path = GetMruPath();
748 #endif
749  wxFileName fn( aDefaultShortname );
750  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
751 
752  wxString filename = EDA_FILE_SELECTOR( _( "Write Hotkey Configuration File:" ),
753  path,
754  fn.GetFullPath(),
755  ext,
756  mask,
757  this,
758  wxFD_SAVE,
759  true );
760 
761  if( filename.IsEmpty() )
762  return;
763 
764  WriteHotkeyConfig( aDescList, &filename );
765  SetMruPath( wxFileName( filename ).GetPath() );
766 }
void SetMruPath(const wxString &aPath)
PROJECT & Prj()
Definition: kicad.cpp:292
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
int EDA_BASE_FRAME::GetAutoSaveInterval ( ) const
inlineinherited

Definition at line 217 of file eda_base_frame.h.

References EDA_BASE_FRAME::m_autoSaveInterval.

217 { return m_autoSaveInterval; }
int m_autoSaveInterval
The auto save interval time in seconds.
BOARD* EDA_3D_VIEWER::GetBoard ( )
inline

Definition at line 62 of file eda_3d_viewer.h.

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

Referenced by ReloadRequest().

62 { return Parent()->GetBoard(); }
PCB_BASE_FRAME * Parent() const
Definition: eda_3d_viewer.h:60
BOARD * GetBoard() const
const wxFileName& EDA_3D_VIEWER::GetDefaultFileName ( ) const
inline
Returns
the default suggested file name

Definition at line 98 of file eda_3d_viewer.h.

References m_defaultSaveScreenshotFileName.

wxFileName m_defaultSaveScreenshotFileName
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 399 of file eda_base_frame.cpp.

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

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

401 {
402  wxFileHistory* fileHistory = aFileHistory;
403 
404  if( !fileHistory )
405  fileHistory = &Kiface().GetFileHistory();
406 
407  int baseId = fileHistory->GetBaseId();
408 
409  wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() );
410 
411  unsigned i = cmdId - baseId;
412 
413  if( i < fileHistory->GetCount() )
414  {
415  wxString fn = fileHistory->GetHistoryFile( i );
416 
417  if( wxFileName::FileExists( fn ) )
418  return fn;
419  else
420  {
421  wxString msg = wxString::Format( _( "File \"%s\" was not found." ), fn );
422  wxMessageBox( msg );
423 
424  fileHistory->RemoveFileFromHistory( i );
425  }
426  }
427 
428  return wxEmptyString;
429 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
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
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123
size_t i
Definition: json11.cpp:597
void EDA_BASE_FRAME::GetKicadAbout ( wxCommandEvent &  event)
inherited

Definition at line 506 of file eda_base_frame.cpp.

References ShowAboutDialog().

Referenced by add_search_paths(), and EDA_BASE_FRAME::IsType().

507 {
508  void ShowAboutDialog(EDA_BASE_FRAME * aParent); // See AboutDialog_main.cpp
509  ShowAboutDialog( this );
510 }
void ShowAboutDialog(EDA_BASE_FRAME *aParent)
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
void EDA_BASE_FRAME::GetKicadContribute ( wxCommandEvent &  event)
inherited

Definition at line 493 of file eda_base_frame.cpp.

References URL_GET_INVOLVED.

Referenced by add_search_paths(), and EDA_BASE_FRAME::IsType().

494 {
495  if( !wxLaunchDefaultBrowser( URL_GET_INVOLVED ) )
496  {
497  wxString msg;
498  msg.Printf( _( "Could not launch the default browser.\n"
499  "For information on how to help the KiCad project, visit %s" ),
501  wxMessageBox( msg, _( "Get involved with KiCad" ), wxOK, this );
502  }
503 }
#define URL_GET_INVOLVED
void EDA_BASE_FRAME::GetKicadHelp ( wxCommandEvent &  event)
inherited

Definition at line 432 of file eda_base_frame.cpp.

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

Referenced by add_search_paths(), and EDA_BASE_FRAME::IsType().

433 {
434  const SEARCH_STACK& search = sys_search();
435 
436  /* We have to get document for beginners,
437  * or the full specific doc
438  * if event id is wxID_INDEX, we want the document for beginners.
439  * else the specific doc file (its name is in Kiface().GetHelpFileName())
440  * The document for beginners is the same for all KiCad utilities
441  */
442  if( event.GetId() == wxID_INDEX )
443  {
444  // List of possible names for Getting Started in KiCad
445  const wxChar* names[2] = {
446  wxT( "getting_started_in_kicad" ),
447  wxT( "Getting_Started_in_KiCad" )
448  };
449 
450  wxString helpFile;
451  // Search for "getting_started_in_kicad.html" or "getting_started_in_kicad.pdf"
452  // or "Getting_Started_in_KiCad.html" or "Getting_Started_in_KiCad.pdf"
453  for( unsigned ii = 0; ii < arrayDim( names ); ii++ )
454  {
455  helpFile = SearchHelpFileFullPath( search, names[ii] );
456 
457  if( !helpFile.IsEmpty() )
458  break;
459  }
460 
461  if( !helpFile )
462  {
463  wxString msg = wxString::Format( _(
464  "Html or pdf help file \n\"%s\"\n or\n\"%s\" could not be found." ), names[0], names[1] );
465  wxMessageBox( msg );
466  }
467  else
468  {
469  GetAssociatedDocument( this, helpFile );
470  }
471 
472  return;
473  }
474 
475  wxString base_name = help_name();
476  wxString helpFile = SearchHelpFileFullPath( search, base_name );
477 
478  if( !helpFile )
479  {
480  wxString msg = wxString::Format( _(
481  "Help file \"%s\" could not be found." ),
482  GetChars( base_name )
483  );
484  wxMessageBox( msg );
485  }
486  else
487  {
488  GetAssociatedDocument( this, helpFile );
489  }
490 }
wxString SearchHelpFileFullPath(const SEARCH_STACK &aSearchStack, const wxString &aBaseName)
Return the help file&#39;s full path.
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, const wxPathList *aPaths)
Function GetAssociatedDocument open a document (file) with the suitable browser.
Definition: eda_doc.cpp:87
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...
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
of elements in an array. This implements type-safe compile time checking
Definition: macros.h:99
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()
EDA_UNITS_T KIWAY_HOLDER::GetUserUnits ( ) const
inherited

Function GetUserUnits Allows participation in KEYWAY_PLAYER/DIALOG_SHIM userUnits inheritance.

This would fit better in KEYWAY_PLAYER, but DIALOG_SHIMs can only use mix-ins because their primary superclass must be wxDialog.

Definition at line 40 of file kiway_holder.cpp.

References MILLIMETRES.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), and KIWAY_HOLDER::Kiway().

41 {
42  return MILLIMETRES;
43 }
wxString EDA_BASE_FRAME::help_name ( )
protectedvirtualinherited

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 375 of file eda_base_frame.cpp.

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

Referenced by EDA_BASE_FRAME::GetKicadHelp(), and EDA_BASE_FRAME::isAutoSaveRequired().

376 {
377  return Kiface().GetHelpFileName();
378 }
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:121
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 709 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, EDA_FILE_SELECTOR(), and ReadHotkeyConfigFile().

Referenced by PANEL_HOTKEYS_EDITOR::installButtons(), and EDA_BASE_FRAME::SaveProjectSettings().

711 {
712  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
713  wxString mask = wxT( "*." ) + ext;
714 
715 
716  wxString path = GetMruPath();
717  wxFileName fn( aDefaultShortname );
718  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
719 
720  wxString filename = EDA_FILE_SELECTOR( _( "Read Hotkey Configuration File:" ),
721  path,
722  fn.GetFullPath(),
723  ext,
724  mask,
725  this,
726  wxFD_OPEN,
727  true );
728 
729  if( filename.IsEmpty() )
730  return;
731 
732  ::ReadHotkeyConfigFile( filename, aDescList, false );
733  WriteHotkeyConfig( aDescList );
734  SetMruPath( wxFileName( filename ).GetPath() );
735 }
void SetMruPath(const wxString &aPath)
int ReadHotkeyConfigFile(const wxString &aFilename, struct EDA_HOTKEY_CONFIG *aDescList, const bool aDefaultLocation)
Function ReadHotkeyConfig Read hotkey configuration for a given app, possibly before the frame for th...
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
void EDA_3D_VIEWER::Install3DViewOptionDialog ( wxCommandEvent &  event)
private

Definition at line 49 of file dialog_3D_view_option.cpp.

Referenced by GetSettings().

50 {
51  DIALOG_3D_VIEW_OPTIONS dlg( this );
52 
53  if( dlg.ShowModal() == wxID_OK )
54  {
56 
57  NewDisplay( true );
58  }
59 }
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_menubar.cpp:350
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
virtual void EDA_BASE_FRAME::InstallPreferences ( PAGED_DIALOG aParent)
inlinevirtualinherited

Function InstallPreferences allows a Frame to load its preference panels (if any) into the preferences dialog.

Parameters
aParenta paged dialog into which the preference panels should be installed

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, LIB_EDIT_FRAME, GERBVIEW_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 238 of file eda_base_frame.h.

References EDA_BASE_FRAME::LoadSettings(), and EDA_BASE_FRAME::SaveSettings().

Referenced by EDA_BASE_FRAME::ShowPreferences().

238 { }
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 173 of file eda_base_frame.h.

References EDA_BASE_FRAME::config(), EDA_BASE_FRAME::doAutoSave(), EDA_BASE_FRAME::EDA_BASE_FRAME(), EDA_BASE_FRAME::help_name(), EDA_BASE_FRAME::ProcessEvent(), EDA_BASE_FRAME::SetAutoSaveInterval(), EDA_BASE_FRAME::sys_search(), and EDA_BASE_FRAME::~EDA_BASE_FRAME().

Referenced by EDA_BASE_FRAME::ProcessEvent().

173 { 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 156 of file kiway_player.cpp.

References KIWAY_PLAYER::m_modal_loop.

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

157 {
158  return !m_modal_loop;
159 }
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:250
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 541 of file eda_base_frame.cpp.

References GetChars().

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

542 {
543  wxString msg;
544  wxFileName fn = aFileName;
545 
546  // Check for absence of a file path with a file name. Unfortunately KiCad
547  // uses paths relative to the current project path without the ./ part which
548  // confuses wxFileName. Making the file name path absolute may be less than
549  // elegant but it solves the problem.
550  if( fn.GetPath().IsEmpty() && fn.HasName() )
551  fn.MakeAbsolute();
552 
553  wxCHECK_MSG( fn.IsOk(), false,
554  wxT( "File name object is invalid. Bad programmer!" ) );
555  wxCHECK_MSG( !fn.GetPath().IsEmpty(), false,
556  wxT( "File name object path <" ) + fn.GetFullPath() +
557  wxT( "> is not set. Bad programmer!" ) );
558 
559  if( fn.IsDir() && !fn.IsDirWritable() )
560  {
561  msg.Printf( _( "You do not have write permissions to folder \"%s\"." ),
562  GetChars( fn.GetPath() ) );
563  }
564  else if( !fn.FileExists() && !fn.IsDirWritable() )
565  {
566  msg.Printf( _( "You do not have write permissions to save file \"%s\" to folder \"%s\"." ),
567  GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
568  }
569  else if( fn.FileExists() && !fn.IsFileWritable() )
570  {
571  msg.Printf( _( "You do not have write permissions to save file \"%s\"." ),
572  GetChars( fn.GetFullPath() ) );
573  }
574 
575  if( !msg.IsEmpty() )
576  {
577  wxMessageBox( msg );
578  return false;
579  }
580 
581  return true;
582 }
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::GetUserUnits(), KIWAY_HOLDER::m_kiway, KIWAY_HOLDER::Prj(), KIWAY_HOLDER::SetKiway(), and VTBL_ENTRY.

Referenced by TREEPROJECT_ITEM::Activate(), PCB_BASE_EDIT_FRAME::AddLibrary(), SCH_EDIT_FRAME::AppendSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), CVPCB_MAINFRAME::CreateScreenCmp(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::KiwayMailIn(), KIWAY_PLAYER::language_change(), KICAD_MANAGER_FRAME::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), KICAD_MANAGER_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), KICAD_MANAGER_FRAME::OnEditFpLibTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), KICAD_MANAGER_FRAME::OnEditSymLibTable(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLeftClick(), SCH_BASE_FRAME::OnOpenLibraryViewer(), KICAD_MANAGER_FRAME::OnRunPcbFpEditor(), KICAD_MANAGER_FRAME::OnRunSchLibEditor(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_WIZARD_FRAME::ReCreateVToolbar(), LIB_EDIT_FRAME::refreshSchematic(), KICAD_MANAGER_FRAME::RunEeschema(), KICAD_MANAGER_FRAME::RunPcbNew(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), EDA_BASE_FRAME::ShowPreferences(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::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:94
void KIWAY_PLAYER::kiway_express ( KIWAY_EXPRESS aEvent)
protectedinherited

event handler, routes to derivative specific virtual KiwayMailIn()

Definition at line 177 of file kiway_player.cpp.

References KIWAY_PLAYER::KiwayMailIn().

178 {
179  // logging support
180  KiwayMailIn( aEvent ); // call the virtual, override in derived.
181 }
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
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 LIB_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, SCH_EDIT_FRAME, PCB_EDIT_FRAME, and CVPCB_MAINFRAME.

Definition at line 71 of file kiway_player.cpp.

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

72 {
73  // override this in derived classes.
74 }
void KIWAY_PLAYER::language_change ( wxCommandEvent &  event)
protectedinherited

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

Definition at line 184 of file kiway_player.cpp.

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

185 {
186  int id = event.GetId();
187 
188  // tell all the KIWAY_PLAYERs about the language change.
189  Kiway().SetLanguage( id );
190 }
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:395
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 692 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_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_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, keyRenderEngine, keyRenderMaterial, keyRenderOGL_ShowCopperTck, keyRenderOGL_ShowModelBBox, keyRenderRAY_AAliasing, keyRenderRAY_Backfloor, keyRenderRAY_PostProcess, keyRenderRAY_ProceduralT, keyRenderRAY_Reflections, keyRenderRAY_Refractions, keyRenderRAY_Shadows, 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 GetSettings(), and Process_Special_Functions().

693 {
695 
696  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::LoadSettings" );
697 
698  aCfg->Read( keyBgColor_Red, &m_settings.m_BgColorBot.r, 0.4 );
699  aCfg->Read( keyBgColor_Green, &m_settings.m_BgColorBot.g, 0.4 );
700  aCfg->Read( keyBgColor_Blue, &m_settings.m_BgColorBot.b, 0.5 );
701 
702  aCfg->Read( keyBgColor_Red_Top, &m_settings.m_BgColorTop.r, 0.8 );
703  aCfg->Read( keyBgColor_Green_Top, &m_settings.m_BgColorTop.g, 0.8 );
704  aCfg->Read( keyBgColor_Blue_Top, &m_settings.m_BgColorTop.b, 0.9 );
705 
706  // m_SolderMaskColor default value = dark grey-green
707  aCfg->Read( keySMaskColor_Red, &m_settings.m_SolderMaskColor.r, 100.0 * 0.2 / 255.0 );
708  aCfg->Read( keySMaskColor_Green, &m_settings.m_SolderMaskColor.g, 255.0 * 0.2 / 255.0 );
709  aCfg->Read( keySMaskColor_Blue, &m_settings.m_SolderMaskColor.b, 180.0 * 0.2 / 255.0 );
710 
711  // m_SolderPasteColor default value = light grey
712  aCfg->Read( keySPasteColor_Red, &m_settings.m_SolderPasteColor.r, 128.0 /255.0 );
713  aCfg->Read( keySPasteColor_Green, &m_settings.m_SolderPasteColor.g, 128.0 /255.0 );
714  aCfg->Read( keySPasteColor_Blue, &m_settings.m_SolderPasteColor.b, 128.0 /255.0 );
715 
716  // m_SilkScreenColor default value = white
717  aCfg->Read( keySilkColor_Red, &m_settings.m_SilkScreenColor.r, 0.9 );
718  aCfg->Read( keySilkColor_Green, &m_settings.m_SilkScreenColor.g, 0.9 );
719  aCfg->Read( keySilkColor_Blue, &m_settings.m_SilkScreenColor.b, 0.9 );
720 
721  // m_CopperColor default value = gold
722  aCfg->Read( keyCopperColor_Red, &m_settings.m_CopperColor.r, 255.0 * 0.7 / 255.0 );
723  aCfg->Read( keyCopperColor_Green, &m_settings.m_CopperColor.g, 223.0 * 0.7 / 255.0 );
724  aCfg->Read( keyCopperColor_Blue, &m_settings.m_CopperColor.b, 0.0 );
725 
726  // m_BoardBodyColor default value = FR4, in realistic mode
727  aCfg->Read( keyBoardBodyColor_Red, &m_settings.m_BoardBodyColor.r, 51.0 / 255.0 );
728  aCfg->Read( keyBoardBodyColor_Green, &m_settings.m_BoardBodyColor.g, 43.0 / 255.0 );
729  aCfg->Read( keyBoardBodyColor_Blue, &m_settings.m_BoardBodyColor.b, 22.0 /255.0 );
730 
731 
732  bool tmp;
733  aCfg->Read( keyShowRealisticMode, &tmp, true );
735 
736  // OpenGL options
737  aCfg->Read( keyRenderOGL_ShowCopperTck, &tmp, true );
739 
740  aCfg->Read( keyRenderOGL_ShowModelBBox, &tmp, false );
742 
743  // Raytracing options
744  aCfg->Read( keyRenderRAY_Shadows, &tmp, true );
746 
747  aCfg->Read( keyRenderRAY_Backfloor, &tmp, true );
749 
750  aCfg->Read( keyRenderRAY_Refractions, &tmp, true );
752 
753  aCfg->Read( keyRenderRAY_Reflections, &tmp, true );
755 
756  aCfg->Read( keyRenderRAY_PostProcess, &tmp, true );
758 
759  aCfg->Read( keyRenderRAY_AAliasing, &tmp, true );
761 
762  aCfg->Read( keyRenderRAY_ProceduralT, &tmp, true );
764 
765  aCfg->Read( keyShowAxis, &tmp, true );
766  m_settings.SetFlag( FL_AXIS, tmp );
767 
768  aCfg->Read( keyShowFootprints_Normal, &tmp, true );
770 
771  aCfg->Read( keyShowFootprints_Insert, &tmp, true );
773 
774  aCfg->Read( keyShowFootprints_Virtual, &tmp, true );
776 
777  aCfg->Read( keyShowZones, &tmp, true );
778  m_settings.SetFlag( FL_ZONE, tmp );
779 
780  aCfg->Read( keyShowAdhesiveLayers, &tmp, true );
782 
783  aCfg->Read( keyShowSilkScreenLayers, &tmp, true );
785 
786  aCfg->Read( keyShowSolderMaskLayers, &tmp, true );
788 
789  aCfg->Read( keyShowSolderPasteLayers, &tmp, true );
791 
792  aCfg->Read( keyShowCommentsLayer, &tmp, true );
794 
795  aCfg->Read( keyShowEcoLayers, &tmp, true );
796  m_settings.SetFlag( FL_ECO, tmp );
797 
798  aCfg->Read( keyShowBoardBody, &tmp, true );
800 
801  int tmpi;
802  aCfg->Read( keyShowGrid, &tmpi, (int)GRID3D_NONE );
803  m_settings.GridSet( (GRID3D_TYPE)tmpi );
804 
805  aCfg->Read( keyRenderEngine, &tmpi, (int)RENDER_ENGINE_OPENGL_LEGACY );
807 
808  aCfg->Read( keyRenderMaterial, &tmpi, (int)MATERIAL_MODE_NORMAL );
810 }
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[]
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 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.
static const wxChar keyBgColor_Green[]
static const wxChar keyBoardBodyColor_Blue[]
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:90
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:71
static const wxChar keyRenderOGL_ShowModelBBox[]
static const wxChar keySPasteColor_Green[]
Use all material properties from model file.
Definition: 3d_enums.h:92
static const wxChar keyBoardBodyColor_Red[]
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
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 keySMaskColor_Blue[]
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:82
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::NewDisplay ( bool  aForceImmediateRedraw = false)

Reload and refresh (rebuild) the 3D scene.

Warning: rebuilding the 3D scene can take a bit of time, so rebuilding the scene can be immediate, or made later, during the next 3D canvas refresh (on zoom for instance)

Parameters
aForceImmediateRedraw= true to immediately rebuild the 3D scene, false to wait a refresh later.

Definition at line 231 of file eda_3d_viewer.cpp.

References m_canvas, and ReloadRequest().

Referenced by GetBoard(), PCB_EDIT_FRAME::OpenProjectFiles(), Process_Special_Functions(), Set3DBoardBodyColorFromUser(), Set3DCopperColorFromUser(), Set3DSilkScreenColorFromUser(), Set3DSolderMaskColorFromUser(), Set3DSolderPasteColorFromUser(), FOOTPRINT_WIZARD_FRAME::Update3D_Frame(), and PCB_BASE_FRAME::Update3DView().

232 {
233  ReloadRequest();
234 
235  // After the ReloadRequest call, the refresh often takes a bit of time,
236  // and it is made here only on request.
237  if( aForceImmediateRedraw )
238  m_canvas->Refresh();
239 }
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void ReloadRequest()
Request reloading the 3D view.
void EDA_3D_VIEWER::On3DGridSelection ( wxCommandEvent &  event)
private

Definition at line 543 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().

Referenced by GetSettings().

544 {
545  int id = event.GetId();
546 
547  wxASSERT( id < ID_MENU3D_GRID_END );
548  wxASSERT( id > ID_MENU3D_GRID );
549 
550  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::On3DGridSelection id:%d", id );
551 
552  switch( id )
553  {
556  break;
557 
560  break;
561 
562  case ID_MENU3D_GRID_5_MM:
564  break;
565 
568  break;
569 
570  case ID_MENU3D_GRID_1_MM:
572  break;
573 
574  default:
575  wxLogMessage( "EDA_3D_VIEWER::On3DGridSelection() error: unknown command %d", id );
576  return;
577  }
578 
579  if( m_canvas )
581 }
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 663 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings().

664 {
665  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnActivate" );
666 
667  if( m_canvas )
668  {
669  // Reload data if 3D frame shows a board,
670  // because it can be changed since last frame activation
673 
674  // Activates again the focus of the canvas so it will catch mouse and key events
675  m_canvas->SetFocus();
676  }
677 
678  event.Skip(); // required under wxMAC
679 }
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 216 of file eda_base_frame.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().

217 {
218  if( !doAutoSave() )
219  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
220 }
virtual bool doAutoSave()
Function doAutoSave should be overridden by the derived class to handle the auto save feature...
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_3D_VIEWER::OnCloseWindow ( wxCloseEvent &  event)
private

Definition at line 250 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings().

251 {
252  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnCloseWindow" );
253 
254  if( m_canvas )
255  m_canvas->Close();
256 
257  // m_canvas delete will be called by wxWidget manager
258  //delete m_canvas;
259  //m_canvas = 0;
260 
261  Destroy();
262  event.Skip( true );
263 }
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::OnKeyEvent ( wxKeyEvent &  event)
private

Definition at line 898 of file eda_3d_viewer.cpp.

References m_canvas, and EDA_3D_CANVAS::OnKeyEvent().

Referenced by EDA_3D_VIEWER(), GetSettings(), and ~EDA_3D_VIEWER().

899 {
900  if( m_canvas )
901  return m_canvas->OnKeyEvent( event );
902 
903  event.Skip();
904 }
EDA_3D_CANVAS * m_canvas
The canvas where the openGL context will be rendered.
void OnKeyEvent(wxKeyEvent &event)
void EDA_3D_VIEWER::OnLeftClick ( wxDC *  DC,
const wxPoint &  MousePos 
)
private

Definition at line 884 of file eda_3d_viewer.cpp.

References m_logTrace.

Referenced by GetSettings().

885 {
886  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnLeftClick" );
887  // Do nothing
888 }
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 584 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().

Referenced by GetSettings().

585 {
586  int id = event.GetId();
587 
588  wxASSERT( id < ID_MENU3D_ENGINE_END );
589  wxASSERT( id > ID_MENU3D_ENGINE );
590 
591  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnRenderEngineSelection id:%d", id );
592 
593  const RENDER_ENGINE old_engine = m_settings.RenderEngineGet();
594 
595  switch( id )
596  {
598  if( old_engine != RENDER_ENGINE_OPENGL_LEGACY )
600  break;
601 
603  if( old_engine != RENDER_ENGINE_RAYTRACING )
605  break;
606 
607  default:
608  wxLogMessage( "EDA_3D_VIEWER::OnRenderEngineSelection() error: unknown command %d", id );
609  return;
610  }
611 
612  if( old_engine != m_settings.RenderEngineGet() )
613  {
615  }
616 }
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:82
void EDA_3D_VIEWER::OnRightClick ( const wxPoint &  MousePos,
wxMenu *  PopMenu 
)
private

Definition at line 891 of file eda_3d_viewer.cpp.

References m_logTrace.

Referenced by GetSettings().

892 {
893  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnRightClick" );
894  // Do nothing
895 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_3D_VIEWER::OnSetFocus ( wxFocusEvent &  event)
private

Definition at line 682 of file eda_3d_viewer.cpp.

References m_canvas.

Referenced by GetSettings().

683 {
684  // Activates again the focus of the canvas so it will catch mouse and key events
685  if( m_canvas )
686  m_canvas->SetFocus();
687 
688  event.Skip();
689 }
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 619 of file eda_3d_viewer.cpp.

References SetMenuBarOptionsState().

Referenced by GetSettings().

620 {
622  // to have it working this way
624 }
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_menubar.cpp:350
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 179 of file kiway_player.h.

References VTBL_ENTRY.

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

180  {
181  // overload me for your wxFrame type.
182 
183  // Any overload should probably do this also:
184  // Prj().MaybeLoadProjectSettings();
185 
186  // Then update the window title.
187 
188  return false;
189  }
PCB_BASE_FRAME* EDA_3D_VIEWER::Parent ( ) const
inline

Definition at line 60 of file eda_3d_viewer.h.

Referenced by PCB_BASE_FRAME::CreateAndShow3D_Frame(), GetBoard(), takeScreenshot(), and PCB_BASE_FRAME::Update3DView().

60 { 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 654 of file eda_base_frame.cpp.

Referenced by EDA_BASE_FRAME::GetMruPath(), 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().

655 {
656  if( evt_type != 0 )
657  {
658  wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED );
659  evt.SetEventObject( this );
660  evt.SetId( evt_type );
661  wxPostEvent( this, evt );
662  return true;
663  }
664 
665  return false;
666 }
void EDA_BASE_FRAME::PrintMsg ( const wxString &  text)
inherited

Definition at line 381 of file eda_base_frame.cpp.

Referenced by EDA_BASE_FRAME::IsType().

382 {
383  SetStatusText( text );
384 }
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 PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::Files_io_from_id(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), KIWAY_HOLDER::Kiway(), LIB_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), KICAD_MANAGER_FRAME::LoadProject(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), CVPCB_MAINFRAME::OnConfigurePaths(), FOOTPRINT_EDIT_FRAME::OnConfigurePaths(), KICAD_MANAGER_FRAME::OnCreateProjectFromTemplate(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), KICAD_MANAGER_FRAME::OnRunGerbview(), DIALOG_BOM::OnRunPlugin(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), KICAD_MANAGER_FRAME::OnSaveProject(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Process_Config(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::saveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), KICAD_MANAGER_FRAME::SetProjectFileName(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), LAUNCHER_PANEL::~LAUNCHER_PANEL(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

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:142
void EDA_3D_VIEWER::Process_Special_Functions ( wxCommandEvent &  event)
private

Definition at line 267 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_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_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_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_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(), NewDisplay(), 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().

Referenced by GetSettings().

268 {
269  int id = event.GetId();
270  bool isChecked = event.IsChecked();
271 
272  wxLogTrace( m_logTrace,
273  "EDA_3D_VIEWER::Process_Special_Functions id:%d isChecked:%d",
274  id, isChecked );
275 
276  if( m_canvas == NULL )
277  return;
278 
279  switch( id )
280  {
283  break;
284 
285  case ID_RELOAD3D_BOARD:
286  NewDisplay( true );
287  break;
288 
289  case ID_ROTATE3D_X_POS:
290  m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) );
292  break;
293 
294  case ID_ROTATE3D_X_NEG:
295  m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) );
297  break;
298 
299  case ID_ROTATE3D_Y_POS:
300  m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) );
302  break;
303 
304  case ID_ROTATE3D_Y_NEG:
305  m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) );
307  break;
308 
309  case ID_ROTATE3D_Z_POS:
310  m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) );
312  break;
313 
314  case ID_ROTATE3D_Z_NEG:
315  m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) );
317  break;
318 
319  case ID_MOVE3D_LEFT:
320  m_canvas->SetView3D( WXK_LEFT );
321  return;
322 
323  case ID_MOVE3D_RIGHT:
324  m_canvas->SetView3D( WXK_RIGHT );
325  return;
326 
327  case ID_MOVE3D_UP:
328  m_canvas->SetView3D( WXK_UP );
329  return;
330 
331  case ID_MOVE3D_DOWN:
332  m_canvas->SetView3D( WXK_DOWN );
333  return;
334 
335  case ID_ORTHO:
338  return;
339 
343  takeScreenshot( event );
344  return;
345 
347  if( Set3DColorFromUser( m_settings.m_BgColorBot, _( "Background Color, Bottom" ),
348  nullptr ) )
349  {
352  else
353  NewDisplay( true );
354  }
355  return;
356 
358  if( Set3DColorFromUser( m_settings.m_BgColorTop, _( "Background Color, Top" ), nullptr ) )
359  {
362  else
363  NewDisplay( true );
364  }
365  return;
366 
369  return;
370 
373  return;
374 
377  return;
378 
381  break;
382 
385  break;
386 
390  NewDisplay( true );
391  return;
392 
395  NewDisplay( true );
396  return;
397 
400  NewDisplay( true );
401  return;
402 
405  NewDisplay( true );
406  return;
407 
410  NewDisplay( true );
411  return;
412 
416  return;
417 
421  return;
422 
425  NewDisplay( true );
426  return;
427 
430  NewDisplay( true );
431  return;
432 
436  return;
437 
441  return;
442 
445  NewDisplay( true );
446  return;
447 
451  return;
452 
454  m_settings.SetFlag( FL_SHOW_BOARD_BODY, isChecked );
455  NewDisplay( true );
456  return;
457 
459  m_settings.SetFlag( FL_AXIS, isChecked );
461  return;
462 
465  NewDisplay( true );
466  return;
467 
470  NewDisplay( true );
471  return;
472 
475  NewDisplay( true );
476  return;
477 
479  m_settings.SetFlag( FL_ZONE, isChecked );
480  NewDisplay( true );
481  return;
482 
484  m_settings.SetFlag( FL_ADHESIVE, isChecked );
485  NewDisplay( true );
486  return;
487 
489  m_settings.SetFlag( FL_SILKSCREEN, isChecked );
490  NewDisplay( true );
491  return;
492 
494  m_settings.SetFlag( FL_SOLDERMASK, isChecked );
495  NewDisplay( true );
496  return;
497 
499  m_settings.SetFlag( FL_SOLDERPASTE, isChecked );
500  NewDisplay( true );
501  return;
502 
504  m_settings.SetFlag( FL_COMMENTS, isChecked );
505  NewDisplay( true );
506  return;
507 
508  case ID_MENU3D_ECO_ONOFF:
509  m_settings.SetFlag( FL_ECO, isChecked );
510  NewDisplay( true );
511  return;
512 
514  {
515  // Reload settings with a dummy config, so it will load the defaults
516  wxConfig *fooconfig = new wxConfig("FooBarApp");
517  LoadSettings( fooconfig );
518  delete fooconfig;
519 
520  // Refresh menu option state
522 
523  // Tell canvas that we (may have) changed the render engine
525 
526  NewDisplay( true );
527  }
528  return;
529 
531  {
532  DisplayHotKeys();
533  }
534  return;
535 
536  default:
537  wxLogMessage( "EDA_3D_VIEWER::Process_Special_Functions() error: unknown command %d", id );
538  return;
539  }
540 }
bool Set3DCopperColorFromUser()
Set the copper color from a set of colors.
Use only diffuse material properties.
Definition: 3d_enums.h:93
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
bool 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_menubar.cpp:350
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.
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
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()
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:94
bool 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:92
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
CCAMERA & CameraGet() const
CameraGet - get current camera in use.
Definition: cinfo3d_visu.h:210
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.
#define ROT_ANGLE
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
bool Set3DBoardBodyColorFromUser()
Set the copper color from a set of colors.
void takeScreenshot(wxCommandEvent &event)
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 158 of file eda_base_frame.cpp.

References EDA_BASE_FRAME::findQuasiModalDialog(), 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 EDA_BASE_FRAME::isAutoSaveRequired(), STATUS_POPUP::onCharHook(), LIB_VIEW_FRAME::onSelectNextSymbol(), LIB_VIEW_FRAME::onSelectPreviousSymbol(), KIWAY::ProcessEvent(), LIB_VIEW_FRAME::ReCreateListCmp(), CVPCB_CONTROL::SwitchUnits(), GERBVIEW_CONTROL::SwitchUnits(), and PCBNEW_CONTROL::SwitchUnits().

159 {
160 #ifdef __WXMAC__
161  // Apple in its infinite wisdom will raise a disabled window before even passing
162  // us the event, so we have no way to stop it. Instead, we have to catch an
163  // improperly ordered disabled window and quasi-modal dialog here and reorder
164  // them.
165  if( !IsEnabled() && IsActive() )
166  {
167  wxWindow* dlg = findQuasiModalDialog();
168  if( dlg )
169  dlg->Raise();
170  }
171 #endif
172 
173  if( !wxFrame::ProcessEvent( aEvent ) )
174  return false;
175 
176  if( IsShown() && m_hasAutoSave && IsActive() &&
178  {
179  if( !m_autoSaveState )
180  {
181  wxLogTrace( traceAutoSave, wxT( "Starting auto save timer." ) );
182  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
183  m_autoSaveState = true;
184  }
185  else if( m_autoSaveTimer->IsRunning() )
186  {
187  wxLogTrace( traceAutoSave, wxT( "Stopping auto save timer." ) );
188  m_autoSaveTimer->Stop();
189  m_autoSaveState = false;
190  }
191  }
192 
193  return true;
194 }
bool m_autoSaveState
Flag to indicate the last auto save state.
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
wxWindow * findQuasiModalDialog()
virtual bool isAutoSaveRequired() const
Function autoSaveRequired returns the auto save status of the application.
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_3D_VIEWER::ProcessZoom ( wxCommandEvent &  event)
private

Definition at line 627 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().

Referenced by GetSettings().

628 {
629  int id = event.GetId();
630 
631  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::ProcessZoom id:%d", id );
632 
633  if( m_canvas == NULL )
634  return;
635 
636  switch( id )
637  {
638  case ID_ZOOM_PAGE:
639  m_canvas->SetView3D( WXK_HOME );
640  break;
641 
642  case ID_ZOOM_IN:
643  m_canvas->SetView3D( WXK_F1 );
644  break;
645 
646  case ID_ZOOM_OUT:
647  m_canvas->SetView3D( WXK_F2 );
648  break;
649 
650  case ID_ZOOM_REDRAW:
652  break;
653 
654  default:
655  wxLogMessage( "EDA_3D_VIEWER::ProcessZoom() error: unknown command %d", id );
656  return;
657  }
658 
660 }
Definition: id.h:241
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.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.
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_TOOL_SET_VISIBLE_ITEMS, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, KiBitmap(), EDA_BASE_FRAME::KICAD_AUI_TB_STYLE, m_logTrace, EDA_BASE_FRAME::m_mainToolBar, and SetToolbars().

Referenced by GetSettings().

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  KICAD_AUI_TB_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_xpm ),
61  _( "Copy 3D image to clipboard" ) );
62 
63  m_mainToolBar->AddSeparator();
64 
65  m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
66  KiBitmap( read_setup_xpm ),
67  _( "Set display options, and some layers visibility" ) );
68  m_mainToolBar->AddSeparator();
69 
70  m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
71  KiBitmap( render_mode_xpm ),
72  _( "Render current view using Raytracing" ) );
73 
74  m_mainToolBar->AddSeparator();
75 
76  m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
77  _( "Zoom in" ) );
78 
79  m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
80  _( "Zoom out" ) );
81 
82  m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
83  KiBitmap( zoom_redraw_xpm ),
84  _( "Redraw view" ) );
85 
86  m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
87  _( "Zoom to fit 3D model" ) );
88 
89  m_mainToolBar->AddSeparator();
90  m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
91  KiBitmap( rotate_neg_x_xpm ),
92  _( "Rotate X Clockwise" ) );
93 
94  m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
95  KiBitmap( rotate_pos_x_xpm ),
96  _( "Rotate X Counterclockwise" ) );
97 
98  m_mainToolBar->AddSeparator();
99  m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
100  KiBitmap( rotate_neg_y_xpm ),
101  _( "Rotate Y Clockwise" ) );
102 
103  m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
104  KiBitmap( rotate_pos_y_xpm ),
105  _( "Rotate Y Counterclockwise" ) );
106 
107  m_mainToolBar->AddSeparator();
108  m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
109  KiBitmap( rotate_neg_z_xpm ),
110  _( "Rotate Z Clockwise" ) );
111 
112  m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
113  KiBitmap( rotate_pos_z_xpm ),
114  _( "Rotate Z Counterclockwise" ) );
115 
116  m_mainToolBar->AddSeparator();
117  m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
118  _( "Move left" ) );
119 
120  m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
121  _( "Move right" ) );
122 
123  m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
124  _( "Move up" ) );
125 
126  m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
127  _( "Move down" ) );
128 
129  m_mainToolBar->AddSeparator();
130  m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
131  _( "Enable/Disable orthographic projection" ),
132  wxITEM_CHECK );
133 
134  m_mainToolBar->Realize();
135 }
Definition: id.h:241
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void SetToolbars()
Definition: 3d_toolbar.cpp:138
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars
void EDA_BASE_FRAME::ReCreateMenuBar ( void  )
virtualinherited
void EDA_3D_VIEWER::RedrawActiveWindow ( wxDC *  DC,
bool  EraseBg 
)
private

Definition at line 907 of file eda_3d_viewer.cpp.

References m_logTrace.

Referenced by GetSettings().

908 {
909  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::RedrawActiveWindow" );
910  // Do nothing
911 }
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void EDA_3D_VIEWER::ReloadRequest ( )

Request reloading the 3D view.

However the request will be executed only when the 3D canvas is refreshed. It allows one to prepare changes and request for 3D rebuild only when all changes are committed. This is made because the 3D rebuild can take a long time, and this rebuild cannot always made after each change, for calculation time reason.

Definition at line 223 of file eda_3d_viewer.cpp.

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

Referenced by GetBoard(), and NewDisplay().

224 {
225  // This will schedule a request to load later
226  if( m_canvas )
227  m_canvas->ReloadRequest( GetBoard(), Prj().Get3DCacheManager() );
228 }
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:62
void EDA_3D_VIEWER::RenderEngineChanged ( )
private

RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged.

Definition at line 995 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 GetSettings(), OnRenderEngineSelection(), and Process_Special_Functions().

996 {
997  if( m_canvas )
999 
1002 
1003  m_mainToolBar->Refresh();
1004 }
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.
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 283 of file eda_base_frame.h.

References EDA_BASE_FRAME::ExportHotkeyConfigToFile(), EDA_BASE_FRAME::GetFileFromHistory(), EDA_BASE_FRAME::ImportHotkeyConfigFromFile(), EDA_BASE_FRAME::UpdateFileHistory(), and EDA_BASE_FRAME::WriteHotkeyConfig().

Referenced by DIALOG_PAGES_SETTINGS::OnOkClick(), and SCH_EDIT_FRAME::Process_Config().

283 {};
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 813 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_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_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, keyRenderEngine, keyRenderMaterial, keyRenderOGL_ShowCopperTck, keyRenderOGL_ShowModelBBox, keyRenderRAY_AAliasing, keyRenderRAY_Backfloor, keyRenderRAY_PostProcess, keyRenderRAY_ProceduralT, keyRenderRAY_Reflections, keyRenderRAY_Refractions, keyRenderRAY_Shadows, 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().

Referenced by GetSettings().

814 {
816 
817  wxLogTrace( m_logTrace, "EDA_3D_VIEWER::SaveSettings" );
818 
819  aCfg->Write( keyBgColor_Red, m_settings.m_BgColorBot.r );
820  aCfg->Write( keyBgColor_Green, m_settings.m_BgColorBot.g );
821  aCfg->Write( keyBgColor_Blue, m_settings.m_BgColorBot.b );
822 
823  aCfg->Write( keyBgColor_Red_Top, m_settings.m_BgColorTop.r );
824  aCfg->Write( keyBgColor_Green_Top, m_settings.m_BgColorTop.g );
825  aCfg->Write( keyBgColor_Blue_Top, m_settings.m_BgColorTop.b );
826 
830 
834 
838 
839  aCfg->Write( keyCopperColor_Red, m_settings.m_CopperColor.r );
841  aCfg->Write( keyCopperColor_Blue, m_settings.m_CopperColor.b );
842 
846 
848 
849  aCfg->Write( keyRenderEngine, (int)m_settings.RenderEngineGet() );
850 
851  aCfg->Write( keyRenderMaterial, (int)m_settings.MaterialModeGet() );
852 
853  // OpenGL options
856 
857  // Raytracing options
865 
866  aCfg->Write( keyShowAxis, m_settings.GetFlag( FL_AXIS ) );
867  aCfg->Write( keyShowGrid, (int)m_settings.GridGet() );
868 
872 
873  aCfg->Write( keyShowZones, m_settings.GetFlag( FL_ZONE ) );
879  aCfg->Write( keyShowEcoLayers, m_settings.GetFlag( FL_ECO ) );
881 }
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[]
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 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. ...
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.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
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 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 ( )

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 1099 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings(), and Process_Special_Functions().

1100 {
1101  CUSTOM_COLORS_LIST definedColors;
1102 
1103  definedColors.push_back( CUSTOM_COLOR_ITEM( 51/255.0, 43/255.0, 22/255.0,
1104  "FR4 natural, dark" ) );
1105  definedColors.push_back( CUSTOM_COLOR_ITEM( 109/255.0, 116/255.0, 75/255.0, "FR4 natural" ) );
1106  definedColors.push_back( CUSTOM_COLOR_ITEM( 78/255.0, 14/255.0, 5/255.0, "brown/red" ) );
1107  definedColors.push_back( CUSTOM_COLOR_ITEM( 146/255.0, 99/255.0, 47/255.0, "brown 1" ) );
1108  definedColors.push_back( CUSTOM_COLOR_ITEM( 160/255.0, 123/255.0, 54/255.0, "brown 2" ) );
1109  definedColors.push_back( CUSTOM_COLOR_ITEM( 146/255.0, 99/255.0, 47/255.0, "brown 3" ) );
1110  definedColors.push_back( CUSTOM_COLOR_ITEM( 63/255.0, 126/255.0, 71/255.0, "green 1" ) );
1111  definedColors.push_back( CUSTOM_COLOR_ITEM( 117/255.0, 122/255.0, 90/255.0, "green 2" ) );
1112 
1113  bool change = Set3DColorFromUser( m_settings.m_BoardBodyColor, _( "Board Body Color" ),
1114  &definedColors );
1115  if( change )
1116  NewDisplay( true );
1117 
1118  return change;
1119 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
a class to handle a custom color (predefined color) for the color picker dialog
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:505
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
bool EDA_3D_VIEWER::Set3DColorFromUser ( SFVEC3D aColor,
const wxString &  aTitle,
CUSTOM_COLORS_LIST aPredefinedColors 
)

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 CUSTOM_COLOR_ITEM list which contains a few predefined colors if empty, no predefined colors are used. no change if aborted by user

Definition at line 1007 of file eda_3d_viewer.cpp.

References KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, DIALOG_COLOR_PICKER::GetColor(), and KIGFX::COLOR4D::r.

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

1009 {
1010  KIGFX::COLOR4D newcolor;
1011  KIGFX::COLOR4D oldcolor( aColor.r,aColor.g, aColor.b, 1.0 );
1012 
1013  DIALOG_COLOR_PICKER picker( this, oldcolor, false, aPredefinedColors );
1014 
1015  if( picker.ShowModal() != wxID_OK )
1016  return false;
1017 
1018  newcolor = picker.GetColor();
1019 
1020  if( newcolor == oldcolor )
1021  return false;
1022 
1023  aColor.r = newcolor.r;
1024  aColor.g = newcolor.g;
1025  aColor.b = newcolor.b;
1026 
1027  return true;
1028 }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
bool EDA_3D_VIEWER::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 1080 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings(), and Process_Special_Functions().

1081 {
1082  CUSTOM_COLORS_LIST definedColors;
1083 
1084  definedColors.push_back( CUSTOM_COLOR_ITEM( 184/255.0, 115/255.0, 50/255.0, "Copper" ) );
1085  definedColors.push_back( CUSTOM_COLOR_ITEM( 178/255.0, 156/255.0, 0.0, "Gold" ) );
1086  definedColors.push_back( CUSTOM_COLOR_ITEM( 213/255.0, 213/255.0, 213/255.0, "Silver" ) );
1087  definedColors.push_back( CUSTOM_COLOR_ITEM( 160/255.0, 160/255.0, 160/255.0, "Tin" ) );
1088 
1089  bool change = Set3DColorFromUser( m_settings.m_CopperColor, _( "Copper Color" ),
1090  &definedColors );
1091 
1092  if( change )
1093  NewDisplay( true );
1094 
1095  return change;
1096 }
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
a class to handle a custom color (predefined color) for the color picker dialog
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
bool EDA_3D_VIEWER::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 1031 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings(), and Process_Special_Functions().

1032 {
1033  CUSTOM_COLORS_LIST definedColors;
1034  definedColors.push_back( CUSTOM_COLOR_ITEM( 241.0/255.0, 241.0/255.0, 241.0/255.0, "White" ) );
1035  definedColors.push_back( CUSTOM_COLOR_ITEM( 4.0/255.0, 18.0/255.0, 21.0/255.0, "Dark" ) );
1036 
1038  _( "Solder Mask Color" ), &definedColors );
1039 
1040  if( change )
1041  NewDisplay( true );
1042 
1043  return change;
1044 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
a class to handle a custom color (predefined color) for the color picker dialog
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:508
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
bool EDA_3D_VIEWER::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 1047 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings(), and Process_Special_Functions().

1048 {
1049  CUSTOM_COLORS_LIST definedColors;
1050 
1051  definedColors.push_back( CUSTOM_COLOR_ITEM( 20/255.0, 51/255.0, 36/255.0, "Green" ) );
1052  definedColors.push_back( CUSTOM_COLOR_ITEM( 91/255.0, 168/255.0, 12/255.0, "Light Green" ) );
1053  definedColors.push_back( CUSTOM_COLOR_ITEM( 13/255.0, 104/255.0, 11/255.0,
1054  "Saturated Green" ) );
1055  definedColors.push_back( CUSTOM_COLOR_ITEM( 181/255.0, 19/255.0, 21/255.0, "Red" ) );
1056  definedColors.push_back( CUSTOM_COLOR_ITEM( 239/255.0, 53/255.0, 41/255.0,
1057  "Red Light Orange" ) );
1058  definedColors.push_back( CUSTOM_COLOR_ITEM( 210/255.0, 40/255.0, 14/255.0, "Red 2" ) );
1059  definedColors.push_back( CUSTOM_COLOR_ITEM( 2/255.0, 59/255.0, 162/255.0, "Blue" ) );
1060  definedColors.push_back( CUSTOM_COLOR_ITEM( 54/255.0, 79/255.0, 116/255.0, "Light blue 1" ) );
1061  definedColors.push_back( CUSTOM_COLOR_ITEM( 61/255.0, 85/255.0, 130/255.0, "Light blue 2" ) );
1062  definedColors.push_back( CUSTOM_COLOR_ITEM( 21/255.0, 70/255.0, 80/255.0,
1063  "Green blue (dark)" ) );
1064  definedColors.push_back( CUSTOM_COLOR_ITEM( 11/255.0, 11/255.0, 11/255.0, "Black" ) );
1065  definedColors.push_back( CUSTOM_COLOR_ITEM( 245/255.0, 245/255.0, 245/255.0, "White" ) );
1066  definedColors.push_back( CUSTOM_COLOR_ITEM( 119/255.0, 31/255.0, 91/255.0, "Purple" ) );
1067  definedColors.push_back( CUSTOM_COLOR_ITEM( 32/255.0, 2/255.0, 53/255.0, "Purple Dark" ) );
1068 
1070  _( "Solder Mask Color" ),
1071  &definedColors );
1072 
1073  if( change )
1074  NewDisplay( true );
1075 
1076  return change;
1077 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
a class to handle a custom color (predefined color) for the color picker dialog
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:506
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
bool EDA_3D_VIEWER::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 1122 of file eda_3d_viewer.cpp.

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

Referenced by GetSettings(), and Process_Special_Functions().

1123 {
1124  CUSTOM_COLORS_LIST definedColors;
1125 
1126  definedColors.push_back( CUSTOM_COLOR_ITEM( 128/255.0, 128/255.0, 128/255.0, "grey" ) );
1127  definedColors.push_back( CUSTOM_COLOR_ITEM( 213/255.0, 213/255.0, 213/255.0, "Silver" ) );
1128  definedColors.push_back( CUSTOM_COLOR_ITEM( 90/255.0, 90/255.0, 90/255.0, "grey 2" ) );
1129 
1131  _( "Solder Paste Color" ), &definedColors );
1132 
1133  if( change )
1134  NewDisplay( true );
1135 
1136  return change;
1137 }
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
a class to handle a custom color (predefined color) for the color picker dialog
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
bool Set3DColorFromUser(SFVEC3D &aColor, const wxString &aTitle, CUSTOM_COLORS_LIST *aPredefinedColors)
Get a SFVEC3D from a wx colour dialog.
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:507
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
void EDA_BASE_FRAME::SetAutoSaveInterval ( int  aInterval)
inherited

Definition at line 197 of file eda_base_frame.cpp.

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

Referenced by EDA_DRAW_FRAME::CommonSettingsChanged(), and EDA_BASE_FRAME::isAutoSaveRequired().

198 {
199  m_autoSaveInterval = aInterval;
200 
201  if( m_autoSaveTimer->IsRunning() )
202  {
203  if( m_autoSaveInterval > 0 )
204  {
205  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
206  }
207  else
208  {
209  m_autoSaveTimer->Stop();
210  m_autoSaveState = false;
211  }
212  }
213 }
bool m_autoSaveState
Flag to indicate the last auto save state.
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_3D_VIEWER::SetDefaultFileName ( const wxString &  aFn)
inline

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

Parameters
aFn= file name to assign

Definition at line 90 of file eda_3d_viewer.h.

References m_defaultSaveScreenshotFileName.

91  {
93  }
wxFileName m_defaultSaveScreenshotFileName
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 47 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), InvokePcbLibTableEditor(), KIWAY_HOLDER::Kiway(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

48 {
49 #if defined(DEBUG)
50  // offer a trap point for debugging most any window
51  wxASSERT( aDest );
52  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
53  {
54  int breakhere=1;
55  (void) breakhere;
56  }
57 #endif
58 
59  (void) aDest;
60 
61  m_kiway = aKiway;
62 }
KIWAY * m_kiway
Definition: kiway_player.h:94
const char * name
Definition: DXF_plotter.cpp:61
void EDA_3D_VIEWER::SetMenuBarOptionsState ( )
private

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

Definition at line 350 of file 3d_menubar.cpp.

References FL_AXIS, 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, CINFO3D_VISU::GetFlag(), ID_MENU3D_AXIS_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, 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(), GetSettings(), OnUpdateMenus(), and Process_Special_Functions().

351 {
352  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState" ) );
353 
354  wxMenuBar* menuBar = GetMenuBar();
355 
356  if( menuBar == NULL )
357  {
358  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState menuBar == NULL" ) );
359 
360  return;
361  }
362 
363  wxMenuItem* item;
364  // Set the state of toggle menus according to the current display options
365  item = menuBar->FindItem( ID_MENU3D_ENGINE_OPENGL_LEGACY );
367 
368  item = menuBar->FindItem( ID_MENU3D_ENGINE_RAYTRACING );
370 
371  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL );
372  item->Check( m_settings.MaterialModeGet() == MATERIAL_MODE_NORMAL );
373 
374  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY );
376 
377  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE );
379 
380  // OpenGL
381  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS );
383 
384  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX );
386 
387  // Raytracing
388  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS );
390 
391  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_BACKFLOOR );
393 
394  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFRACTIONS );
396 
397  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFLECTIONS );
399 
400  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_POST_PROCESSING );
402 
403  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING );
405 
406  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES );
408 
409 
410  item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
411  item->Check( m_settings.GetFlag( FL_AXIS ) );
412 
413 }
Use only diffuse material properties.
Definition: 3d_enums.h:93
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:94
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
Use all material properties from model file.
Definition: 3d_enums.h:92
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 227 of file kiway_player.h.

Referenced by FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME().

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

Definition at line 346 of file eda_base_frame.h.

Referenced by KICAD_MANAGER_FRAME::LoadProject().

346 { m_mruPath = aPath; }
wxString m_mruPath
Most recently used path.
void EDA_3D_VIEWER::SetToolbars ( )
private

Definition at line 138 of file 3d_toolbar.cpp.

Referenced by GetSettings(), and ReCreateMainToolbar().

139 {
140 }
void EDA_BASE_FRAME::ShowChangedLanguage ( )
virtualinherited

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

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, LIB_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, and CVPCB_MAINFRAME.

Definition at line 234 of file eda_base_frame.cpp.

References EDA_BASE_FRAME::ReCreateMenuBar().

Referenced by EDA_BASE_FRAME::GetMruPath(), KIWAY::SetLanguage(), CVPCB_MAINFRAME::ShowChangedLanguage(), PCB_BASE_FRAME::ShowChangedLanguage(), GERBVIEW_FRAME::ShowChangedLanguage(), LIB_EDIT_FRAME::ShowChangedLanguage(), and SCH_EDIT_FRAME::ShowChangedLanguage().

235 {
236  if( GetMenuBar() )
237  {
238  ReCreateMenuBar();
239  GetMenuBar()->Refresh();
240  }
241 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
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 77 of file kiway_player.cpp.

References 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, and WX_EVENT_LOOP.

Referenced by FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), FOOTPRINT_VIEWER_FRAME::ShowModal(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

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

Definition at line 513 of file eda_base_frame.cpp.

References KIWAY::CommonSettingsChanged(), PAGED_DIALOG::GetTreebook(), i, EDA_BASE_FRAME::InstallPreferences(), KIWAY_HOLDER::Kiway(), KIWAY_PLAYER_COUNT, and KIWAY::Player().

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

515 {
516  PAGED_DIALOG dlg( this, _( "Preferences" ) );
517  wxTreebook* book = dlg.GetTreebook();
518 
519  book->AddPage( new PANEL_COMMON_SETTINGS( &dlg, book ), _( "Common" ) );
520  book->AddPage( new PANEL_HOTKEYS_EDITOR( this, book, false,
521  aHotkeys, aShowHotkeys, aHotkeysNickname ), _( "Hotkeys" ) );
522 
523  for( unsigned i = 0; i < KIWAY_PLAYER_COUNT; ++i )
524  {
525  KIWAY_PLAYER* frame = dlg.Kiway().Player( (FRAME_T) i, false );
526 
527  if( frame )
528  frame->InstallPreferences( &dlg );
529  }
530 
531  if( dlg.ShowModal() == wxID_OK )
532  {
533  dlg.Kiway().CommonSettingsChanged();
534  return true;
535  }
536 
537  return false;
538 }
Class KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a porti...
Definition: kiway_player.h:120
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
FRAME_T
Enum FRAME_T is the set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:34
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:300
size_t i
Definition: json11.cpp:597
virtual void InstallPreferences(PAGED_DIALOG *aParent)
Function InstallPreferences allows a Frame to load its preference panels (if any) into the preference...
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 369 of file eda_base_frame.cpp.

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

Referenced by EDA_BASE_FRAME::GetKicadHelp(), and EDA_BASE_FRAME::isAutoSaveRequired().

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

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 914 of file eda_3d_viewer.cpp.

References PROJECT::GetProjectFullName(), EDA_3D_CANVAS::GetScreenshot(), ID_MENU_SCREENCOPY_JPEG, ID_TOOL_SCREENCOPY_TOCLIBBOARD, JpegFileExtension, JpegFileWildcard(), m_canvas, m_defaultSaveScreenshotFileName, Parent(), PngFileExtension, PngFileWildcard(), KIWAY_HOLDER::Prj(), and Refresh().

Referenced by GetSettings(), and Process_Special_Functions().

915 {
916  wxString fullFileName;
917  bool fmt_is_jpeg = false;
918 
919  if( event.GetId() == ID_MENU_SCREENCOPY_JPEG )
920  fmt_is_jpeg = true;
921 
922  if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
923  {
924  // Remember path between saves during this session only.
925  const wxString wildcard = fmt_is_jpeg ? JpegFileWildcard() : PngFileWildcard();
926  const wxString ext = fmt_is_jpeg ? JpegFileExtension : PngFileExtension;
927 
928  // First time path is set to the project path.
929  if( !m_defaultSaveScreenshotFileName.IsOk() )
931 
932  m_defaultSaveScreenshotFileName.SetExt( ext );
933 
934  wxFileDialog dlg( this, _( "3D Image File Name" ),
936  m_defaultSaveScreenshotFileName.GetFullName(), wildcard,
937  wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
938 
939  if( dlg.ShowModal() == wxID_CANCEL )
940  return;
941 
942  m_defaultSaveScreenshotFileName = dlg.GetPath();
943 
944  if( m_defaultSaveScreenshotFileName.GetExt().IsEmpty() )
945  m_defaultSaveScreenshotFileName.SetExt( ext );
946 
947  fullFileName = m_defaultSaveScreenshotFileName.GetFullPath();
948 
949  // Be sure the screen area destroyed by the file dialog is redrawn
950  // before making a screen copy.
951  // Without this call, under Linux the screen refresh is made to late.
952  wxYield();
953  }
954 
955  // Be sure we have the latest 3D view (remember 3D view is buffered)
956  Refresh();
957  wxYield();
958 
959  // Build image from the 3D buffer
960  wxWindowUpdateLocker noUpdates( this );
961 
962  wxImage screenshotImage;
963 
964  if( m_canvas )
965  m_canvas->GetScreenshot( screenshotImage );
966 
967  if( event.GetId() == ID_TOOL_SCREENCOPY_TOCLIBBOARD )
968  {
969  wxBitmap bitmap( screenshotImage );
970 
971  if( wxTheClipboard->Open() )
972  {
973  wxBitmapDataObject* dobjBmp = new wxBitmapDataObject( bitmap );
974 
975  if( !wxTheClipboard->SetData( dobjBmp ) )
976  wxMessageBox( _( "Failed to copy image to clipboard" ) );
977 
978  wxTheClipboard->Flush(); /* the data in clipboard will stay
979  * available after the application exits */
980  wxTheClipboard->Close();
981  }
982  }
983  else
984  {
985  if( !screenshotImage.SaveFile( fullFileName,
986  fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : wxBITMAP_TYPE_PNG ) )
987  wxMessageBox( _( "Can't save file" ) );
988 
989  screenshotImage.Destroy();
990  }
991 
992 }
PCB_BASE_FRAME * Parent() const
Definition: eda_3d_viewer.h:60
const std::string JpegFileExtension
VTBL_ENTRY const wxString GetProjectFullName() const
Function GetProjectFullName returns the full path and name of the project.
Definition: project.cpp:96
wxString JpegFileWildcard()
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()
Update the board display after modifying it by a python script (note: it is automatically called by a...
wxString PngFileWildcard()
void GetScreenshot(wxImage &aDstImage)
Request a screenshot and output it to the aDstImage.
wxFileName m_defaultSaveScreenshotFileName
Filename to propose for save a screenshot.
const std::string PngFileExtension
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 387 of file eda_base_frame.cpp.

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

Referenced by SCH_EDIT_FRAME::importFile(), GERBVIEW_FRAME::LoadExcellonFiles(), GERBVIEW_FRAME::loadListOfGerberAndDrillFiles(), PL_EDITOR_FRAME::LoadPageLayoutDescrFile(), KICAD_MANAGER_FRAME::LoadProject(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::SavePcbFile(), EDA_BASE_FRAME::SaveProjectSettings(), and GERBVIEW_FRAME::unarchiveFiles().

389 {
390  wxFileHistory* fileHistory = aFileHistory;
391 
392  if( !fileHistory )
393  fileHistory = &Kiface().GetFileHistory();
394 
395  fileHistory->AddFileToHistory( FullFileName );
396 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123
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 489 of file hotkeys_basic.cpp.

References AddDelimiterString(), DEFAULT_HOTKEY_FILENAME_EXT, EESCHEMA_HOTKEY_NAME, FOOTPRINT_EDIT_FRAME_NAME, GetChars(), GetKicadConfigPath(), KeyNameFromKeyCode(), LIB_EDIT_FRAME_NAME, EDA_HOTKEY_CONFIG::m_HK_InfoList, EDA_HOTKEY::m_InfoMsg, EDA_HOTKEY::m_KeyCode, EDA_HOTKEY_CONFIG::m_SectionTag, EDA_HOTKEY_CONFIG::m_Title, PCB_EDIT_FRAME_NAME, PCBNEW_HOTKEY_NAME, and SCH_EDIT_FRAME_NAME.

Referenced by EDA_BASE_FRAME::SaveProjectSettings(), PANEL_HOTKEYS_EDITOR::TransferDataFromWindow(), and EDA_DRAW_FRAME::WriteHotkeyConfig().

491 {
492  wxString msg;
493  wxString keyname, infokey;
494  FILE* file;
495 
496  msg = wxT( "$hotkey list\n" );
497 
498  // Print the current hotkey list
499  EDA_HOTKEY** list;
500 
501  for( ; aDescList->m_HK_InfoList != nullptr; aDescList++ )
502  {
503  if( aDescList->m_Title )
504  {
505  msg += wxT( "# " );
506  msg += *aDescList->m_Title;
507  msg += wxT( "\n" );
508  }
509 
510  msg += *aDescList->m_SectionTag;
511  msg += wxT( "\n" );
512 
513  list = aDescList->m_HK_InfoList;
514 
515  for( ; *list != nullptr; list++ )
516  {
517  EDA_HOTKEY* hk_decr = *list;
518  msg += wxT( "shortcut " );
519  keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
520  AddDelimiterString( keyname );
521  infokey = hk_decr->m_InfoMsg;
522  AddDelimiterString( infokey );
523  msg += keyname + wxT( ": " ) + infokey + wxT( "\n" );
524  }
525  }
526 
527  msg += wxT( "$Endlist\n" );
528 
529  if( aFullFileName )
530  file = wxFopen( *aFullFileName, wxT( "wt" ) );
531  else
532  {
533  wxString configName( ConfigBaseName() );
534  if( configName == SCH_EDIT_FRAME_NAME || configName == LIB_EDIT_FRAME_NAME )
535  configName = EESCHEMA_HOTKEY_NAME;
536  else if( configName == PCB_EDIT_FRAME_NAME ||
537  configName == FOOTPRINT_EDIT_FRAME_NAME )
538  configName = PCBNEW_HOTKEY_NAME;
539 
540  wxFileName fn( configName );
541  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
542  fn.SetPath( GetKicadConfigPath() );
543  file = wxFopen( fn.GetFullPath(), wxT( "wt" ) );
544  }
545 
546  if( file )
547  {
548  wxFputs( msg, file );
549  fclose( file );
550  }
551  else
552  {
553  msg.Printf( wxT( "Unable to write file %s" ), GetChars( *aFullFileName ) );
554  return 0;
555  }
556 
557  return 1;
558 }
#define LIB_EDIT_FRAME_NAME
Definition: draw_frame.h:49
EDA_HOTKEY ** m_HK_InfoList
Definition: hotkeys_basic.h:98
wxString ConfigBaseName()
Function ConfigBaseName.
#define PCB_EDIT_FRAME_NAME
Definition: draw_frame.h:56
#define SCH_EDIT_FRAME_NAME
Definition: draw_frame.h:50
#define FOOTPRINT_EDIT_FRAME_NAME
Definition: draw_frame.h:53
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 GetKicadConfigPath()
Return the user configuration path used to store KiCad&#39;s configuration files.
Definition: common.cpp:262
wxString * m_SectionTag
Definition: hotkeys_basic.h:97
wxString m_InfoMsg
Definition: hotkeys_basic.h:66
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:59
wxString * m_Title
Definition: hotkeys_basic.h:99
#define EESCHEMA_HOTKEY_NAME
Definition: hotkeys_basic.h:35
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
#define PCBNEW_HOTKEY_NAME
Definition: hotkeys_basic.h:36

Member Data Documentation

wxString EDA_BASE_FRAME::m_AboutTitle
protectedinherited

Name of program displayed in About.

Definition at line 139 of file eda_base_frame.h.

bool EDA_BASE_FRAME::m_autoSaveState
protectedinherited
wxTimer* EDA_BASE_FRAME::m_autoSaveTimer
protectedinherited
EDA_3D_CANVAS* EDA_3D_VIEWER::m_canvas
private
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 134 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME::ConfigBaseName(), and FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME().

wxFileName EDA_3D_VIEWER::m_defaultSaveScreenshotFileName
private

Filename to propose for save a screenshot.

Definition at line 215 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 144 of file eda_base_frame.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 130 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME::EDA_BASE_FRAME(), and EDA_BASE_FRAME::findQuasiModalDialog().

bool KIWAY_PLAYER::m_modal
protectedinherited

Definition at line 249 of file kiway_player.h.

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

Definition at line 251 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 252 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 155 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME::LoadSettings().


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