listbox cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,6 +21,9 @@
|
|||||||
// forward decl for GetSelections()
|
// forward decl for GetSelections()
|
||||||
class wxArrayInt;
|
class wxArrayInt;
|
||||||
|
|
||||||
|
// forward decl for GetPeer()
|
||||||
|
class wxMacListControl ;
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
|
|
||||||
WX_DEFINE_ARRAY( char * , wxListDataArray ) ;
|
WX_DEFINE_ARRAY( char * , wxListDataArray ) ;
|
||||||
@@ -90,19 +93,15 @@ public:
|
|||||||
static wxVisualAttributes
|
static wxVisualAttributes
|
||||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
// Windows callbacks
|
|
||||||
#ifndef __WXMAC_OSX__
|
|
||||||
void OnChar(wxKeyEvent& event);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void* m_macList ;
|
|
||||||
wxArrayString m_stringArray ;
|
wxArrayString m_stringArray ;
|
||||||
wxListDataArray m_dataArray ;
|
wxListDataArray m_dataArray ;
|
||||||
|
|
||||||
|
wxMacListControl* GetPeer() const { return (wxMacListControl*) m_peer ; }
|
||||||
|
|
||||||
// as we are getting the same events for human and API selection we have to suppress
|
|
||||||
// events in the latter case
|
|
||||||
bool MacIsSelectionSuppressed() const { return m_suppressSelection ; }
|
|
||||||
protected:
|
protected:
|
||||||
|
// internal storage for line n has changed, issue a redraw
|
||||||
|
void MacUpdateLine( int n ) ;
|
||||||
|
|
||||||
virtual void DoSetSelection(int n, bool select);
|
virtual void DoSetSelection(int n, bool select);
|
||||||
virtual int DoAppend(const wxString& item);
|
virtual int DoAppend(const wxString& item);
|
||||||
virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
|
virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
|
||||||
@@ -135,11 +134,12 @@ protected:
|
|||||||
unsigned int m_noItems;
|
unsigned int m_noItems;
|
||||||
int m_selected;
|
int m_selected;
|
||||||
bool m_suppressSelection ;
|
bool m_suppressSelection ;
|
||||||
wxString m_typeIn ;
|
|
||||||
long m_lastTypeIn ;
|
|
||||||
|
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
// common creation for all databrowser list implementations
|
||||||
|
wxMacListControl* CreateMacListControl(const wxPoint& pos, const wxSize& size, long style) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
@@ -618,40 +618,13 @@ public :
|
|||||||
virtual void GetFeatures( UInt32 *features ) ;
|
virtual void GetFeatures( UInt32 *features ) ;
|
||||||
virtual OSStatus GetRegion( ControlPartCode partCode , RgnHandle region ) ;
|
virtual OSStatus GetRegion( ControlPartCode partCode , RgnHandle region ) ;
|
||||||
virtual OSStatus SetZOrder( bool above , wxMacControl* other ) ;
|
virtual OSStatus SetZOrder( bool above , wxMacControl* other ) ;
|
||||||
// to be moved into a databrowser subclass
|
|
||||||
|
|
||||||
virtual OSStatus SetSelectionFlags( DataBrowserSelectionFlags ) ;
|
|
||||||
virtual OSStatus AddListViewColumn( DataBrowserListViewColumnDesc *columnDesc,
|
|
||||||
DataBrowserTableViewColumnIndex position ) ;
|
|
||||||
virtual OSStatus AutoSizeListViewColumns() ;
|
|
||||||
virtual OSStatus SetHasScrollBars( bool horiz , bool vert ) ;
|
|
||||||
virtual OSStatus SetTableViewHiliteStyle( DataBrowserTableViewHiliteStyle hiliteStyle ) ;
|
|
||||||
virtual OSStatus SetListViewHeaderBtnHeight(UInt16 height) ;
|
|
||||||
virtual OSStatus SetCallbacks(const DataBrowserCallbacks * callbacks) ;
|
|
||||||
virtual OSStatus UpdateItems( DataBrowserItemID container, UInt32 numItems,
|
|
||||||
const DataBrowserItemID* items,
|
|
||||||
DataBrowserPropertyID preSortProperty,
|
|
||||||
DataBrowserPropertyID propertyID ) ;
|
|
||||||
virtual OSStatus AddItems( DataBrowserItemID container, UInt32 numItems,
|
|
||||||
const DataBrowserItemID* items,
|
|
||||||
DataBrowserPropertyID preSortProperty ) ;
|
|
||||||
virtual OSStatus RemoveItems( DataBrowserItemID container, UInt32 numItems,
|
|
||||||
const DataBrowserItemID* items,
|
|
||||||
DataBrowserPropertyID preSortProperty ) ;
|
|
||||||
virtual OSStatus RevealItem( DataBrowserItemID item,
|
|
||||||
DataBrowserPropertyID propertyID,
|
|
||||||
DataBrowserRevealOptions options ) ;
|
|
||||||
virtual OSStatus GetSelectionAnchor( DataBrowserItemID * first, DataBrowserItemID * last ) ;
|
|
||||||
virtual bool IsItemSelected( DataBrowserItemID item ) ;
|
|
||||||
virtual OSStatus SetSelectedItems(UInt32 numItems,
|
|
||||||
const DataBrowserItemID * items,
|
|
||||||
DataBrowserSetOption operation ) ;
|
|
||||||
|
|
||||||
// to be moved into a tab control class
|
|
||||||
|
|
||||||
virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
|
|
||||||
bool IsCompositing() { return m_isCompositing ; }
|
bool IsCompositing() { return m_isCompositing ; }
|
||||||
bool IsRootControl() { return m_isRootControl ; }
|
bool IsRootControl() { return m_isRootControl ; }
|
||||||
|
|
||||||
|
// to be moved into a tab control class
|
||||||
|
|
||||||
|
virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
|
||||||
protected :
|
protected :
|
||||||
ControlRef m_controlRef ;
|
ControlRef m_controlRef ;
|
||||||
wxFont m_font ;
|
wxFont m_font ;
|
||||||
|
Reference in New Issue
Block a user