KiCad PCB EDA Suite
Loading...
Searching...
No Matches
WX_COLLAPSIBLE_PANE Class Reference

A better wxCollapsiblePane that. More...

#include <wx_collapsible_pane.h>

Inheritance diagram for WX_COLLAPSIBLE_PANE:

Public Member Functions

 WX_COLLAPSIBLE_PANE ()
 
 WX_COLLAPSIBLE_PANE (wxWindow *aParent, wxWindowID aId, const wxString &aLabel, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=wxBORDER_NONE, const wxValidator &aValidator=wxDefaultValidator, const wxString &aName=wxT("COLLAPSIBLE_PANE_HEADER"))
 
 ~WX_COLLAPSIBLE_PANE ()
 
bool Create (wxWindow *aParent, wxWindowID aId, const wxString &aLabel, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=wxBORDER_NONE, const wxValidator &aValidator=wxDefaultValidator, const wxString &aName=wxT("COLLAPSIBLE_PANE_HEADER"))
 
void Collapse (bool aCollapse=true)
 
void Expand ()
 
bool IsCollapsed () const
 
bool IsExpanded () const
 
wxWindow * GetPane ()
 
wxString GetLabel () const override
 
void SetLabel (const wxString &aLabel) override
 
bool SetBackgroundColour (const wxColour &aColor) override
 
bool InformFirstDirection (int aDirection, int aSize, int aAvailableOtherDir) override
 
wxSize DoGetBestClientSize () const override
 
bool Layout () override
 

Private Member Functions

void init ()
 
int getBorder () const
 
void onSize (wxSizeEvent &aEvent)
 
void onHeaderClicked (wxCommandEvent &aEvent)
 

Private Attributes

wxWindow * m_pane
 
wxSizer * m_sizer
 
WX_COLLAPSIBLE_PANE_HEADERm_header
 

Detailed Description

A better wxCollapsiblePane that.

  • Looks the same on all platforms
  • Doesn't have the same sizer bugs
  • Uses proper window colors

Definition at line 103 of file wx_collapsible_pane.h.

Constructor & Destructor Documentation

◆ WX_COLLAPSIBLE_PANE() [1/2]

WX_COLLAPSIBLE_PANE::WX_COLLAPSIBLE_PANE ( )
inline

Definition at line 106 of file wx_collapsible_pane.h.

References init().

◆ WX_COLLAPSIBLE_PANE() [2/2]

WX_COLLAPSIBLE_PANE::WX_COLLAPSIBLE_PANE ( wxWindow *  aParent,
wxWindowID  aId,
const wxString &  aLabel,
const wxPoint &  aPos = wxDefaultPosition,
const wxSize &  aSize = wxDefaultSize,
long  aStyle = wxBORDER_NONE,
const wxValidator &  aValidator = wxDefaultValidator,
const wxString &  aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) 
)
inline

Definition at line 111 of file wx_collapsible_pane.h.

References Create(), and init().

◆ ~WX_COLLAPSIBLE_PANE()

WX_COLLAPSIBLE_PANE::~WX_COLLAPSIBLE_PANE ( )

Definition at line 78 of file wx_collapsible_pane.cpp.

References m_sizer.

Member Function Documentation

◆ Collapse()

void WX_COLLAPSIBLE_PANE::Collapse ( bool  aCollapse = true)

◆ Create()

bool WX_COLLAPSIBLE_PANE::Create ( wxWindow *  aParent,
wxWindowID  aId,
const wxString &  aLabel,
const wxPoint &  aPos = wxDefaultPosition,
const wxSize &  aSize = wxDefaultSize,
long  aStyle = wxBORDER_NONE,
const wxValidator &  aValidator = wxDefaultValidator,
const wxString &  aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) 
)

Definition at line 44 of file wx_collapsible_pane.cpp.

References getBorder(), m_header, m_pane, m_sizer, onHeaderClicked(), and onSize().

Referenced by WX_COLLAPSIBLE_PANE().

◆ DoGetBestClientSize()

wxSize WX_COLLAPSIBLE_PANE::DoGetBestClientSize ( ) const
override

Definition at line 140 of file wx_collapsible_pane.cpp.

References getBorder(), IsExpanded(), m_pane, and m_sizer.

◆ Expand()

void WX_COLLAPSIBLE_PANE::Expand ( )
inline

Definition at line 132 of file wx_collapsible_pane.h.

References Collapse().

Referenced by APPEARANCE_CONTROLS::APPEARANCE_CONTROLS().

◆ getBorder()

int WX_COLLAPSIBLE_PANE::getBorder ( ) const
private

Definition at line 177 of file wx_collapsible_pane.cpp.

References m_header.

Referenced by Create(), DoGetBestClientSize(), and Layout().

◆ GetLabel()

wxString WX_COLLAPSIBLE_PANE::GetLabel ( ) const
inlineoverride

Definition at line 146 of file wx_collapsible_pane.h.

References m_header.

◆ GetPane()

wxWindow * WX_COLLAPSIBLE_PANE::GetPane ( )
inline

Definition at line 141 of file wx_collapsible_pane.h.

References m_pane.

Referenced by APPEARANCE_CONTROLS::createControls(), and InformFirstDirection().

◆ InformFirstDirection()

bool WX_COLLAPSIBLE_PANE::InformFirstDirection ( int  aDirection,
int  aSize,
int  aAvailableOtherDir 
)
override

Definition at line 124 of file wx_collapsible_pane.cpp.

References GetPane().

◆ init()

void WX_COLLAPSIBLE_PANE::init ( )
private

Definition at line 70 of file wx_collapsible_pane.cpp.

References m_header, m_pane, and m_sizer.

Referenced by WX_COLLAPSIBLE_PANE().

◆ IsCollapsed()

bool WX_COLLAPSIBLE_PANE::IsCollapsed ( ) const

Definition at line 102 of file wx_collapsible_pane.cpp.

References m_pane.

Referenced by Collapse(), IsExpanded(), and onHeaderClicked().

◆ IsExpanded()

bool WX_COLLAPSIBLE_PANE::IsExpanded ( ) const
inline

◆ Layout()

bool WX_COLLAPSIBLE_PANE::Layout ( )
override

Definition at line 156 of file wx_collapsible_pane.cpp.

References getBorder(), IsExpanded(), m_header, m_pane, and m_sizer.

Referenced by onSize(), and SetLabel().

◆ onHeaderClicked()

void WX_COLLAPSIBLE_PANE::onHeaderClicked ( wxCommandEvent &  aEvent)
private

Definition at line 195 of file wx_collapsible_pane.cpp.

References Collapse(), IsCollapsed(), and m_header.

Referenced by Create().

◆ onSize()

void WX_COLLAPSIBLE_PANE::onSize ( wxSizeEvent &  aEvent)
private

Definition at line 188 of file wx_collapsible_pane.cpp.

References Layout().

Referenced by Create().

◆ SetBackgroundColour()

bool WX_COLLAPSIBLE_PANE::SetBackgroundColour ( const wxColour &  aColor)
override

Definition at line 117 of file wx_collapsible_pane.cpp.

References m_header.

Referenced by APPEARANCE_CONTROLS::createControls().

◆ SetLabel()

void WX_COLLAPSIBLE_PANE::SetLabel ( const wxString &  aLabel)
override

Member Data Documentation

◆ m_header

WX_COLLAPSIBLE_PANE_HEADER* WX_COLLAPSIBLE_PANE::m_header
private

◆ m_pane

wxWindow* WX_COLLAPSIBLE_PANE::m_pane
private

◆ m_sizer

wxSizer* WX_COLLAPSIBLE_PANE::m_sizer
private

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