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

A checkbox control except with custom bitmaps for the checked and unchecked states. More...

#include <bitmap_toggle.h>

Inheritance diagram for BITMAP_TOGGLE:

Public Member Functions

 BITMAP_TOGGLE ()
 
 BITMAP_TOGGLE (wxWindow *aParent, wxWindowID aId, const wxBitmapBundle &aCheckedBitmap, const wxBitmapBundle &aUncheckedBitmap, bool aChecked=false)
 Set the checkbox state.
 
void SetValue (bool aValue)
 Read the checkbox state.
 
bool GetValue () const
 
void SetWindowID (wxWindowID aId)
 Updates the window ID of this control and its children.
 

Private Attributes

bool m_checked
 
wxStaticBitmap * m_bitmap
 
wxBitmapBundle m_unchecked_bitmap
 
wxBitmapBundle m_checked_bitmap
 
wxLongLong m_debounce
 

Detailed Description

A checkbox control except with custom bitmaps for the checked and unchecked states.

This is useful in space-constrained situations where native toggle button controls are too big

Definition at line 44 of file bitmap_toggle.h.

Constructor & Destructor Documentation

◆ BITMAP_TOGGLE() [1/2]

BITMAP_TOGGLE::BITMAP_TOGGLE ( )
inline

Definition at line 47 of file bitmap_toggle.h.

◆ BITMAP_TOGGLE() [2/2]

BITMAP_TOGGLE::BITMAP_TOGGLE ( wxWindow *  aParent,
wxWindowID  aId,
const wxBitmapBundle &  aCheckedBitmap,
const wxBitmapBundle &  aUncheckedBitmap,
bool  aChecked = false 
)

Set the checkbox state.

Definition at line 34 of file bitmap_toggle.cpp.

References GetValue(), m_bitmap, m_checked, m_checked_bitmap, m_debounce, m_unchecked_bitmap, and SetValue().

Member Function Documentation

◆ GetValue()

bool BITMAP_TOGGLE::GetValue ( ) const
inline

Definition at line 56 of file bitmap_toggle.h.

References m_checked.

Referenced by BITMAP_TOGGLE().

◆ SetValue()

void BITMAP_TOGGLE::SetValue ( bool  aValue)

◆ SetWindowID()

void BITMAP_TOGGLE::SetWindowID ( wxWindowID  aId)
inline

Updates the window ID of this control and its children.

Parameters
aIdnew Window ID to set

Definition at line 62 of file bitmap_toggle.h.

References m_bitmap.

Member Data Documentation

◆ m_bitmap

wxStaticBitmap* BITMAP_TOGGLE::m_bitmap
private

Definition at line 71 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), SetValue(), and SetWindowID().

◆ m_checked

bool BITMAP_TOGGLE::m_checked
private

Definition at line 69 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), GetValue(), and SetValue().

◆ m_checked_bitmap

wxBitmapBundle BITMAP_TOGGLE::m_checked_bitmap
private

Definition at line 73 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), and SetValue().

◆ m_debounce

wxLongLong BITMAP_TOGGLE::m_debounce
private

Definition at line 75 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE().

◆ m_unchecked_bitmap

wxBitmapBundle BITMAP_TOGGLE::m_unchecked_bitmap
private

Definition at line 72 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), and SetValue().


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