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 (wxWindow *aParent, wxWindowID aId, const wxString &aLabel)
 
 ~WX_COLLAPSIBLE_PANE ()
 
bool Create (wxWindow *aParent, wxWindowID aId, const wxString &aLabel)
 
void Collapse (bool aCollapse=true)
 
void Expand ()
 
bool IsCollapsed () const
 
bool IsExpanded () const
 
wxWindow * GetPane ()
 
int GetMargin () const
 
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
 
bool Layout () override
 

Protected Member Functions

wxSize DoGetBestClientSize () const override
 

Private Member Functions

void init ()
 
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 89 of file wx_collapsible_pane.h.

Constructor & Destructor Documentation

◆ WX_COLLAPSIBLE_PANE()

WX_COLLAPSIBLE_PANE::WX_COLLAPSIBLE_PANE ( wxWindow * aParent,
wxWindowID aId,
const wxString & aLabel )
inline

Definition at line 92 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)

Definition at line 88 of file wx_collapsible_pane.cpp.

References IsCollapsed(), m_header, and m_pane.

Referenced by ERROR_CARD::ERROR_CARD(), Expand(), and onHeaderClicked().

◆ Create()

bool WX_COLLAPSIBLE_PANE::Create ( wxWindow * aParent,
wxWindowID aId,
const wxString & aLabel )

◆ DoGetBestClientSize()

wxSize WX_COLLAPSIBLE_PANE::DoGetBestClientSize ( ) const
overrideprotected

Definition at line 140 of file wx_collapsible_pane.cpp.

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

◆ Expand()

void WX_COLLAPSIBLE_PANE::Expand ( )
inline

Definition at line 104 of file wx_collapsible_pane.h.

References Collapse().

◆ GetLabel()

wxString WX_COLLAPSIBLE_PANE::GetLabel ( ) const
inlineoverride

Definition at line 117 of file wx_collapsible_pane.h.

References m_header.

◆ GetMargin()

int WX_COLLAPSIBLE_PANE::GetMargin ( ) const

Definition at line 177 of file wx_collapsible_pane.cpp.

References m_header.

Referenced by DoGetBestClientSize(), and Layout().

◆ GetPane()

wxWindow * WX_COLLAPSIBLE_PANE::GetPane ( )
inline

Definition at line 113 of file wx_collapsible_pane.h.

References m_pane.

Referenced by ERROR_CARD::ERROR_CARD(), 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

Definition at line 111 of file wx_collapsible_pane.h.

References IsCollapsed().

Referenced by DoGetBestClientSize(), and Layout().

◆ Layout()

bool WX_COLLAPSIBLE_PANE::Layout ( )
override

Definition at line 156 of file wx_collapsible_pane.cpp.

References GetMargin(), 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(), m_header, and WX_COLLAPSIBLE_PANE_CHANGED.

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 ERROR_CARD::ERROR_CARD().

◆ SetLabel()

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

Definition at line 108 of file wx_collapsible_pane.cpp.

References Layout(), and m_header.

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: