wxAUI_NB_CLOSE_BUTTON = 1 << 10,
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
-
-
+
+
wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
wxAUI_NB_TAB_SPLIT |
wxAUI_NB_TAB_MOVE |
void SetSelection(int s) { selection = s; m_commandInt = s; }
int GetSelection() const { return selection; }
-
+
void SetOldSelection(int s) { old_selection = s; }
int GetOldSelection() const { return old_selection; }
-
+
void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
wxAuiNotebook* GetDragSource() const { return drag_source; }
wxAuiTabArt() { }
virtual ~wxAuiTabArt() { }
-
+
virtual wxAuiTabArt* Clone() = 0;
virtual void SetFlags(unsigned int flags) = 0;
virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
size_t tab_count) = 0;
-
+
virtual void SetNormalFont(const wxFont& font) = 0;
virtual void SetSelectedFont(const wxFont& font) = 0;
virtual void SetMeasuringFont(const wxFont& font) = 0;
int close_button_state,
wxRect* out_tab_rect,
wxRect* out_button_rect,
- int* x_extent) = 0;
-
+ int* x_extent) = 0;
+
virtual void DrawButton(
wxDC& dc,
wxWindow* wnd,
int button_state,
int orientation,
wxRect* out_rect) = 0;
-
+
virtual wxSize GetTabSize(
wxDC& dc,
wxWindow* wnd,
bool active,
int close_button_state,
int* x_extent) = 0;
-
+
virtual int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int active_idx) = 0;
-
+
virtual int GetIndentSize() = 0;
-
+
virtual int GetBestTabCtrlSize(
wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size) = 0;
+ const wxSize& required_bmp_size) = 0;
};
wxAuiDefaultTabArt();
virtual ~wxAuiDefaultTabArt();
-
+
wxAuiTabArt* Clone();
void SetFlags(unsigned int flags);
void SetSizingInfo(const wxSize& tab_ctrl_size,
wxDC& dc,
wxWindow* wnd,
const wxRect& rect);
-
+
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxAuiNotebookPage& pane,
wxRect* out_tab_rect,
wxRect* out_button_rect,
int* x_extent);
-
+
void DrawButton(
wxDC& dc,
wxWindow* wnd,
int button_state,
int orientation,
wxRect* out_rect);
-
+
int GetIndentSize();
-
+
wxSize GetTabSize(
wxDC& dc,
wxWindow* wnd,
bool active,
int close_button_state,
int* x_extent);
-
+
int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size);
+ const wxSize& required_bmp_size);
protected:
wxBitmap m_disabled_right_bmp;
wxBitmap m_active_windowlist_bmp;
wxBitmap m_disabled_windowlist_bmp;
-
+
int m_fixed_tab_width;
int m_tab_ctrl_height;
unsigned int m_flags;
wxAuiSimpleTabArt();
virtual ~wxAuiSimpleTabArt();
-
+
wxAuiTabArt* Clone();
void SetFlags(unsigned int flags);
wxDC& dc,
wxWindow* wnd,
const wxRect& rect);
-
+
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxAuiNotebookPage& pane,
wxRect* out_tab_rect,
wxRect* out_button_rect,
int* x_extent);
-
+
void DrawButton(
wxDC& dc,
wxWindow* wnd,
int button_state,
int orientation,
wxRect* out_rect);
-
+
int GetIndentSize();
-
+
wxSize GetTabSize(
wxDC& dc,
wxWindow* wnd,
bool active,
int close_button_state,
int* x_extent);
-
+
int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size);
+ const wxSize& required_bmp_size);
protected:
wxBitmap m_disabled_right_bmp;
wxBitmap m_active_windowlist_bmp;
wxBitmap m_disabled_windowlist_bmp;
-
+
int m_fixed_tab_width;
unsigned int m_flags;
};
void SetMeasuringFont(const wxFont& measuring_font);
void DoShowHide();
void SetRect(const wxRect& rect);
-
+
void RemoveButton(int id);
void AddButton(int id,
int location,
size_t GetTabOffset() const;
void SetTabOffset(size_t offset);
-
+
protected:
virtual void Render(wxDC* dc, wxWindow* wnd);
long style = 0);
~wxAuiTabCtrl();
-
+
protected:
void OnPaint(wxPaintEvent& evt);
void OnLeaveWindow(wxMouseEvent& evt);
void OnButton(wxAuiNotebookEvent& evt);
-
+
protected:
wxPoint m_click_pt;
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
-
+
void SetWindowStyleFlag(long style);
void SetArtProvider(wxAuiTabArt* art);
wxAuiTabArt* GetArtProvider() const;
-
+
virtual void SetUniformBitmapSize(const wxSize& size);
virtual void SetTabCtrlHeight(int height);
-
+
bool AddPage(wxWindow* page,
const wxString& caption,
bool select = false,
bool DeletePage(size_t page);
bool RemovePage(size_t page);
-
+
size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const;
int GetPageIndex(wxWindow* page_wnd) const;
virtual void Split(size_t page, int direction);
-#if wxABI_VERSION >= 20801
const wxAuiManager& GetAuiManager() const { return m_mgr; }
-#endif
protected:
virtual void UpdateTabCtrlHeight();
virtual int CalculateTabCtrlHeight();
virtual wxSize CalculateNewSplitSize();
-
+
protected:
void DoSizing();
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
void RemoveEmptyTabFrames();
void UpdateHintWindowSize();
-
+
protected:
void OnChildFocus(wxChildFocusEvent& evt);
void OnTabDragMotion(wxCommandEvent& evt);
void OnTabEndDrag(wxCommandEvent& evt);
void OnTabButton(wxCommandEvent& evt);
-
+
protected:
wxAuiManager m_mgr;
wxFont m_selected_font;
wxFont m_normal_font;
int m_tab_ctrl_height;
-
+
int m_last_drag_x;
unsigned int m_flags;
#define wxAuiNotebookEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiNotebookEventFunction, &func)
-
+
#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
// resets time to 00:00:00, doesn't change the date
wxDateTime& ResetTime();
-#if wxABI_VERSION >= 20802
// get the date part of this object only, i.e. the object which has the
// same date as this one but time of 00:00:00
wxDateTime GetDateOnly() const;
-#endif // wxABI 2.8.1+
// the following functions don't change the values of the other
// fields, i.e. SetMinute() won't change either hour or seconds value
const wxList& GetMenus() const { return m_fileMenus; }
-#if wxABI_VERSION >= 20802
// Set/get base id
void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
wxWindowID GetBaseId() const { return m_idBase; }
-#endif // wxABI 2.8.2+
#if WXWIN_COMPATIBILITY_2_6
// deprecated, use GetCount() instead
virtual void ShowCancelButton( bool show );
virtual bool IsCancelButtonVisible() const;
-#if wxABI_VERSION >= 20802
// TODO: In 2.9 these should probably be virtual, and declared in the base class...
void SetDescriptiveText(const wxString& text);
wxString GetDescriptiveText() const;
-#endif
// accessors
// ---------
// Sets the item text
void SetItemText(long item, const wxString& str) ;
-
+
void SetItemTextColour(long item, const wxColour& colour) ;
wxColour GetItemTextColour(long item) const;
-
+
void SetItemBackgroundColour(long item, const wxColour& colour) ;
wxColour GetItemBackgroundColour(long item) const;
// Gets the number of selected items in the list control
int GetSelectedItemCount() const;
-
+
wxRect GetViewRect() const;
// Gets the text colour of the listview
wxListCtrlCompare GetCompareFunc() { return m_compareFunc; };
long GetCompareFuncData() { return m_compareFuncData; };
-
- // public overrides needed for pimpl approach
+
+ // public overrides needed for pimpl approach
virtual bool SetFont(const wxFont& font);
virtual bool SetForegroundColour(const wxColour& colour);
virtual bool SetBackgroundColour(const wxColour& colour);
virtual wxColour GetBackgroundColour();
-
+
// functions for editing/timer
void OnRenameTimer();
bool OnRenameAccept(long itemEdit, const wxString& value);
void ChangeCurrent(long current);
void ResetCurrent() { ChangeCurrent((long)-1); }
bool HasCurrent() const { return m_current != (long)-1; }
-
+
void OnLeftDown(wxMouseEvent& event);
void OnDblClick(wxMouseEvent& event);
-
+
void FinishEditing(wxTextCtrl *text)
{
delete text;
m_textctrlWrapper = NULL;
SetFocus();
}
-
+
virtual int GetScrollPos(int orient) const;
-
-#if wxABI_VERSION >= 20801
+
void OnRightDown(wxMouseEvent& event);
void OnMiddleDown(wxMouseEvent& event);
void OnChar(wxKeyEvent& event);
virtual void SetFocus();
void FireMouseEvent(wxEventType eventType, wxPoint position);
-#endif
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget* GetDropTarget() const;
-
+
// with CG, we need to get the context from an kEventControlDraw event
// unfortunately, the DataBrowser callbacks don't provide the context
- // and we need it, so we need to set/remove it before and after draw
+ // and we need it, so we need to set/remove it before and after draw
// events so we can access it in the callbacks.
void MacSetDrawingContext(void* context) { m_cgContext = context; }
void* MacGetDrawingContext() { return m_cgContext; }
wxListCtrlRenameTimer *m_renameTimer;
// common part of all ctors
void Init();
-
+
wxGenericListCtrl* m_genericImpl; // allow use of the generic impl.
wxMacDataBrowserListCtrlControl* m_dbImpl;
void* m_macListCtrlEventHandler;
void* m_cgContext;
wxListCtrlCompare m_compareFunc;
long m_compareFuncData;
-
+
wxTextCtrl* m_textCtrl; // The control used for editing a label
wxImageList * m_imageListNormal; // The image list for normal icons
wxImageList * m_imageListSmall; // The image list for small icons
wxImageList * m_imageListState; // The image list state icons (not implemented yet)
-
+
wxColumnList m_colsInfo; // for storing info about each column
wxColour m_textColor;
- wxColour m_bgColor;
-
+ wxColour m_bgColor;
+
// keep track of whether or not we should delete the image list ourselves.
bool m_ownsImageListNormal,
m_ownsImageListSmall,
// keep track of inserted/deleted columns
int m_count; // for virtual lists, store item count
-
-private:
+
+private:
DECLARE_EVENT_TABLE()
};
virtual void ShowCancelButton( bool show );
virtual bool IsCancelButtonVisible() const;
-#if wxABI_VERSION >= 20802
// TODO: In 2.9 these should probably be virtual, and declared in the base class...
void SetDescriptiveText(const wxString& text);
wxString GetDescriptiveText() const;
-#endif
virtual wxInt32 MacSearchFieldSearchHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
virtual wxInt32 MacSearchFieldCancelHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
wxFileOffset Tell(); //FIXME: This should be const
wxFileOffset Length(); //FIXME: This should be const
-#if wxABI_VERSION >= 20601 /* 2.6.1+ only */
double GetPlaybackRate(); //All but MCI & GStreamer
bool SetPlaybackRate(double dRate); //All but MCI & GStreamer
-#endif
-#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
bool Load(const wxURI& location);
bool Load(const wxURI& location, const wxURI& proxy);
{ return Load(wxURI(fileName)); }
bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy)
{ return Load(wxURI(fileName), wxURI(proxy)); }
-#endif
protected:
static wxClassInfo* NextBackend();
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
-# define wxMEDIA_LOADED_ID 13002
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMEDIA_LOADED_ID)
-# define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-#endif
+#define wxMEDIA_LOADED_ID 13002
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMEDIA_LOADED_ID)
+#define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-#if wxABI_VERSION >= 20603 /* 2.6.3+ only */
-# define wxMEDIA_STATECHANGED_ID 13003
-# define wxMEDIA_PLAY_ID 13004
-# define wxMEDIA_PAUSE_ID 13005
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STATECHANGED, wxMEDIA_STATECHANGED_ID)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PLAY, wxMEDIA_PLAY_ID)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PAUSE, wxMEDIA_PAUSE_ID)
-# define EVT_MEDIA_STATECHANGED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-# define EVT_MEDIA_PLAY(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-# define EVT_MEDIA_PAUSE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
-#endif
+#define wxMEDIA_STATECHANGED_ID 13003
+#define wxMEDIA_PLAY_ID 13004
+#define wxMEDIA_PAUSE_ID 13005
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STATECHANGED, wxMEDIA_STATECHANGED_ID)
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PLAY, wxMEDIA_PLAY_ID)
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PAUSE, wxMEDIA_PAUSE_ID)
+#define EVT_MEDIA_STATECHANGED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
+#define EVT_MEDIA_PLAY(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
+#define EVT_MEDIA_PAUSE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
// ----------------------------------------------------------------------------
// common backend base class used by many other backends
// notify that the movie playback is finished
void QueueFinishEvent()
{
-#if wxABI_VERSION >= 20603 /* 2.6.3+ only */
QueueEvent(wxEVT_MEDIA_STATECHANGED);
-#endif
QueueEvent(wxEVT_MEDIA_FINISHED);
}
#endif
}
-#if wxABI_VERSION >= 20802
// setters for the others flags
wxSizerFlags& Shaped()
{
return *this;
}
-#endif // wx 2.8.2+
// accessors for wxSizer only
int GetProportion() const { return m_proportion; }
void Clear();
-#if wxABI_VERSION >= 20802
// return true if the conversion could be initilized successfully
bool IsOk() const;
-#endif // wx 2.8.2+
private:
// common part of all ctors
virtual bool IsSelected(const wxTreeItemId& item) const = 0;
// is item text in bold font?
virtual bool IsBold(const wxTreeItemId& item) const = 0;
-#if wxABI_VERSION >= 20801
// is the control empty?
bool IsEmpty() const;
-#endif // wxABI 2.8.1+
// number of children
void ExpandAll();
// collapse the item without removing its children
virtual void Collapse(const wxTreeItemId& item) = 0;
-#if wxABI_VERSION >= 20801
// collapse the item and all its childs and thats childs
void CollapseAllChildren(const wxTreeItemId& item);
// collapse all items
void CollapseAll();
-#endif // wxABI 2.8.1+
// collapse the item and remove all children
virtual void CollapseAndReset(const wxTreeItemId& item) = 0;
// toggles the current state