KiCad PCB EDA Suite
PANEL_PL_EDITOR_COLOR_SETTINGS_BASE Class Referenceabstract

Class PANEL_PL_EDITOR_COLOR_SETTINGS_BASE. More...

#include <panel_pl_editor_color_settings_base.h>

Inheritance diagram for PANEL_PL_EDITOR_COLOR_SETTINGS_BASE:
RESETTABLE_PANEL PANEL_PL_EDITOR_COLOR_SETTINGS

Public Member Functions

 PANEL_PL_EDITOR_COLOR_SETTINGS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_PL_EDITOR_COLOR_SETTINGS_BASE ()
 
virtual void ResetPanel ()=0
 Reset the contents of this panel. More...
 
virtual wxString GetResetTooltip () const
 Get the tooltip the reset button should display when showing this panel. More...
 
wxString GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override
 Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. More...
 

Protected Attributes

wxStaticText * m_txtTheme
 
wxChoice * m_themes
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_PL_EDITOR_COLOR_SETTINGS_BASE()

PANEL_PL_EDITOR_COLOR_SETTINGS_BASE::PANEL_PL_EDITOR_COLOR_SETTINGS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_pl_editor_color_settings_base.cpp.

12 : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* p1mainSizer;
15 p1mainSizer = new wxBoxSizer( wxHORIZONTAL );
16
17 wxStaticBoxSizer* sbSizer1;
18 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Color Theme") ), wxHORIZONTAL );
19
20 sbSizer1->SetMinSize( wxSize( 250,-1 ) );
21 m_txtTheme = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Theme:"), wxDefaultPosition, wxDefaultSize, 0 );
22 m_txtTheme->Wrap( -1 );
23 sbSizer1->Add( m_txtTheme, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
24
25 wxArrayString m_themesChoices;
26 m_themes = new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_themesChoices, 0 );
27 m_themes->SetSelection( 0 );
28 sbSizer1->Add( m_themes, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
29
30
31 p1mainSizer->Add( sbSizer1, 0, wxALL, 10 );
32
33
34 p1mainSizer->Add( 0, 0, 1, wxEXPAND, 5 );
35
36
37 this->SetSizer( p1mainSizer );
38 this->Layout();
39 p1mainSizer->Fit( this );
40}
const char * name
Definition: DXF_plotter.cpp:56
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
#define _(s)

References _, m_themes, and m_txtTheme.

◆ ~PANEL_PL_EDITOR_COLOR_SETTINGS_BASE()

PANEL_PL_EDITOR_COLOR_SETTINGS_BASE::~PANEL_PL_EDITOR_COLOR_SETTINGS_BASE ( )

Definition at line 42 of file panel_pl_editor_color_settings_base.cpp.

43{
44}

Member Function Documentation

◆ GetHelpTextAtPoint()

wxString RESETTABLE_PANEL::GetHelpTextAtPoint ( const wxPoint &  aPt,
wxHelpEvent::Origin  aOrigin 
) const
inlineoverrideinherited

Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.

Definition at line 72 of file resettable_panel.h.

73 {
74 if( aPt == wxPoint( -INT_MAX, INT_MAX ) )
75 return GetResetTooltip();
76 else
77 return wxPanel::GetHelpTextAtPoint( aPt, aOrigin );
78 }
virtual wxString GetResetTooltip() const
Get the tooltip the reset button should display when showing this panel.

References RESETTABLE_PANEL::GetResetTooltip().

◆ GetResetTooltip()

virtual wxString RESETTABLE_PANEL::GetResetTooltip ( ) const
inlinevirtualinherited

Get the tooltip the reset button should display when showing this panel.

Returns
the tooltip

Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.

Definition at line 64 of file resettable_panel.h.

65 {
66 return _( "Reset all settings on this page to their default" );
67 }

References _.

Referenced by RESETTABLE_PANEL::GetHelpTextAtPoint().

◆ ResetPanel()

Member Data Documentation

◆ m_themes

◆ m_txtTheme

wxStaticText* PANEL_PL_EDITOR_COLOR_SETTINGS_BASE::m_txtTheme
protected

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