Implemented logic.

This commit is contained in:
Maarten Bent
2016-02-06 17:12:56 +01:00
parent 47794945b5
commit 415292c614
3 changed files with 85 additions and 0 deletions

View File

@@ -101,6 +101,11 @@ public:
void SetTextColour(const wxColour& col);
long GetTopItem() const;
virtual bool HasCheckboxes() const wxOVERRIDE;
virtual bool EnableCheckboxes(bool enable = true) wxOVERRIDE;
virtual bool IsItemChecked(long item) const wxOVERRIDE;
virtual void CheckItem(long item, bool check) wxOVERRIDE;
void SetSingleStyle( long style, bool add = true ) ;
void SetWindowStyleFlag( long style ) wxOVERRIDE;
void RecreateWindow() {}

View File

@@ -200,6 +200,8 @@ public:
// is this item selected? [NB: not used in virtual mode]
bool m_highlighted;
bool m_checked;
// back pointer to the list ctrl
wxListMainWindow *m_owner;
@@ -249,6 +251,9 @@ public:
void SetImage( int index, int image );
int GetImage( int index ) const;
void Check(bool check) {m_checked = check; }
bool IsChecked() { return m_checked; }
bool HasImage() const { return GetImage() != -1; }
bool HasText() const { return !GetText(0).empty(); }
@@ -636,6 +641,11 @@ public:
bool GetItemPosition( long item, wxPoint& pos ) const;
int GetSelectedItemCount() const;
bool HasCheckboxes() const;
bool EnableCheckboxes(bool enable = true);
bool IsItemChecked(long item) const;
void CheckItem(long item, bool check);
wxString GetItemText(long item, int col = 0) const
{
wxListItem info;
@@ -779,6 +789,8 @@ protected:
m_lineBeforeLastClicked,
m_lineSelectSingleOnUp;
bool m_hasCheckboxes;
protected:
wxWindow *GetMainWindowOfCompositeControl() wxOVERRIDE { return GetParent(); }