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

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. More...

#include <wx_collapsible_pane.h>

Inheritance diagram for WX_COLLAPSIBLE_PANE_HEADER:

Public Member Functions

 WX_COLLAPSIBLE_PANE_HEADER ()
 
 WX_COLLAPSIBLE_PANE_HEADER (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"))
 
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 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

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 36 of file wx_collapsible_pane.h.

Constructor & Destructor Documentation

◆ WX_COLLAPSIBLE_PANE_HEADER() [1/2]

WX_COLLAPSIBLE_PANE_HEADER::WX_COLLAPSIBLE_PANE_HEADER ( )
inline

Definition at line 39 of file wx_collapsible_pane.h.

References init().

◆ WX_COLLAPSIBLE_PANE_HEADER() [2/2]

WX_COLLAPSIBLE_PANE_HEADER::WX_COLLAPSIBLE_PANE_HEADER ( 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 44 of file wx_collapsible_pane.h.

References Create(), and init().

Member Function Documentation

◆ Create()

bool WX_COLLAPSIBLE_PANE_HEADER::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" ) 
)

◆ DoGetBestClientSize()

wxSize WX_COLLAPSIBLE_PANE_HEADER::DoGetBestClientSize ( ) const
overrideprotected

Definition at line 259 of file wx_collapsible_pane.cpp.

References text.

◆ doSetCollapsed()

void WX_COLLAPSIBLE_PANE_HEADER::doSetCollapsed ( bool  aCollapsed)
private

Definition at line 249 of file wx_collapsible_pane.cpp.

References SetCollapsed().

Referenced by onChar(), and onLeftUp().

◆ drawArrow()

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

Definition at line 396 of file wx_collapsible_pane.cpp.

References m_collapsed, and m_inWindow.

Referenced by onPaint().

◆ init()

void WX_COLLAPSIBLE_PANE_HEADER::init ( )
private

Definition at line 214 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 63 of file wx_collapsible_pane.h.

References m_collapsed.

◆ onChar()

void WX_COLLAPSIBLE_PANE_HEADER::onChar ( wxKeyEvent &  aEvent)
private

Definition at line 379 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 356 of file wx_collapsible_pane.cpp.

References m_inWindow, and Refresh().

Referenced by Create().

◆ onFocus()

void WX_COLLAPSIBLE_PANE_HEADER::onFocus ( wxFocusEvent &  aEvent)
private

Definition at line 349 of file wx_collapsible_pane.cpp.

References Refresh().

Referenced by Create().

◆ onLeaveWindow()

void WX_COLLAPSIBLE_PANE_HEADER::onLeaveWindow ( wxMouseEvent &  aEvent)
private

Definition at line 364 of file wx_collapsible_pane.cpp.

References m_inWindow, and Refresh().

Referenced by Create().

◆ onLeftUp()

void WX_COLLAPSIBLE_PANE_HEADER::onLeftUp ( wxMouseEvent &  aEvent)
private

Definition at line 372 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 283 of file wx_collapsible_pane.cpp.

References drawArrow(), m_inWindow, and text.

Referenced by Create().

◆ SetCollapsed()

void WX_COLLAPSIBLE_PANE_HEADER::SetCollapsed ( bool  aCollapsed = true)

Definition at line 242 of file wx_collapsible_pane.cpp.

References m_collapsed, and Refresh().

Referenced by WX_COLLAPSIBLE_PANE::Collapse(), and doSetCollapsed().

Member Data Documentation

◆ m_collapsed

bool WX_COLLAPSIBLE_PANE_HEADER::m_collapsed
private

Definition at line 74 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 75 of file wx_collapsible_pane.h.

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

◆ m_label

wxString WX_COLLAPSIBLE_PANE_HEADER::m_label
private

Definition at line 73 of file wx_collapsible_pane.h.


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