KiCad PCB EDA Suite
|
A checkbox control except with custom bitmaps for the checked and unchecked states. More...
#include <bitmap_toggle.h>
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 |
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.
|
inline |
Definition at line 47 of file bitmap_toggle.h.
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().
|
inline |
void BITMAP_TOGGLE::SetValue | ( | bool | aValue | ) |
Read the checkbox state.
Definition at line 81 of file bitmap_toggle.cpp.
References m_bitmap, m_checked, m_checked_bitmap, and m_unchecked_bitmap.
Referenced by BITMAP_TOGGLE(), APPEARANCE_CONTROLS::SetObjectVisible(), and APPEARANCE_CONTROLS::UpdateDisplayOptions().
|
inline |
Updates the window ID of this control and its children.
aId | new Window ID to set |
Definition at line 62 of file bitmap_toggle.h.
References m_bitmap.
|
private |
Definition at line 71 of file bitmap_toggle.h.
Referenced by BITMAP_TOGGLE(), SetValue(), and SetWindowID().
|
private |
Definition at line 69 of file bitmap_toggle.h.
Referenced by BITMAP_TOGGLE(), GetValue(), and SetValue().
|
private |
Definition at line 73 of file bitmap_toggle.h.
Referenced by BITMAP_TOGGLE(), and SetValue().
|
private |
Definition at line 75 of file bitmap_toggle.h.
Referenced by BITMAP_TOGGLE().
|
private |
Definition at line 72 of file bitmap_toggle.h.
Referenced by BITMAP_TOGGLE(), and SetValue().