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 wxBitmap &aCheckedBitmap, const wxBitmap &aUncheckedBitmap, bool aChecked=false)
 Set the checkbox state. More...
 
void SetValue (bool aValue)
 Read the checkbox state. More...
 
bool GetValue () const
 
void SetWindowID (wxWindowID aId)
 Updates the window ID of this control and its children. More...
 

Private Attributes

bool m_checked
 
wxStaticBitmap * m_bitmap
 
wxBitmap m_unchecked_bitmap
 
wxBitmap 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 43 of file bitmap_toggle.h.

Constructor & Destructor Documentation

◆ BITMAP_TOGGLE() [1/2]

BITMAP_TOGGLE::BITMAP_TOGGLE ( )
inline

Definition at line 46 of file bitmap_toggle.h.

◆ BITMAP_TOGGLE() [2/2]

BITMAP_TOGGLE::BITMAP_TOGGLE ( wxWindow *  aParent,
wxWindowID  aId,
const wxBitmap &  aCheckedBitmap,
const wxBitmap &  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 55 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 61 of file bitmap_toggle.h.

References m_bitmap.

Member Data Documentation

◆ m_bitmap

wxStaticBitmap* BITMAP_TOGGLE::m_bitmap
private

Definition at line 70 of file bitmap_toggle.h.

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

◆ m_checked

bool BITMAP_TOGGLE::m_checked
private

Definition at line 68 of file bitmap_toggle.h.

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

◆ m_checked_bitmap

wxBitmap BITMAP_TOGGLE::m_checked_bitmap
private

Definition at line 72 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), and SetValue().

◆ m_debounce

wxLongLong BITMAP_TOGGLE::m_debounce
private

Definition at line 74 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE().

◆ m_unchecked_bitmap

wxBitmap BITMAP_TOGGLE::m_unchecked_bitmap
private

Definition at line 71 of file bitmap_toggle.h.

Referenced by BITMAP_TOGGLE(), and SetValue().


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