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

A header control for WX_COLLAPSIBLE_PANE. More...

#include <wx_collapsible_pane.h>

Inheritance diagram for WX_COLLAPSIBLE_PANE_HEADER:

Public Member Functions

 WX_COLLAPSIBLE_PANE_HEADER (WX_COLLAPSIBLE_PANE *aParent, wxWindowID aId, const wxString &aLabel)
 
bool Create (wxWindow *aParent, wxWindowID aId, const wxString &aLabel)
 
void SetCollapsed (bool aCollapsed=true)
 
bool IsCollapsed () const
 

Protected Member Functions

wxSize DoGetBestClientSize () const override
 

Private Member Functions

void init ()
 
void onPaint (wxPaintEvent &aEvent)
 
void onFocus (wxFocusEvent &aEvent)
 
void onEnterWindow (wxMouseEvent &aEvent)
 
void onLeaveWindow (wxMouseEvent &aEvent)
 
void onLeftUp (wxMouseEvent &aEvent)
 
void onChar (wxKeyEvent &aEvent)
 
void doSetCollapsed (bool aCollapsed)
 
void drawArrow (wxDC &aDC, wxRect aRect, bool aIsActive)
 

Private Attributes

WX_COLLAPSIBLE_PANEm_parent
 
wxString m_label
 
bool m_collapsed
 
bool m_inWindow
 

Detailed Description

A header control for WX_COLLAPSIBLE_PANE.

Looks like a static text with a unicode arrow prepended to show the state. Takes the same space as a static text. This is similar to the wxCollapsiblePane on GTK.

Definition at line 42 of file wx_collapsible_pane.h.

Constructor & Destructor Documentation

◆ WX_COLLAPSIBLE_PANE_HEADER()

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

Definition at line 214 of file wx_collapsible_pane.cpp.

References Create(), init(), and m_parent.

Referenced by DoGetBestClientSize().

Member Function Documentation

◆ Create()

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

◆ DoGetBestClientSize()

wxSize WX_COLLAPSIBLE_PANE_HEADER::DoGetBestClientSize ( ) const
overrideprotected

Definition at line 270 of file wx_collapsible_pane.cpp.

References m_parent, text, and WX_COLLAPSIBLE_PANE_HEADER().

◆ doSetCollapsed()

void WX_COLLAPSIBLE_PANE_HEADER::doSetCollapsed ( bool aCollapsed)
private

Definition at line 260 of file wx_collapsible_pane.cpp.

References SetCollapsed(), and WX_COLLAPSIBLE_PANE_HEADER_CHANGED.

Referenced by onChar(), and onLeftUp().

◆ drawArrow()

void WX_COLLAPSIBLE_PANE_HEADER::drawArrow ( wxDC & aDC,
wxRect aRect,
bool aIsActive )
private

Definition at line 407 of file wx_collapsible_pane.cpp.

References m_collapsed.

Referenced by onPaint().

◆ init()

void WX_COLLAPSIBLE_PANE_HEADER::init ( )
private

Definition at line 224 of file wx_collapsible_pane.cpp.

References m_collapsed, and m_inWindow.

Referenced by WX_COLLAPSIBLE_PANE_HEADER().

◆ IsCollapsed()

bool WX_COLLAPSIBLE_PANE_HEADER::IsCollapsed ( ) const
inline

Definition at line 51 of file wx_collapsible_pane.h.

References m_collapsed.

◆ onChar()

void WX_COLLAPSIBLE_PANE_HEADER::onChar ( wxKeyEvent & aEvent)
private

Definition at line 390 of file wx_collapsible_pane.cpp.

References doSetCollapsed(), and m_collapsed.

Referenced by Create().

◆ onEnterWindow()

void WX_COLLAPSIBLE_PANE_HEADER::onEnterWindow ( wxMouseEvent & aEvent)
private

Definition at line 367 of file wx_collapsible_pane.cpp.

References m_inWindow.

Referenced by Create().

◆ onFocus()

void WX_COLLAPSIBLE_PANE_HEADER::onFocus ( wxFocusEvent & aEvent)
private

Definition at line 360 of file wx_collapsible_pane.cpp.

Referenced by Create().

◆ onLeaveWindow()

void WX_COLLAPSIBLE_PANE_HEADER::onLeaveWindow ( wxMouseEvent & aEvent)
private

Definition at line 375 of file wx_collapsible_pane.cpp.

References m_inWindow.

Referenced by Create().

◆ onLeftUp()

void WX_COLLAPSIBLE_PANE_HEADER::onLeftUp ( wxMouseEvent & aEvent)
private

Definition at line 383 of file wx_collapsible_pane.cpp.

References doSetCollapsed(), and m_collapsed.

Referenced by Create().

◆ onPaint()

void WX_COLLAPSIBLE_PANE_HEADER::onPaint ( wxPaintEvent & aEvent)
private

Definition at line 294 of file wx_collapsible_pane.cpp.

References drawArrow(), KIPLATFORM::UI::IsDarkTheme(), m_inWindow, m_parent, and text.

Referenced by Create().

◆ SetCollapsed()

void WX_COLLAPSIBLE_PANE_HEADER::SetCollapsed ( bool aCollapsed = true)

Definition at line 253 of file wx_collapsible_pane.cpp.

References m_collapsed.

Referenced by doSetCollapsed().

Member Data Documentation

◆ m_collapsed

bool WX_COLLAPSIBLE_PANE_HEADER::m_collapsed
private

Definition at line 78 of file wx_collapsible_pane.h.

Referenced by drawArrow(), init(), IsCollapsed(), onChar(), onLeftUp(), and SetCollapsed().

◆ m_inWindow

bool WX_COLLAPSIBLE_PANE_HEADER::m_inWindow
private

Definition at line 79 of file wx_collapsible_pane.h.

Referenced by init(), onEnterWindow(), onLeaveWindow(), and onPaint().

◆ m_label

wxString WX_COLLAPSIBLE_PANE_HEADER::m_label
private

Definition at line 77 of file wx_collapsible_pane.h.

◆ m_parent

WX_COLLAPSIBLE_PANE* WX_COLLAPSIBLE_PANE_HEADER::m_parent
private

Definition at line 76 of file wx_collapsible_pane.h.

Referenced by DoGetBestClientSize(), onPaint(), and WX_COLLAPSIBLE_PANE_HEADER().


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