// forward decl for GetSelections()
class wxArrayInt;
+// forward decl for GetPeer()
+class wxMacListControl ;
+
// List box item
WX_DEFINE_ARRAY( char * , wxListDataArray ) ;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
- // Windows callbacks
-#ifndef __WXMAC_OSX__
- void OnChar(wxKeyEvent& event);
-#endif
-
- void* m_macList ;
wxArrayString m_stringArray ;
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:
+ // internal storage for line n has changed, issue a redraw
+ void MacUpdateLine( int n ) ;
+
virtual void DoSetSelection(int n, bool select);
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
unsigned int m_noItems;
int m_selected;
bool m_suppressSelection ;
- wxString m_typeIn ;
- long m_lastTypeIn ;
virtual wxSize DoGetBestSize() const;
+ // common creation for all databrowser list implementations
+ wxMacListControl* CreateMacListControl(const wxPoint& pos, const wxSize& size, long style) ;
+
private:
DECLARE_DYNAMIC_CLASS(wxListBox)
DECLARE_EVENT_TABLE()
virtual void GetFeatures( UInt32 *features ) ;
virtual OSStatus GetRegion( ControlPartCode partCode , RgnHandle region ) ;
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 IsRootControl() { return m_isRootControl ; }
+
+ // to be moved into a tab control class
+
+ virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
protected :
ControlRef m_controlRef ;
wxFont m_font ;