KiCad PCB EDA Suite
TEMPLATE_SELECTION_PANEL Class Reference

#include <dialog_template_selector.h>

Inheritance diagram for TEMPLATE_SELECTION_PANEL:
TEMPLATE_SELECTION_PANEL_BASE

Public Member Functions

 TEMPLATE_SELECTION_PANEL (wxNotebookPage *aParent, const wxString &aPath)
 
const wxString & GetPath ()
 
void AddTemplateWidget (TEMPLATE_WIDGET *aTemplateWidget)
 
int GetMinHeight ()
 

Public Attributes

wxBoxSizer * m_SizerBase
 
wxScrolledWindow * m_scrolledWindow
 
wxGridSizer * m_SizerChoice
 

Protected Attributes

wxNotebookPage * m_parent
 
wxString m_templatesPath
 the path to access to the folder containing the templates (which are also folders) More...
 
int m_minHeight
 minimal height to show templates (this is the height of the biggest template widget) More...
 

Detailed Description

Definition at line 65 of file dialog_template_selector.h.

Constructor & Destructor Documentation

◆ TEMPLATE_SELECTION_PANEL()

TEMPLATE_SELECTION_PANEL::TEMPLATE_SELECTION_PANEL ( wxNotebookPage *  aParent,
const wxString &  aPath 
)
Parameters
aParentThe window creating the dialog
aPaththe path

Definition at line 32 of file dialog_template_selector.cpp.

33  :
35 {
36  m_parent = aParent;
37  m_templatesPath = aPath;
38  m_minHeight = 0;
39 }
int m_minHeight
minimal height to show templates (this is the height of the biggest template widget)
TEMPLATE_SELECTION_PANEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1, 140), long style=wxTAB_TRAVERSAL|wxBORDER_NONE, const wxString &name=wxEmptyString)
wxString m_templatesPath
the path to access to the folder containing the templates (which are also folders)

References m_minHeight, m_parent, and m_templatesPath.

Member Function Documentation

◆ AddTemplateWidget()

void TEMPLATE_SELECTION_PANEL::AddTemplateWidget ( TEMPLATE_WIDGET aTemplateWidget)

Definition at line 42 of file dialog_template_selector.cpp.

43 {
44  m_SizerChoice->Add( aTemplateWidget );
45  int height = aTemplateWidget->GetBestSize().GetHeight();
46  m_minHeight = std::max( m_minHeight, height );
47 }
int m_minHeight
minimal height to show templates (this is the height of the biggest template widget)

References m_minHeight, and TEMPLATE_SELECTION_PANEL_BASE::m_SizerChoice.

◆ GetMinHeight()

int TEMPLATE_SELECTION_PANEL::GetMinHeight ( )
inline

Definition at line 85 of file dialog_template_selector.h.

85 { return m_minHeight; }
int m_minHeight
minimal height to show templates (this is the height of the biggest template widget)

References m_minHeight.

Referenced by DIALOG_TEMPLATE_SELECTOR::AddTemplatesPage().

◆ GetPath()

const wxString& TEMPLATE_SELECTION_PANEL::GetPath ( )
inline

Definition at line 81 of file dialog_template_selector.h.

81 { return m_templatesPath; }
wxString m_templatesPath
the path to access to the folder containing the templates (which are also folders)

References m_templatesPath.

Member Data Documentation

◆ m_minHeight

int TEMPLATE_SELECTION_PANEL::m_minHeight
protected

minimal height to show templates (this is the height of the biggest template widget)

Definition at line 71 of file dialog_template_selector.h.

Referenced by AddTemplateWidget(), GetMinHeight(), and TEMPLATE_SELECTION_PANEL().

◆ m_parent

wxNotebookPage* TEMPLATE_SELECTION_PANEL::m_parent
protected

Definition at line 68 of file dialog_template_selector.h.

Referenced by TEMPLATE_SELECTION_PANEL().

◆ m_scrolledWindow

wxScrolledWindow* TEMPLATE_SELECTION_PANEL_BASE::m_scrolledWindow
inherited

◆ m_SizerBase

wxBoxSizer* TEMPLATE_SELECTION_PANEL_BASE::m_SizerBase
inherited

◆ m_SizerChoice

wxGridSizer* TEMPLATE_SELECTION_PANEL_BASE::m_SizerChoice
inherited

◆ m_templatesPath

wxString TEMPLATE_SELECTION_PANEL::m_templatesPath
protected

the path to access to the folder containing the templates (which are also folders)

Definition at line 69 of file dialog_template_selector.h.

Referenced by GetPath(), and TEMPLATE_SELECTION_PANEL().


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