ALBA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaGUICheckListBox Class Reference

#include <albaGUICheckListBox.h>

Inheritance diagram for albaGUICheckListBox:
Inheritance graph
[legend]
Collaboration diagram for albaGUICheckListBox:
Collaboration graph
[legend]

Public Member Functions

 albaGUICheckListBox (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxCLIP_CHILDREN)
 
virtual ~albaGUICheckListBox ()
 
void Clear ()
 
void AddItem (int id, wxString label)
 
void AddItem (int id, wxString label, bool checked)
 
void RemoveItem (int id)
 
void CheckItem (int id, bool check)
 
void SetItemLabel (int id, albaString label)
 
albaString GetItemLabel (int id)
 
void Select (int id)
 
int GetSelection ()
 
bool IsItemChecked (int id)
 
void SetCheckMode (int mode)
 
void SetCheckModeToRadio ()
 
void SetCheckModeToCheck ()
 
void SetListener (albaObserver *listener)
 
int FindItem (wxString label)
 
int FindItemIndex (int id)
 
bool IsCheckEvent ()
 
int GetNumberOfItems ()
 
void SetCheckEvent (bool enable)
 
void HighlightItem (int index, int rgbText[3], int rgbBack[3])
 
- Public Member Functions inherited from albaGUIPanel
 albaGUIPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
 

Protected Member Functions

void OnSelect (wxCommandEvent &event)
 
void OnCheck (wxCommandEvent &event)
 
void OnSize (wxSizeEvent &event)
 

Protected Attributes

bool m_CheckEvent
 
albaObserverm_Listener
 
wxCheckListBox * m_CheckListBox
 
bool m_PreventNotify
 
int m_CheckMode
 
int m_Array [albaGUICheckListBox_ArraySize]
 
int m_SelectedItem
 

Additional Inherited Members

- Public Attributes inherited from albaGUIPanel
albaGUIPanelm_NextPanel
 

Detailed Description

a CheckList that send albaEventNotification in the form albaEvent(this, widget_id, item_id, checked)

Definition at line 49 of file albaGUICheckListBox.h.

Constructor & Destructor Documentation

◆ albaGUICheckListBox()

albaGUICheckListBox::albaGUICheckListBox ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL|wxCLIP_CHILDREN 
)

◆ ~albaGUICheckListBox()

virtual albaGUICheckListBox::~albaGUICheckListBox ( )
virtual

Member Function Documentation

◆ Clear()

void albaGUICheckListBox::Clear ( )

Clear the checked listbox.

◆ AddItem() [1/2]

void albaGUICheckListBox::AddItem ( int  id,
wxString  label 
)

Add the item to the checked listbox.

◆ AddItem() [2/2]

void albaGUICheckListBox::AddItem ( int  id,
wxString  label,
bool  checked 
)

Add the item to the checked listbox and allow to check it.

◆ RemoveItem()

void albaGUICheckListBox::RemoveItem ( int  id)

Remove the item from the checked listbox.

◆ CheckItem()

void albaGUICheckListBox::CheckItem ( int  id,
bool  check 
)

Check/Uncheck the item into the checked listbox.

◆ SetItemLabel()

void albaGUICheckListBox::SetItemLabel ( int  id,
albaString  label 
)

Set the item label.

◆ GetItemLabel()

albaString albaGUICheckListBox::GetItemLabel ( int  id)

Get the item label.

◆ Select()

void albaGUICheckListBox::Select ( int  id)

Select the item.

◆ GetSelection()

int albaGUICheckListBox::GetSelection ( )
inline

Get the selected item.

Definition at line 85 of file albaGUICheckListBox.h.

◆ IsItemChecked()

bool albaGUICheckListBox::IsItemChecked ( int  id)

Return true if the item is checked.

◆ SetCheckMode()

void albaGUICheckListBox::SetCheckMode ( int  mode)
inline

Set the check mode of the checked listbox to be MODE_RADIO or MODE_CHECK.

Definition at line 91 of file albaGUICheckListBox.h.

◆ SetCheckModeToRadio()

void albaGUICheckListBox::SetCheckModeToRadio ( )
inline

Set the check mode of the checked listbox to be MODE_RADIO.

Definition at line 94 of file albaGUICheckListBox.h.

References MODE_RADIO.

◆ SetCheckModeToCheck()

void albaGUICheckListBox::SetCheckModeToCheck ( )
inline

Set the check mode of the checked listbox to be MODE_CHECK.

Definition at line 97 of file albaGUICheckListBox.h.

References MODE_CHECK.

◆ SetListener()

void albaGUICheckListBox::SetListener ( albaObserver listener)
inline

Definition at line 99 of file albaGUICheckListBox.h.

◆ FindItem()

int albaGUICheckListBox::FindItem ( wxString  label)

Return the index of the item into the checked listbox, otherwise -1 if the item is not present.

◆ FindItemIndex()

int albaGUICheckListBox::FindItemIndex ( int  id)

Return the index of the item into the array, otherwise -1 if the item is not present.

◆ IsCheckEvent()

bool albaGUICheckListBox::IsCheckEvent ( )
inline

Return true if the event raised is coming from a check/uncheck item.

Definition at line 108 of file albaGUICheckListBox.h.

◆ GetNumberOfItems()

int albaGUICheckListBox::GetNumberOfItems ( )
inline

Return the number of inserted items.

Definition at line 111 of file albaGUICheckListBox.h.

◆ SetCheckEvent()

void albaGUICheckListBox::SetCheckEvent ( bool  enable)
inline

Set Flag used to distinguish between Check item and Select item event.

Definition at line 114 of file albaGUICheckListBox.h.

◆ HighlightItem()

void albaGUICheckListBox::HighlightItem ( int  index,
int  rgbText[3],
int  rgbBack[3] 
)

Highlight Item.

◆ OnSelect()

void albaGUICheckListBox::OnSelect ( wxCommandEvent &  event)
protected

Send an event to the listener to notify that an item has been selected.

◆ OnCheck()

void albaGUICheckListBox::OnCheck ( wxCommandEvent &  event)
protected

Send an event to the listener to notify that an item has been checked.

◆ OnSize()

void albaGUICheckListBox::OnSize ( wxSizeEvent &  event)
protected

Resize the checked listbox according to the new parent panel size.

Member Data Documentation

◆ m_CheckEvent

bool albaGUICheckListBox::m_CheckEvent
protected

Flag used to distinguish between Check item and Select item event.

Definition at line 129 of file albaGUICheckListBox.h.

◆ m_Listener

albaObserver* albaGUICheckListBox::m_Listener
protected

Definition at line 130 of file albaGUICheckListBox.h.

◆ m_CheckListBox

wxCheckListBox* albaGUICheckListBox::m_CheckListBox
protected

Definition at line 131 of file albaGUICheckListBox.h.

◆ m_PreventNotify

bool albaGUICheckListBox::m_PreventNotify
protected

Definition at line 132 of file albaGUICheckListBox.h.

◆ m_CheckMode

int albaGUICheckListBox::m_CheckMode
protected

Definition at line 133 of file albaGUICheckListBox.h.

◆ m_Array

int albaGUICheckListBox::m_Array[albaGUICheckListBox_ArraySize]
protected

Definition at line 134 of file albaGUICheckListBox.h.

◆ m_SelectedItem

int albaGUICheckListBox::m_SelectedItem
protected

Definition at line 135 of file albaGUICheckListBox.h.


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