Additions and fixes for AUI class interfaces
This commit is contained in:
@@ -148,6 +148,10 @@ enum wxAuiToolBarToolTextOrientation
|
||||
class wxAuiToolBarEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
|
||||
int winId = 0);
|
||||
wxAuiToolBarEvent(const wxAuiToolBarEvent& c);
|
||||
|
||||
/**
|
||||
Returns whether the drop down menu has been clicked.
|
||||
*/
|
||||
@@ -167,8 +171,20 @@ public:
|
||||
Returns the wxAuiToolBarItem identifier.
|
||||
*/
|
||||
int GetToolId() const;
|
||||
|
||||
|
||||
void SetDropDownClicked(bool c);
|
||||
void SetClickPoint(const wxPoint& p);
|
||||
void SetItemRect(const wxRect& r);
|
||||
void SetToolId(int toolId);
|
||||
};
|
||||
|
||||
wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN;
|
||||
wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK;
|
||||
wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK;
|
||||
wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK;
|
||||
wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG;
|
||||
|
||||
|
||||
/**
|
||||
@class wxAuiToolBarItem
|
||||
|
@@ -5,6 +5,32 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum wxAuiNotebookOption
|
||||
{
|
||||
wxAUI_NB_TOP = 1 << 0,
|
||||
wxAUI_NB_LEFT = 1 << 1, // not implemented yet
|
||||
wxAUI_NB_RIGHT = 1 << 2, // not implemented yet
|
||||
wxAUI_NB_BOTTOM = 1 << 3,
|
||||
wxAUI_NB_TAB_SPLIT = 1 << 4,
|
||||
wxAUI_NB_TAB_MOVE = 1 << 5,
|
||||
wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6,
|
||||
wxAUI_NB_TAB_FIXED_WIDTH = 1 << 7,
|
||||
wxAUI_NB_SCROLL_BUTTONS = 1 << 8,
|
||||
wxAUI_NB_WINDOWLIST_BUTTON = 1 << 9,
|
||||
wxAUI_NB_CLOSE_BUTTON = 1 << 10,
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
|
||||
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
|
||||
wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
|
||||
|
||||
wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
|
||||
wxAUI_NB_TAB_SPLIT |
|
||||
wxAUI_NB_TAB_MOVE |
|
||||
wxAUI_NB_SCROLL_BUTTONS |
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
|
||||
wxAUI_NB_MIDDLE_CLICK_CLOSE
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxAuiNotebook
|
||||
|
||||
@@ -270,7 +296,7 @@ public:
|
||||
@since 2.9.3
|
||||
*/
|
||||
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
|
||||
bool select=false, int imageId=NO_IMAGE);
|
||||
bool select, int imageId);
|
||||
|
||||
/**
|
||||
Removes a page, without deleting the window pointer.
|
||||
@@ -375,6 +401,27 @@ public:
|
||||
bool ShowWindowMenu();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxAuiNotebookPage
|
||||
|
||||
A simple class which holds information about the notebook's pages and their state.
|
||||
|
||||
@library{wxaui}
|
||||
@category{aui}
|
||||
*/
|
||||
class wxAuiNotebookPage
|
||||
{
|
||||
public:
|
||||
wxWindow* window; // page's associated window
|
||||
wxString caption; // caption displayed on the tab
|
||||
wxString tooltip; // tooltip displayed when hovering over tab title
|
||||
wxBitmap bitmap; // tab's bitmap
|
||||
wxRect rect; // tab's hit rectangle
|
||||
bool active; // true if the page is currently active
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxAuiTabContainerButton
|
||||
|
||||
@@ -654,6 +701,23 @@ public:
|
||||
wxEvent *Clone();
|
||||
};
|
||||
|
||||
wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE;
|
||||
wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED;
|
||||
wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED;
|
||||
wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING;
|
||||
wxEventType wxEVT_AUINOTEBOOK_BUTTON;
|
||||
wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG;
|
||||
wxEventType wxEVT_AUINOTEBOOK_END_DRAG;
|
||||
wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION;
|
||||
wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND;
|
||||
wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE;
|
||||
wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN;
|
||||
wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP;
|
||||
wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN;
|
||||
wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP;
|
||||
wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK;
|
||||
|
||||
|
||||
/**
|
||||
Default art provider for wxAuiNotebook.
|
||||
|
||||
|
@@ -281,3 +281,102 @@ public:
|
||||
virtual void SetMetric(int id, int new_val) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxAuiDefaultDockArt
|
||||
|
||||
This is the default art provider for @ref wxAuiManager. Dock art
|
||||
can be customized by creating a class derived from this one,
|
||||
or replacing this class entirely.
|
||||
*/
|
||||
class wxAuiDefaultDockArt : public wxAuiDockArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiDefaultDockArt();
|
||||
|
||||
int GetMetric(int metricId);
|
||||
void SetMetric(int metricId, int newVal);
|
||||
wxColour GetColour(int id);
|
||||
void SetColour(int id, const wxColour& colour);
|
||||
void SetFont(int id, const wxFont& font);
|
||||
wxFont GetFont(int id);
|
||||
|
||||
void DrawSash(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawBackground(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawCaption(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawGripper(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawBorder(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawPaneButton(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int button,
|
||||
int buttonState,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawIcon(wxDC& dc,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
protected:
|
||||
|
||||
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
|
||||
|
||||
void InitBitmaps();
|
||||
|
||||
protected:
|
||||
|
||||
wxPen m_borderPen;
|
||||
wxBrush m_sashBrush;
|
||||
wxBrush m_backgroundBrush;
|
||||
wxBrush m_gripperBrush;
|
||||
wxFont m_captionFont;
|
||||
wxBitmap m_inactiveCloseBitmap;
|
||||
wxBitmap m_inactivePinBitmap;
|
||||
wxBitmap m_inactiveMaximizeBitmap;
|
||||
wxBitmap m_inactiveRestoreBitmap;
|
||||
wxBitmap m_activeCloseBitmap;
|
||||
wxBitmap m_activePinBitmap;
|
||||
wxBitmap m_activeMaximizeBitmap;
|
||||
wxBitmap m_activeRestoreBitmap;
|
||||
wxPen m_gripperPen1;
|
||||
wxPen m_gripperPen2;
|
||||
wxPen m_gripperPen3;
|
||||
wxColour m_baseColour;
|
||||
wxColour m_activeCaptionColour;
|
||||
wxColour m_activeCaptionGradientColour;
|
||||
wxColour m_activeCaptionTextColour;
|
||||
wxColour m_inactiveCaptionColour;
|
||||
wxColour m_inactiveCaptionGradientColour;
|
||||
wxColour m_inactiveCaptionTextColour;
|
||||
int m_borderSize;
|
||||
int m_captionSize;
|
||||
int m_sashSize;
|
||||
int m_buttonSize;
|
||||
int m_gripperSize;
|
||||
int m_gradientType;
|
||||
};
|
||||
|
||||
|
@@ -969,3 +969,65 @@ wxEventType wxEVT_AUI_PANE_RESTORE;
|
||||
wxEventType wxEVT_AUI_PANE_ACTIVATED;
|
||||
wxEventType wxEVT_AUI_RENDER;
|
||||
wxEventType wxEVT_AUI_FIND_MANAGER;
|
||||
|
||||
|
||||
|
||||
class wxAuiDockInfo
|
||||
{
|
||||
public:
|
||||
wxAuiDockInfo();
|
||||
wxAuiDockInfo(const wxAuiDockInfo& c);
|
||||
wxAuiDockInfo& operator=(const wxAuiDockInfo& c);
|
||||
|
||||
bool IsOk() const;
|
||||
bool IsHorizontal() const;
|
||||
bool IsVertical() const;
|
||||
|
||||
wxAuiPaneInfoPtrArray panes; // array of panes
|
||||
wxRect rect; // current rectangle
|
||||
int dock_direction; // dock direction (top, bottom, left, right, center)
|
||||
int dock_layer; // layer number (0 = innermost layer)
|
||||
int dock_row; // row number on the docking bar (0 = first row)
|
||||
int size; // size of the dock
|
||||
int min_size; // minimum size of a dock (0 if there is no min)
|
||||
bool resizable; // flag indicating whether the dock is resizable
|
||||
bool toolbar; // flag indicating dock contains only toolbars
|
||||
bool fixed; // flag indicating that the dock operates on
|
||||
// absolute coordinates as opposed to proportional
|
||||
bool reserved1;
|
||||
};
|
||||
|
||||
|
||||
class wxAuiDockUIPart
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
typeCaption,
|
||||
typeGripper,
|
||||
typeDock,
|
||||
typeDockSizer,
|
||||
typePane,
|
||||
typePaneSizer,
|
||||
typeBackground,
|
||||
typePaneBorder,
|
||||
typePaneButton
|
||||
};
|
||||
|
||||
int type; // ui part type (see enum above)
|
||||
int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL)
|
||||
wxAuiDockInfo* dock; // which dock the item is associated with
|
||||
wxAuiPaneInfo* pane; // which pane the item is associated with
|
||||
wxAuiPaneButton* button; // which pane button the item is associated with
|
||||
wxSizer* cont_sizer; // the part's containing sizer
|
||||
wxSizerItem* sizer_item; // the sizer item of the part
|
||||
wxRect rect; // client coord rectangle of the part itself
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxAuiPaneButton
|
||||
{
|
||||
public:
|
||||
int button_id; // id of the button (e.g. buttonClose)
|
||||
};
|
||||
|
140
interface/wx/aui/tabmdi.h
Normal file
140
interface/wx/aui/tabmdi.h
Normal file
@@ -0,0 +1,140 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/tabmdi.h
|
||||
// Purpose: Documentation of wxAui MDI classes.
|
||||
// Created: 2016-10-27
|
||||
// Copyright: (c) 2016 wxWidgets development team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class wxAuiMDIParentFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxAuiMDIParentFrame();
|
||||
wxAuiMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
~wxAuiMDIParentFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
|
||||
void SetArtProvider(wxAuiTabArt* provider);
|
||||
wxAuiTabArt* GetArtProvider();
|
||||
wxAuiNotebook* GetNotebook() const;
|
||||
|
||||
wxMenu* GetWindowMenu() const;
|
||||
void SetWindowMenu(wxMenu* pMenu);
|
||||
|
||||
virtual void SetMenuBar(wxMenuBar *pMenuBar);
|
||||
|
||||
void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
|
||||
|
||||
wxAuiMDIChildFrame *GetActiveChild() const;
|
||||
void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
|
||||
wxAuiMDIClientWindow *GetClientWindow() const;
|
||||
virtual wxAuiMDIClientWindow *OnCreateClient();
|
||||
|
||||
virtual void Cascade();
|
||||
virtual void Tile(wxOrientation orient = wxHORIZONTAL);
|
||||
virtual void ArrangeIcons();
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxAuiMDIChildFrame : public wxPanel
|
||||
{
|
||||
public:
|
||||
wxAuiMDIChildFrame();
|
||||
wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxAuiMDIChildFrame();
|
||||
bool Create(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual void SetMenuBar(wxMenuBar *menuBar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
virtual const wxIconBundle& GetIcons() const;
|
||||
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual const wxIcon& GetIcon() const;
|
||||
|
||||
virtual void Activate();
|
||||
virtual bool Destroy();
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
// no status bars
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
long style = 1,
|
||||
wxWindowID winid = 1,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
virtual wxStatusBar *GetStatusBar() const;
|
||||
virtual void SetStatusText( const wxString &text, int number=0 );
|
||||
virtual void SetStatusWidths( int n, const int widths_field[] );
|
||||
|
||||
// no toolbar bars
|
||||
virtual wxToolBar* CreateToolBar(long style,
|
||||
wxWindowID winid,
|
||||
const wxString& name);
|
||||
virtual wxToolBar *GetToolBar() const;
|
||||
|
||||
// no maximize etc
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual void Restore();
|
||||
virtual void Iconize(bool iconize = true);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual bool IsIconized() const;
|
||||
virtual bool ShowFullScreen(bool show, long style);
|
||||
virtual bool IsFullScreen() const;
|
||||
|
||||
virtual bool IsTopLevel() const;
|
||||
|
||||
void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
|
||||
wxAuiMDIParentFrame* GetMDIParentFrame() const;
|
||||
};
|
||||
|
||||
|
||||
class wxAuiMDIClientWindow : public wxAuiNotebook
|
||||
{
|
||||
public:
|
||||
wxAuiMDIClientWindow();
|
||||
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
|
||||
|
||||
virtual bool CreateClient(wxAuiMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
virtual int SetSelection(size_t page);
|
||||
virtual wxAuiMDIChildFrame* GetActiveChild();
|
||||
virtual void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
};
|
Reference in New Issue
Block a user