Change variables naming convention in wxAUI code.
Use the standard wxWidgets camelCase convention instead of the old_one_using_underscores for all the private variables. Closes #13476. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ea10101a15
commit
9a29fe70bc
@ -65,44 +65,44 @@ enum wxAuiToolBarToolTextOrientation
|
||||
class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxAuiToolBarEvent(wxEventType command_type = wxEVT_NULL,
|
||||
int win_id = 0)
|
||||
: wxNotifyEvent(command_type, win_id)
|
||||
wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
|
||||
int winId = 0)
|
||||
: wxNotifyEvent(commandType, winId)
|
||||
{
|
||||
is_dropdown_clicked = false;
|
||||
click_pt = wxPoint(-1, -1);
|
||||
rect = wxRect(-1,-1, 0, 0);
|
||||
tool_id = -1;
|
||||
m_isDropdownClicked = false;
|
||||
m_clickPt = wxPoint(-1, -1);
|
||||
m_rect = wxRect(-1,-1, 0, 0);
|
||||
m_toolId = -1;
|
||||
}
|
||||
#ifndef SWIG
|
||||
wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
|
||||
{
|
||||
is_dropdown_clicked = c.is_dropdown_clicked;
|
||||
click_pt = c.click_pt;
|
||||
rect = c.rect;
|
||||
tool_id = c.tool_id;
|
||||
m_isDropdownClicked = c.m_isDropdownClicked;
|
||||
m_clickPt = c.m_clickPt;
|
||||
m_rect = c.m_rect;
|
||||
m_toolId = c.m_toolId;
|
||||
}
|
||||
#endif
|
||||
wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); }
|
||||
|
||||
bool IsDropDownClicked() const { return is_dropdown_clicked; }
|
||||
void SetDropDownClicked(bool c) { is_dropdown_clicked = c; }
|
||||
bool IsDropDownClicked() const { return m_isDropdownClicked; }
|
||||
void SetDropDownClicked(bool c) { m_isDropdownClicked = c; }
|
||||
|
||||
wxPoint GetClickPoint() const { return click_pt; }
|
||||
void SetClickPoint(const wxPoint& p) { click_pt = p; }
|
||||
wxPoint GetClickPoint() const { return m_clickPt; }
|
||||
void SetClickPoint(const wxPoint& p) { m_clickPt = p; }
|
||||
|
||||
wxRect GetItemRect() const { return rect; }
|
||||
void SetItemRect(const wxRect& r) { rect = r; }
|
||||
wxRect GetItemRect() const { return m_rect; }
|
||||
void SetItemRect(const wxRect& r) { m_rect = r; }
|
||||
|
||||
int GetToolId() const { return tool_id; }
|
||||
void SetToolId(int toolid) { tool_id = toolid; }
|
||||
int GetToolId() const { return m_toolId; }
|
||||
void SetToolId(int toolId) { m_toolId = toolId; }
|
||||
|
||||
private:
|
||||
|
||||
bool is_dropdown_clicked;
|
||||
wxPoint click_pt;
|
||||
wxRect rect;
|
||||
int tool_id;
|
||||
bool m_isDropdownClicked;
|
||||
wxPoint m_clickPt;
|
||||
wxRect m_rect;
|
||||
int m_toolId;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent)
|
||||
@ -117,18 +117,18 @@ public:
|
||||
|
||||
wxAuiToolBarItem()
|
||||
{
|
||||
window = NULL;
|
||||
sizer_item = NULL;
|
||||
spacer_pixels = 0;
|
||||
toolid = 0;
|
||||
kind = wxITEM_NORMAL;
|
||||
state = 0; // normal, enabled
|
||||
proportion = 0;
|
||||
active = true;
|
||||
dropdown = true;
|
||||
sticky = true;
|
||||
user_data = 0;
|
||||
alignment = wxALIGN_CENTER;
|
||||
m_window = NULL;
|
||||
m_sizerItem = NULL;
|
||||
m_spacerPixels = 0;
|
||||
m_toolId = 0;
|
||||
m_kind = wxITEM_NORMAL;
|
||||
m_state = 0; // normal, enabled
|
||||
m_proportion = 0;
|
||||
m_active = true;
|
||||
m_dropDown = true;
|
||||
m_sticky = true;
|
||||
m_userData = 0;
|
||||
m_alignment = wxALIGN_CENTER;
|
||||
}
|
||||
|
||||
wxAuiToolBarItem(const wxAuiToolBarItem& c)
|
||||
@ -144,106 +144,106 @@ public:
|
||||
|
||||
void Assign(const wxAuiToolBarItem& c)
|
||||
{
|
||||
window = c.window;
|
||||
label = c.label;
|
||||
bitmap = c.bitmap;
|
||||
disabled_bitmap = c.disabled_bitmap;
|
||||
hover_bitmap = c.hover_bitmap;
|
||||
short_help = c.short_help;
|
||||
long_help = c.long_help;
|
||||
sizer_item = c.sizer_item;
|
||||
min_size = c.min_size;
|
||||
spacer_pixels = c.spacer_pixels;
|
||||
toolid = c.toolid;
|
||||
kind = c.kind;
|
||||
state = c.state;
|
||||
proportion = c.proportion;
|
||||
active = c.active;
|
||||
dropdown = c.dropdown;
|
||||
sticky = c.sticky;
|
||||
user_data = c.user_data;
|
||||
alignment = c.alignment;
|
||||
m_window = c.m_window;
|
||||
m_label = c.m_label;
|
||||
m_bitmap = c.m_bitmap;
|
||||
m_disabledBitmap = c.m_disabledBitmap;
|
||||
m_hoverBitmap = c.m_hoverBitmap;
|
||||
m_shortHelp = c.m_shortHelp;
|
||||
m_longHelp = c.m_longHelp;
|
||||
m_sizerItem = c.m_sizerItem;
|
||||
m_minSize = c.m_minSize;
|
||||
m_spacerPixels = c.m_spacerPixels;
|
||||
m_toolId = c.m_toolId;
|
||||
m_kind = c.m_kind;
|
||||
m_state = c.m_state;
|
||||
m_proportion = c.m_proportion;
|
||||
m_active = c.m_active;
|
||||
m_dropDown = c.m_dropDown;
|
||||
m_sticky = c.m_sticky;
|
||||
m_userData = c.m_userData;
|
||||
m_alignment = c.m_alignment;
|
||||
}
|
||||
|
||||
|
||||
void SetWindow(wxWindow* w) { window = w; }
|
||||
wxWindow* GetWindow() { return window; }
|
||||
void SetWindow(wxWindow* w) { m_window = w; }
|
||||
wxWindow* GetWindow() { return m_window; }
|
||||
|
||||
void SetId(int new_id) { toolid = new_id; }
|
||||
int GetId() const { return toolid; }
|
||||
void SetId(int newId) { m_toolId = newId; }
|
||||
int GetId() const { return m_toolId; }
|
||||
|
||||
void SetKind(int new_kind) { kind = new_kind; }
|
||||
int GetKind() const { return kind; }
|
||||
void SetKind(int newKind) { m_kind = newKind; }
|
||||
int GetKind() const { return m_kind; }
|
||||
|
||||
void SetState(int new_state) { state = new_state; }
|
||||
int GetState() const { return state; }
|
||||
void SetState(int newState) { m_state = newState; }
|
||||
int GetState() const { return m_state; }
|
||||
|
||||
void SetSizerItem(wxSizerItem* s) { sizer_item = s; }
|
||||
wxSizerItem* GetSizerItem() const { return sizer_item; }
|
||||
void SetSizerItem(wxSizerItem* s) { m_sizerItem = s; }
|
||||
wxSizerItem* GetSizerItem() const { return m_sizerItem; }
|
||||
|
||||
void SetLabel(const wxString& s) { label = s; }
|
||||
const wxString& GetLabel() const { return label; }
|
||||
void SetLabel(const wxString& s) { m_label = s; }
|
||||
const wxString& GetLabel() const { return m_label; }
|
||||
|
||||
void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; }
|
||||
const wxBitmap& GetBitmap() const { return bitmap; }
|
||||
void SetBitmap(const wxBitmap& bmp) { m_bitmap = bmp; }
|
||||
const wxBitmap& GetBitmap() const { return m_bitmap; }
|
||||
|
||||
void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; }
|
||||
const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; }
|
||||
void SetDisabledBitmap(const wxBitmap& bmp) { m_disabledBitmap = bmp; }
|
||||
const wxBitmap& GetDisabledBitmap() const { return m_disabledBitmap; }
|
||||
|
||||
void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; }
|
||||
const wxBitmap& GetHoverBitmap() const { return hover_bitmap; }
|
||||
void SetHoverBitmap(const wxBitmap& bmp) { m_hoverBitmap = bmp; }
|
||||
const wxBitmap& GetHoverBitmap() const { return m_hoverBitmap; }
|
||||
|
||||
void SetShortHelp(const wxString& s) { short_help = s; }
|
||||
const wxString& GetShortHelp() const { return short_help; }
|
||||
void SetShortHelp(const wxString& s) { m_shortHelp = s; }
|
||||
const wxString& GetShortHelp() const { return m_shortHelp; }
|
||||
|
||||
void SetLongHelp(const wxString& s) { long_help = s; }
|
||||
const wxString& GetLongHelp() const { return long_help; }
|
||||
void SetLongHelp(const wxString& s) { m_longHelp = s; }
|
||||
const wxString& GetLongHelp() const { return m_longHelp; }
|
||||
|
||||
void SetMinSize(const wxSize& s) { min_size = s; }
|
||||
const wxSize& GetMinSize() const { return min_size; }
|
||||
void SetMinSize(const wxSize& s) { m_minSize = s; }
|
||||
const wxSize& GetMinSize() const { return m_minSize; }
|
||||
|
||||
void SetSpacerPixels(int s) { spacer_pixels = s; }
|
||||
int GetSpacerPixels() const { return spacer_pixels; }
|
||||
void SetSpacerPixels(int s) { m_spacerPixels = s; }
|
||||
int GetSpacerPixels() const { return m_spacerPixels; }
|
||||
|
||||
void SetProportion(int p) { proportion = p; }
|
||||
int GetProportion() const { return proportion; }
|
||||
void SetProportion(int p) { m_proportion = p; }
|
||||
int GetProportion() const { return m_proportion; }
|
||||
|
||||
void SetActive(bool b) { active = b; }
|
||||
bool IsActive() const { return active; }
|
||||
void SetActive(bool b) { m_active = b; }
|
||||
bool IsActive() const { return m_active; }
|
||||
|
||||
void SetHasDropDown(bool b) { dropdown = b; }
|
||||
bool HasDropDown() const { return dropdown; }
|
||||
void SetHasDropDown(bool b) { m_dropDown = b; }
|
||||
bool HasDropDown() const { return m_dropDown; }
|
||||
|
||||
void SetSticky(bool b) { sticky = b; }
|
||||
bool IsSticky() const { return sticky; }
|
||||
void SetSticky(bool b) { m_sticky = b; }
|
||||
bool IsSticky() const { return m_sticky; }
|
||||
|
||||
void SetUserData(long l) { user_data = l; }
|
||||
long GetUserData() const { return user_data; }
|
||||
void SetUserData(long l) { m_userData = l; }
|
||||
long GetUserData() const { return m_userData; }
|
||||
|
||||
void SetAlignment(int l) { alignment = l; }
|
||||
int GetAlignment() const { return alignment; }
|
||||
void SetAlignment(int l) { m_alignment = l; }
|
||||
int GetAlignment() const { return m_alignment; }
|
||||
|
||||
private:
|
||||
|
||||
wxWindow* window; // item's associated window
|
||||
wxString label; // label displayed on the item
|
||||
wxBitmap bitmap; // item's bitmap
|
||||
wxBitmap disabled_bitmap; // item's disabled bitmap
|
||||
wxBitmap hover_bitmap; // item's hover bitmap
|
||||
wxString short_help; // short help (for tooltip)
|
||||
wxString long_help; // long help (for status bar)
|
||||
wxSizerItem* sizer_item; // sizer item
|
||||
wxSize min_size; // item's minimum size
|
||||
int spacer_pixels; // size of a spacer
|
||||
int toolid; // item's id
|
||||
int kind; // item's kind
|
||||
int state; // state
|
||||
int proportion; // proportion
|
||||
bool active; // true if the item is currently active
|
||||
bool dropdown; // true if the item has a dropdown button
|
||||
bool sticky; // overrides button states if true (always active)
|
||||
long user_data; // user-specified data
|
||||
int alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
|
||||
wxWindow* m_window; // item's associated window
|
||||
wxString m_label; // label displayed on the item
|
||||
wxBitmap m_bitmap; // item's bitmap
|
||||
wxBitmap m_disabledBitmap; // item's disabled bitmap
|
||||
wxBitmap m_hoverBitmap; // item's hover bitmap
|
||||
wxString m_shortHelp; // short help (for tooltip)
|
||||
wxString m_longHelp; // long help (for status bar)
|
||||
wxSizerItem* m_sizerItem; // sizer item
|
||||
wxSize m_minSize; // item's minimum size
|
||||
int m_spacerPixels; // size of a spacer
|
||||
int m_toolId; // item's id
|
||||
int m_kind; // item's kind
|
||||
int m_state; // state
|
||||
int m_proportion; // proportion
|
||||
bool m_active; // true if the item is currently active
|
||||
bool m_dropDown; // true if the item has a dropdown button
|
||||
bool m_sticky; // overrides button states if true (always active)
|
||||
long m_userData; // user-specified data
|
||||
int m_alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
|
||||
};
|
||||
|
||||
#ifndef SWIG
|
||||
@ -325,8 +325,8 @@ public:
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item) = 0;
|
||||
|
||||
virtual int GetElementSize(int element_id) = 0;
|
||||
virtual void SetElementSize(int element_id, int size) = 0;
|
||||
virtual int GetElementSize(int elementId) = 0;
|
||||
virtual void SetElementSize(int elementId, int size) = 0;
|
||||
|
||||
virtual int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
@ -407,30 +407,30 @@ public:
|
||||
const wxAuiToolBarItem& item);
|
||||
|
||||
virtual int GetElementSize(int element);
|
||||
virtual void SetElementSize(int element_id, int size);
|
||||
virtual void SetElementSize(int elementId, int size);
|
||||
|
||||
virtual int ShowDropDown(wxWindow* wnd,
|
||||
const wxAuiToolBarItemArray& items);
|
||||
|
||||
protected:
|
||||
|
||||
wxBitmap m_button_dropdown_bmp;
|
||||
wxBitmap m_disabled_button_dropdown_bmp;
|
||||
wxBitmap m_overflow_bmp;
|
||||
wxBitmap m_disabled_overflow_bmp;
|
||||
wxColour m_base_colour;
|
||||
wxColour m_highlight_colour;
|
||||
wxBitmap m_buttonDropDownBmp;
|
||||
wxBitmap m_disabledButtonDropDownBmp;
|
||||
wxBitmap m_overflowBmp;
|
||||
wxBitmap m_disabledOverflowBmp;
|
||||
wxColour m_baseColour;
|
||||
wxColour m_highlightColour;
|
||||
wxFont m_font;
|
||||
unsigned int m_flags;
|
||||
int m_text_orientation;
|
||||
int m_textOrientation;
|
||||
|
||||
wxPen m_gripper_pen1;
|
||||
wxPen m_gripper_pen2;
|
||||
wxPen m_gripper_pen3;
|
||||
wxPen m_gripperPen1;
|
||||
wxPen m_gripperPen2;
|
||||
wxPen m_gripperPen3;
|
||||
|
||||
int m_separator_size;
|
||||
int m_gripper_size;
|
||||
int m_overflow_size;
|
||||
int m_separatorSize;
|
||||
int m_gripperSize;
|
||||
int m_overflowSize;
|
||||
};
|
||||
|
||||
|
||||
@ -456,40 +456,40 @@ public:
|
||||
bool SetFont(const wxFont& font);
|
||||
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxString& short_help_string = wxEmptyString,
|
||||
const wxString& shortHelpString = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL);
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& disabled_bitmap,
|
||||
const wxBitmap& disabledBitmap,
|
||||
wxItemKind kind,
|
||||
const wxString& short_help_string,
|
||||
const wxString& long_help_string,
|
||||
wxObject* client_data);
|
||||
const wxString& shortHelpString,
|
||||
const wxString& longHelpString,
|
||||
wxObject* clientData);
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& disabled_bitmap,
|
||||
const wxBitmap& disabledBitmap,
|
||||
bool toggle = false,
|
||||
wxObject* client_data = NULL,
|
||||
const wxString& short_help_string = wxEmptyString,
|
||||
const wxString& long_help_string = wxEmptyString)
|
||||
wxObject* clientData = NULL,
|
||||
const wxString& shortHelpString = wxEmptyString,
|
||||
const wxString& longHelpString = wxEmptyString)
|
||||
{
|
||||
return AddTool(tool_id,
|
||||
return AddTool(toolId,
|
||||
wxEmptyString,
|
||||
bitmap,
|
||||
disabled_bitmap,
|
||||
disabledBitmap,
|
||||
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
|
||||
short_help_string,
|
||||
long_help_string,
|
||||
client_data);
|
||||
shortHelpString,
|
||||
longHelpString,
|
||||
clientData);
|
||||
}
|
||||
|
||||
wxAuiToolBarItem* AddLabel(int tool_id,
|
||||
wxAuiToolBarItem* AddLabel(int toolId,
|
||||
const wxString& label = wxEmptyString,
|
||||
const int width = -1);
|
||||
wxAuiToolBarItem* AddControl(wxControl* control,
|
||||
@ -500,22 +500,22 @@ public:
|
||||
|
||||
bool Realize();
|
||||
|
||||
wxControl* FindControl(int window_id);
|
||||
wxControl* FindControl(int windowId);
|
||||
wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
|
||||
wxAuiToolBarItem* FindToolByIndex(int idx) const;
|
||||
wxAuiToolBarItem* FindTool(int tool_id) const;
|
||||
wxAuiToolBarItem* FindTool(int toolId) const;
|
||||
|
||||
void ClearTools() { Clear() ; }
|
||||
void Clear();
|
||||
bool DeleteTool(int tool_id);
|
||||
bool DeleteByIndex(int tool_id);
|
||||
bool DeleteTool(int toolId);
|
||||
bool DeleteByIndex(int toolId);
|
||||
|
||||
size_t GetToolCount() const;
|
||||
int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); }
|
||||
int GetToolIndex(int tool_id) const;
|
||||
bool GetToolFits(int tool_id) const;
|
||||
wxRect GetToolRect(int tool_id) const;
|
||||
bool GetToolFitsByIndex(int tool_id) const;
|
||||
int GetToolPos(int toolId) const { return GetToolIndex(toolId); }
|
||||
int GetToolIndex(int toolId) const;
|
||||
bool GetToolFits(int toolId) const;
|
||||
wxRect GetToolRect(int toolId) const;
|
||||
bool GetToolFitsByIndex(int toolId) const;
|
||||
bool GetToolBarFits() const;
|
||||
|
||||
void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
|
||||
@ -531,14 +531,14 @@ public:
|
||||
bool GetGripperVisible() const;
|
||||
void SetGripperVisible(bool visible);
|
||||
|
||||
void ToggleTool(int tool_id, bool state);
|
||||
bool GetToolToggled(int tool_id) const;
|
||||
void ToggleTool(int toolId, bool state);
|
||||
bool GetToolToggled(int toolId) const;
|
||||
|
||||
void EnableTool(int tool_id, bool state);
|
||||
bool GetToolEnabled(int tool_id) const;
|
||||
void EnableTool(int toolId, bool state);
|
||||
bool GetToolEnabled(int toolId) const;
|
||||
|
||||
void SetToolDropDown(int tool_id, bool dropdown);
|
||||
bool GetToolDropDown(int tool_id) const;
|
||||
void SetToolDropDown(int toolId, bool dropdown);
|
||||
bool GetToolDropDown(int toolId) const;
|
||||
|
||||
void SetToolBorderPadding(int padding);
|
||||
int GetToolBorderPadding() const;
|
||||
@ -549,32 +549,32 @@ public:
|
||||
void SetToolPacking(int packing);
|
||||
int GetToolPacking() const;
|
||||
|
||||
void SetToolProportion(int tool_id, int proportion);
|
||||
int GetToolProportion(int tool_id) const;
|
||||
void SetToolProportion(int toolId, int proportion);
|
||||
int GetToolProportion(int toolId) const;
|
||||
|
||||
void SetToolSeparation(int separation);
|
||||
int GetToolSeparation() const;
|
||||
|
||||
void SetToolSticky(int tool_id, bool sticky);
|
||||
bool GetToolSticky(int tool_id) const;
|
||||
void SetToolSticky(int toolId, bool sticky);
|
||||
bool GetToolSticky(int toolId) const;
|
||||
|
||||
wxString GetToolLabel(int tool_id) const;
|
||||
void SetToolLabel(int tool_id, const wxString& label);
|
||||
wxString GetToolLabel(int toolId) const;
|
||||
void SetToolLabel(int toolId, const wxString& label);
|
||||
|
||||
wxBitmap GetToolBitmap(int tool_id) const;
|
||||
void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
|
||||
wxBitmap GetToolBitmap(int toolId) const;
|
||||
void SetToolBitmap(int toolId, const wxBitmap& bitmap);
|
||||
|
||||
wxString GetToolShortHelp(int tool_id) const;
|
||||
void SetToolShortHelp(int tool_id, const wxString& help_string);
|
||||
wxString GetToolShortHelp(int toolId) const;
|
||||
void SetToolShortHelp(int toolId, const wxString& helpString);
|
||||
|
||||
wxString GetToolLongHelp(int tool_id) const;
|
||||
void SetToolLongHelp(int tool_id, const wxString& help_string);
|
||||
wxString GetToolLongHelp(int toolId) const;
|
||||
void SetToolLongHelp(int toolId, const wxString& helpString);
|
||||
|
||||
void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
|
||||
const wxAuiToolBarItemArray& append);
|
||||
|
||||
// get size of hint rectangle for a particular dock location
|
||||
wxSize GetHintSize(int dock_direction) const;
|
||||
wxSize GetHintSize(int dockDirection) const;
|
||||
bool IsPaneValid(const wxAuiPaneInfo& pane) const;
|
||||
|
||||
protected:
|
||||
@ -624,30 +624,30 @@ protected:
|
||||
wxAuiToolBarItemArray m_items; // array of toolbar items
|
||||
wxAuiToolBarArt* m_art; // art provider
|
||||
wxBoxSizer* m_sizer; // main sizer for toolbar
|
||||
wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed)
|
||||
wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown
|
||||
wxAuiToolBarItem* m_actionItem; // item that's being acted upon (pressed)
|
||||
wxAuiToolBarItem* m_tipItem; // item that has its tooltip shown
|
||||
wxBitmap m_bitmap; // double-buffer bitmap
|
||||
wxSizerItem* m_gripper_sizer_item;
|
||||
wxSizerItem* m_overflow_sizer_item;
|
||||
wxSize m_absolute_min_size;
|
||||
wxPoint m_action_pos; // position of left-mouse down
|
||||
wxAuiToolBarItemArray m_custom_overflow_prepend;
|
||||
wxAuiToolBarItemArray m_custom_overflow_append;
|
||||
wxSizerItem* m_gripperSizerItem;
|
||||
wxSizerItem* m_overflowSizerItem;
|
||||
wxSize m_absoluteMinSize;
|
||||
wxPoint m_actionPos; // position of left-mouse down
|
||||
wxAuiToolBarItemArray m_customOverflowPrepend;
|
||||
wxAuiToolBarItemArray m_customOverflowAppend;
|
||||
|
||||
int m_button_width;
|
||||
int m_button_height;
|
||||
int m_sizer_element_count;
|
||||
int m_left_padding;
|
||||
int m_right_padding;
|
||||
int m_top_padding;
|
||||
int m_bottom_padding;
|
||||
int m_tool_packing;
|
||||
int m_tool_border_padding;
|
||||
int m_tool_text_orientation;
|
||||
int m_overflow_state;
|
||||
int m_buttonWidth;
|
||||
int m_buttonHeight;
|
||||
int m_sizerElementCount;
|
||||
int m_leftPadding;
|
||||
int m_rightPadding;
|
||||
int m_topPadding;
|
||||
int m_bottomPadding;
|
||||
int m_toolPacking;
|
||||
int m_toolBorderPadding;
|
||||
int m_toolTextOrientation;
|
||||
int m_overflowState;
|
||||
bool m_dragging;
|
||||
bool m_gripper_visible;
|
||||
bool m_overflow_visible;
|
||||
bool m_gripperVisible;
|
||||
bool m_overflowVisible;
|
||||
long m_style;
|
||||
|
||||
bool RealizeHelper(wxClientDC& dc, bool horizontal);
|
||||
|
@ -63,25 +63,25 @@ enum wxAuiNotebookOption
|
||||
class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent
|
||||
{
|
||||
public:
|
||||
wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL,
|
||||
int win_id = 0)
|
||||
: wxBookCtrlEvent(command_type, win_id)
|
||||
wxAuiNotebookEvent(wxEventType commandType = wxEVT_NULL,
|
||||
int winId = 0)
|
||||
: wxBookCtrlEvent(commandType, winId)
|
||||
{
|
||||
drag_source = NULL;
|
||||
m_dragSource = NULL;
|
||||
}
|
||||
#ifndef SWIG
|
||||
wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
|
||||
{
|
||||
drag_source = c.drag_source;
|
||||
m_dragSource = c.m_dragSource;
|
||||
}
|
||||
#endif
|
||||
wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
|
||||
|
||||
void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
|
||||
wxAuiNotebook* GetDragSource() const { return drag_source; }
|
||||
void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
|
||||
wxAuiNotebook* GetDragSource() const { return m_dragSource; }
|
||||
|
||||
public:
|
||||
wxAuiNotebook* drag_source;
|
||||
private:
|
||||
wxAuiNotebook* m_dragSource;
|
||||
|
||||
#ifndef SWIG
|
||||
private:
|
||||
@ -105,10 +105,10 @@ class WXDLLIMPEXP_AUI wxAuiTabContainerButton
|
||||
public:
|
||||
|
||||
int id; // button's id
|
||||
int cur_state; // current state (normal, hover, pressed, etc.)
|
||||
int curState; // current state (normal, hover, pressed, etc.)
|
||||
int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
|
||||
wxBitmap bitmap; // button's hover bitmap
|
||||
wxBitmap dis_bitmap; // button's disabled bitmap
|
||||
wxBitmap disBitmap; // button's disabled bitmap
|
||||
wxRect rect; // button's hit rectangle
|
||||
};
|
||||
|
||||
@ -131,8 +131,8 @@ public:
|
||||
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 SetSizingInfo(const wxSize& tabCtrlSize,
|
||||
size_t tabCount) = 0;
|
||||
|
||||
virtual void SetNormalFont(const wxFont& font) = 0;
|
||||
virtual void SetSelectedFont(const wxFont& font) = 0;
|
||||
@ -148,20 +148,20 @@ public:
|
||||
virtual void DrawTab(wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPage& pane,
|
||||
const wxRect& in_rect,
|
||||
int close_button_state,
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent) = 0;
|
||||
const wxRect& inRect,
|
||||
int closeButtonState,
|
||||
wxRect* outTabRect,
|
||||
wxRect* outButtonRect,
|
||||
int* xExtent) = 0;
|
||||
|
||||
virtual void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& in_rect,
|
||||
int bitmap_id,
|
||||
int button_state,
|
||||
const wxRect& inRect,
|
||||
int bitmapId,
|
||||
int buttonState,
|
||||
int orientation,
|
||||
wxRect* out_rect) = 0;
|
||||
wxRect* outRect) = 0;
|
||||
|
||||
virtual wxSize GetTabSize(
|
||||
wxDC& dc,
|
||||
@ -169,20 +169,20 @@ public:
|
||||
const wxString& caption,
|
||||
const wxBitmap& bitmap,
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent) = 0;
|
||||
int closeButtonState,
|
||||
int* xExtent) = 0;
|
||||
|
||||
virtual int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
int active_idx) = 0;
|
||||
int activeIdx) = 0;
|
||||
|
||||
virtual int GetIndentSize() = 0;
|
||||
|
||||
virtual int GetBestTabCtrlSize(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size) = 0;
|
||||
const wxSize& requiredBmpSize) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -196,8 +196,8 @@ public:
|
||||
|
||||
wxAuiTabArt* Clone();
|
||||
void SetFlags(unsigned int flags);
|
||||
void SetSizingInfo(const wxSize& tab_ctrl_size,
|
||||
size_t tab_count);
|
||||
void SetSizingInfo(const wxSize& tabCtrlSize,
|
||||
size_t tabCount);
|
||||
|
||||
void SetNormalFont(const wxFont& font);
|
||||
void SetSelectedFont(const wxFont& font);
|
||||
@ -213,20 +213,20 @@ public:
|
||||
void DrawTab(wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPage& pane,
|
||||
const wxRect& in_rect,
|
||||
int close_button_state,
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent);
|
||||
const wxRect& inRect,
|
||||
int closeButtonState,
|
||||
wxRect* outTabRect,
|
||||
wxRect* outButtonRect,
|
||||
int* xExtent);
|
||||
|
||||
void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& in_rect,
|
||||
int bitmap_id,
|
||||
int button_state,
|
||||
const wxRect& inRect,
|
||||
int bitmapId,
|
||||
int buttonState,
|
||||
int orientation,
|
||||
wxRect* out_rect);
|
||||
wxRect* outRect);
|
||||
|
||||
int GetIndentSize();
|
||||
|
||||
@ -236,39 +236,39 @@ public:
|
||||
const wxString& caption,
|
||||
const wxBitmap& bitmap,
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent);
|
||||
int closeButtonState,
|
||||
int* xExtent);
|
||||
|
||||
int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
int active_idx);
|
||||
int activeIdx);
|
||||
|
||||
int GetBestTabCtrlSize(wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size);
|
||||
const wxSize& requiredBmpSize);
|
||||
|
||||
protected:
|
||||
|
||||
wxFont m_normal_font;
|
||||
wxFont m_selected_font;
|
||||
wxFont m_measuring_font;
|
||||
wxColour m_base_colour;
|
||||
wxPen m_base_colour_pen;
|
||||
wxPen m_border_pen;
|
||||
wxBrush m_base_colour_brush;
|
||||
wxColour m_active_colour;
|
||||
wxBitmap m_active_close_bmp;
|
||||
wxBitmap m_disabled_close_bmp;
|
||||
wxBitmap m_active_left_bmp;
|
||||
wxBitmap m_disabled_left_bmp;
|
||||
wxBitmap m_active_right_bmp;
|
||||
wxBitmap m_disabled_right_bmp;
|
||||
wxBitmap m_active_windowlist_bmp;
|
||||
wxBitmap m_disabled_windowlist_bmp;
|
||||
wxFont m_normalFont;
|
||||
wxFont m_selectedFont;
|
||||
wxFont m_measuringFont;
|
||||
wxColour m_baseColour;
|
||||
wxPen m_baseColourPen;
|
||||
wxPen m_borderPen;
|
||||
wxBrush m_baseColourBrush;
|
||||
wxColour m_activeColour;
|
||||
wxBitmap m_activeCloseBmp;
|
||||
wxBitmap m_disabledCloseBmp;
|
||||
wxBitmap m_activeLeftBmp;
|
||||
wxBitmap m_disabledLeftBmp;
|
||||
wxBitmap m_activeRightBmp;
|
||||
wxBitmap m_disabledRightBmp;
|
||||
wxBitmap m_activeWindowListBmp;
|
||||
wxBitmap m_disabledWindowListBmp;
|
||||
|
||||
int m_fixed_tab_width;
|
||||
int m_tab_ctrl_height;
|
||||
int m_fixedTabWidth;
|
||||
int m_tabCtrlHeight;
|
||||
unsigned int m_flags;
|
||||
};
|
||||
|
||||
@ -284,8 +284,8 @@ public:
|
||||
wxAuiTabArt* Clone();
|
||||
void SetFlags(unsigned int flags);
|
||||
|
||||
void SetSizingInfo(const wxSize& tab_ctrl_size,
|
||||
size_t tab_count);
|
||||
void SetSizingInfo(const wxSize& tabCtrlSize,
|
||||
size_t tabCount);
|
||||
|
||||
void SetNormalFont(const wxFont& font);
|
||||
void SetSelectedFont(const wxFont& font);
|
||||
@ -301,20 +301,20 @@ public:
|
||||
void DrawTab(wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPage& pane,
|
||||
const wxRect& in_rect,
|
||||
int close_button_state,
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent);
|
||||
const wxRect& inRect,
|
||||
int closeButtonState,
|
||||
wxRect* outTabRect,
|
||||
wxRect* outButtonRect,
|
||||
int* xExtent);
|
||||
|
||||
void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& in_rect,
|
||||
int bitmap_id,
|
||||
int button_state,
|
||||
const wxRect& inRect,
|
||||
int bitmapId,
|
||||
int buttonState,
|
||||
int orientation,
|
||||
wxRect* out_rect);
|
||||
wxRect* outRect);
|
||||
|
||||
int GetIndentSize();
|
||||
|
||||
@ -324,38 +324,38 @@ public:
|
||||
const wxString& caption,
|
||||
const wxBitmap& bitmap,
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent);
|
||||
int closeButtonState,
|
||||
int* xExtent);
|
||||
|
||||
int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
int active_idx);
|
||||
int activeIdx);
|
||||
|
||||
int GetBestTabCtrlSize(wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size);
|
||||
const wxSize& requiredBmpSize);
|
||||
|
||||
protected:
|
||||
|
||||
wxFont m_normal_font;
|
||||
wxFont m_selected_font;
|
||||
wxFont m_measuring_font;
|
||||
wxPen m_normal_bkpen;
|
||||
wxPen m_selected_bkpen;
|
||||
wxBrush m_normal_bkbrush;
|
||||
wxBrush m_selected_bkbrush;
|
||||
wxBrush m_bkbrush;
|
||||
wxBitmap m_active_close_bmp;
|
||||
wxBitmap m_disabled_close_bmp;
|
||||
wxBitmap m_active_left_bmp;
|
||||
wxBitmap m_disabled_left_bmp;
|
||||
wxBitmap m_active_right_bmp;
|
||||
wxBitmap m_disabled_right_bmp;
|
||||
wxBitmap m_active_windowlist_bmp;
|
||||
wxBitmap m_disabled_windowlist_bmp;
|
||||
wxFont m_normalFont;
|
||||
wxFont m_selectedFont;
|
||||
wxFont m_measuringFont;
|
||||
wxPen m_normalBkPen;
|
||||
wxPen m_selectedBkPen;
|
||||
wxBrush m_normalBkBrush;
|
||||
wxBrush m_selectedBkBrush;
|
||||
wxBrush m_bkBrush;
|
||||
wxBitmap m_activeCloseBmp;
|
||||
wxBitmap m_disabledCloseBmp;
|
||||
wxBitmap m_activeLeftBmp;
|
||||
wxBitmap m_disabledLeftBmp;
|
||||
wxBitmap m_activeRightBmp;
|
||||
wxBitmap m_disabledRightBmp;
|
||||
wxBitmap m_activeWindowListBmp;
|
||||
wxBitmap m_disabledWindowListBmp;
|
||||
|
||||
int m_fixed_tab_width;
|
||||
int m_fixedTabWidth;
|
||||
unsigned int m_flags;
|
||||
};
|
||||
|
||||
@ -382,7 +382,7 @@ public:
|
||||
|
||||
bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
|
||||
bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
|
||||
bool MovePage(wxWindow* page, size_t new_idx);
|
||||
bool MovePage(wxWindow* page, size_t newIdx);
|
||||
bool RemovePage(wxWindow* page);
|
||||
bool SetActivePage(wxWindow* page);
|
||||
bool SetActivePage(size_t page);
|
||||
@ -396,9 +396,9 @@ public:
|
||||
wxAuiNotebookPage& GetPage(size_t idx);
|
||||
const wxAuiNotebookPage& GetPage(size_t idx) const;
|
||||
wxAuiNotebookPageArray& GetPages();
|
||||
void SetNormalFont(const wxFont& normal_font);
|
||||
void SetSelectedFont(const wxFont& selected_font);
|
||||
void SetMeasuringFont(const wxFont& measuring_font);
|
||||
void SetNormalFont(const wxFont& normalFont);
|
||||
void SetSelectedFont(const wxFont& selectedFont);
|
||||
void SetMeasuringFont(const wxFont& measuringFont);
|
||||
void SetColour(const wxColour& colour);
|
||||
void SetActiveColour(const wxColour& colour);
|
||||
void DoShowHide();
|
||||
@ -407,8 +407,8 @@ public:
|
||||
void RemoveButton(int id);
|
||||
void AddButton(int id,
|
||||
int location,
|
||||
const wxBitmap& normal_bitmap = wxNullBitmap,
|
||||
const wxBitmap& disabled_bitmap = wxNullBitmap);
|
||||
const wxBitmap& normalBitmap = wxNullBitmap,
|
||||
const wxBitmap& disabledBitmap = wxNullBitmap);
|
||||
|
||||
size_t GetTabOffset() const;
|
||||
void SetTabOffset(size_t offset);
|
||||
@ -428,9 +428,9 @@ protected:
|
||||
wxAuiTabArt* m_art;
|
||||
wxAuiNotebookPageArray m_pages;
|
||||
wxAuiTabContainerButtonArray m_buttons;
|
||||
wxAuiTabContainerButtonArray m_tab_close_buttons;
|
||||
wxAuiTabContainerButtonArray m_tabCloseButtons;
|
||||
wxRect m_rect;
|
||||
size_t m_tab_offset;
|
||||
size_t m_tabOffset;
|
||||
unsigned int m_flags;
|
||||
};
|
||||
|
||||
@ -449,7 +449,7 @@ public:
|
||||
|
||||
~wxAuiTabCtrl();
|
||||
|
||||
bool IsDragging() const { return m_is_dragging; }
|
||||
bool IsDragging() const { return m_isDragging; }
|
||||
|
||||
protected:
|
||||
// choose the default border for this window
|
||||
@ -475,11 +475,11 @@ protected:
|
||||
|
||||
protected:
|
||||
|
||||
wxPoint m_click_pt;
|
||||
wxWindow* m_click_tab;
|
||||
bool m_is_dragging;
|
||||
wxAuiTabContainerButton* m_hover_button;
|
||||
wxAuiTabContainerButton* m_pressed_button;
|
||||
wxPoint m_clickPt;
|
||||
wxWindow* m_clickTab;
|
||||
bool m_isDragging;
|
||||
wxAuiTabContainerButton* m_hoverButton;
|
||||
wxAuiTabContainerButton* m_pressedButton;
|
||||
|
||||
#ifndef SWIG
|
||||
DECLARE_CLASS(wxAuiTabCtrl)
|
||||
@ -527,7 +527,7 @@ public:
|
||||
bool select = false,
|
||||
const wxBitmap& bitmap = wxNullBitmap);
|
||||
|
||||
bool InsertPage(size_t page_idx,
|
||||
bool InsertPage(size_t pageIdx,
|
||||
wxWindow* page,
|
||||
const wxString& caption,
|
||||
bool select = false,
|
||||
@ -537,16 +537,16 @@ public:
|
||||
bool RemovePage(size_t page);
|
||||
|
||||
size_t GetPageCount() const;
|
||||
wxWindow* GetPage(size_t page_idx) const;
|
||||
int GetPageIndex(wxWindow* page_wnd) const;
|
||||
wxWindow* GetPage(size_t pageIdx) const;
|
||||
int GetPageIndex(wxWindow* pageWnd) const;
|
||||
|
||||
bool SetPageText(size_t page, const wxString& text);
|
||||
wxString GetPageText(size_t page_idx) const;
|
||||
wxString GetPageText(size_t pageIdx) const;
|
||||
|
||||
bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
|
||||
wxBitmap GetPageBitmap(size_t page_idx) const;
|
||||
wxBitmap GetPageBitmap(size_t pageIdx) const;
|
||||
|
||||
int SetSelection(size_t new_page);
|
||||
int SetSelection(size_t newPage);
|
||||
int GetSelection() const;
|
||||
|
||||
virtual void Split(size_t page, int direction);
|
||||
@ -631,7 +631,7 @@ protected:
|
||||
void DoSizing();
|
||||
void InitNotebook(long style);
|
||||
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
|
||||
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tab_ctrl);
|
||||
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
|
||||
wxAuiTabCtrl* GetActiveTabCtrl();
|
||||
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
|
||||
void RemoveEmptyTabFrames();
|
||||
@ -667,17 +667,17 @@ protected:
|
||||
|
||||
wxAuiManager m_mgr;
|
||||
wxAuiTabContainer m_tabs;
|
||||
int m_curpage;
|
||||
int m_tab_id_counter;
|
||||
wxWindow* m_dummy_wnd;
|
||||
int m_curPage;
|
||||
int m_tabIdCounter;
|
||||
wxWindow* m_dummyWnd;
|
||||
|
||||
wxSize m_requested_bmp_size;
|
||||
int m_requested_tabctrl_height;
|
||||
wxFont m_selected_font;
|
||||
wxFont m_normal_font;
|
||||
int m_tab_ctrl_height;
|
||||
wxSize m_requestedBmpSize;
|
||||
int m_requestedTabCtrlHeight;
|
||||
wxFont m_selectedFont;
|
||||
wxFont m_normalFont;
|
||||
int m_tabCtrlHeight;
|
||||
|
||||
int m_last_drag_x;
|
||||
int m_lastDragX;
|
||||
unsigned int m_flags;
|
||||
|
||||
#ifndef SWIG
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
virtual ~wxAuiDockArt() { }
|
||||
|
||||
virtual int GetMetric(int id) = 0;
|
||||
virtual void SetMetric(int id, int new_val) = 0;
|
||||
virtual void SetMetric(int id, int newVal) = 0;
|
||||
virtual void SetFont(int id, const wxFont& font) = 0;
|
||||
virtual wxFont GetFont(int id) = 0;
|
||||
virtual wxColour GetColour(int id) = 0;
|
||||
@ -74,7 +74,7 @@ public:
|
||||
virtual void DrawPaneButton(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int button,
|
||||
int button_state,
|
||||
int buttonState,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
};
|
||||
@ -90,8 +90,8 @@ public:
|
||||
|
||||
wxAuiDefaultDockArt();
|
||||
|
||||
int GetMetric(int metric_id);
|
||||
void SetMetric(int metric_id, int new_val);
|
||||
int GetMetric(int metricId);
|
||||
void SetMetric(int metricId, int newVal);
|
||||
wxColour GetColour(int id);
|
||||
void SetColour(int id, const wxColor& colour);
|
||||
void SetFont(int id, const wxFont& font);
|
||||
@ -126,7 +126,7 @@ public:
|
||||
void DrawPaneButton(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int button,
|
||||
int button_state,
|
||||
int buttonState,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
@ -142,35 +142,35 @@ protected:
|
||||
|
||||
protected:
|
||||
|
||||
wxPen m_border_pen;
|
||||
wxBrush m_sash_brush;
|
||||
wxBrush m_background_brush;
|
||||
wxBrush m_gripper_brush;
|
||||
wxFont m_caption_font;
|
||||
wxBitmap m_inactive_close_bitmap;
|
||||
wxBitmap m_inactive_pin_bitmap;
|
||||
wxBitmap m_inactive_maximize_bitmap;
|
||||
wxBitmap m_inactive_restore_bitmap;
|
||||
wxBitmap m_active_close_bitmap;
|
||||
wxBitmap m_active_pin_bitmap;
|
||||
wxBitmap m_active_maximize_bitmap;
|
||||
wxBitmap m_active_restore_bitmap;
|
||||
wxPen m_gripper_pen1;
|
||||
wxPen m_gripper_pen2;
|
||||
wxPen m_gripper_pen3;
|
||||
wxColour m_base_colour;
|
||||
wxColour m_active_caption_colour;
|
||||
wxColour m_active_caption_gradient_colour;
|
||||
wxColour m_active_caption_text_colour;
|
||||
wxColour m_inactive_caption_colour;
|
||||
wxColour m_inactive_caption_gradient_colour;
|
||||
wxColour m_inactive_caption_text_colour;
|
||||
int m_border_size;
|
||||
int m_caption_size;
|
||||
int m_sash_size;
|
||||
int m_button_size;
|
||||
int m_gripper_size;
|
||||
int m_gradient_type;
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
|
||||
{
|
||||
public:
|
||||
wxAuiFloatingFrame(wxWindow* parent,
|
||||
wxAuiManager* owner_mgr,
|
||||
wxAuiManager* ownerMgr,
|
||||
const wxAuiPaneInfo& pane,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
|
||||
@ -46,7 +46,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void OnMoveStart();
|
||||
virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
|
||||
virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
|
||||
virtual void OnMoveFinished();
|
||||
|
||||
private:
|
||||
@ -58,16 +58,16 @@ private:
|
||||
static bool isMouseDown();
|
||||
|
||||
private:
|
||||
wxWindow* m_pane_window; // pane window being managed
|
||||
bool m_solid_drag; // true if system uses solid window drag
|
||||
wxWindow* m_paneWindow; // pane window being managed
|
||||
bool m_solidDrag; // true if system uses solid window drag
|
||||
bool m_moving;
|
||||
wxRect m_last_rect;
|
||||
wxRect m_last2_rect;
|
||||
wxRect m_last3_rect;
|
||||
wxSize m_last_size;
|
||||
wxRect m_lastRect;
|
||||
wxRect m_last2Rect;
|
||||
wxRect m_last3Rect;
|
||||
wxSize m_lastSize;
|
||||
wxDirection m_lastDirection;
|
||||
|
||||
wxWeakRef<wxAuiManager> m_owner_mgr;
|
||||
wxWeakRef<wxAuiManager> m_ownerMgr;
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
#ifndef SWIG
|
||||
|
@ -458,7 +458,7 @@ class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
|
||||
|
||||
public:
|
||||
|
||||
wxAuiManager(wxWindow* managed_wnd = NULL,
|
||||
wxAuiManager(wxWindow* managedWnd = NULL,
|
||||
unsigned int flags = wxAUI_MGR_DEFAULT);
|
||||
virtual ~wxAuiManager();
|
||||
void UnInit();
|
||||
@ -466,12 +466,12 @@ public:
|
||||
void SetFlags(unsigned int flags);
|
||||
unsigned int GetFlags() const;
|
||||
|
||||
void SetManagedWindow(wxWindow* managed_wnd);
|
||||
void SetManagedWindow(wxWindow* managedWnd);
|
||||
wxWindow* GetManagedWindow() const;
|
||||
|
||||
static wxAuiManager* GetManager(wxWindow* window);
|
||||
|
||||
void SetArtProvider(wxAuiDockArt* art_provider);
|
||||
void SetArtProvider(wxAuiDockArt* artProvider);
|
||||
wxAuiDockArt* GetArtProvider() const;
|
||||
|
||||
wxAuiPaneInfo& GetPane(wxWindow* window);
|
||||
@ -479,35 +479,35 @@ public:
|
||||
wxAuiPaneInfoArray& GetAllPanes();
|
||||
|
||||
bool AddPane(wxWindow* window,
|
||||
const wxAuiPaneInfo& pane_info);
|
||||
const wxAuiPaneInfo& paneInfo);
|
||||
|
||||
bool AddPane(wxWindow* window,
|
||||
const wxAuiPaneInfo& pane_info,
|
||||
const wxPoint& drop_pos);
|
||||
const wxAuiPaneInfo& paneInfo,
|
||||
const wxPoint& dropPos);
|
||||
|
||||
bool AddPane(wxWindow* window,
|
||||
int direction = wxLEFT,
|
||||
const wxString& caption = wxEmptyString);
|
||||
|
||||
bool InsertPane(wxWindow* window,
|
||||
const wxAuiPaneInfo& insert_location,
|
||||
int insert_level = wxAUI_INSERT_PANE);
|
||||
const wxAuiPaneInfo& insertLocation,
|
||||
int insertLevel = wxAUI_INSERT_PANE);
|
||||
|
||||
bool DetachPane(wxWindow* window);
|
||||
|
||||
void Update();
|
||||
|
||||
wxString SavePaneInfo(wxAuiPaneInfo& pane);
|
||||
void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
|
||||
void LoadPaneInfo(wxString panePart, wxAuiPaneInfo &pane);
|
||||
wxString SavePerspective();
|
||||
bool LoadPerspective(const wxString& perspective, bool update = true);
|
||||
|
||||
void SetDockSizeConstraint(double width_pct, double height_pct);
|
||||
void GetDockSizeConstraint(double* width_pct, double* height_pct) const;
|
||||
void SetDockSizeConstraint(double widthPct, double heightPct);
|
||||
void GetDockSizeConstraint(double* widthPct, double* heightPct) const;
|
||||
|
||||
void ClosePane(wxAuiPaneInfo& pane_info);
|
||||
void MaximizePane(wxAuiPaneInfo& pane_info);
|
||||
void RestorePane(wxAuiPaneInfo& pane_info);
|
||||
void ClosePane(wxAuiPaneInfo& paneInfo);
|
||||
void MaximizePane(wxAuiPaneInfo& paneInfo);
|
||||
void RestorePane(wxAuiPaneInfo& paneInfo);
|
||||
void RestoreMaximizedPane();
|
||||
|
||||
public:
|
||||
@ -516,16 +516,16 @@ public:
|
||||
virtual bool CanDockPanel(const wxAuiPaneInfo & p);
|
||||
|
||||
void StartPaneDrag(
|
||||
wxWindow* pane_window,
|
||||
wxWindow* paneWindow,
|
||||
const wxPoint& offset);
|
||||
|
||||
wxRect CalculateHintRect(
|
||||
wxWindow* pane_window,
|
||||
wxWindow* paneWindow,
|
||||
const wxPoint& pt,
|
||||
const wxPoint& offset);
|
||||
|
||||
void DrawHintRect(
|
||||
wxWindow* pane_window,
|
||||
wxWindow* paneWindow,
|
||||
const wxPoint& pt,
|
||||
const wxPoint& offset);
|
||||
|
||||
@ -552,26 +552,26 @@ protected:
|
||||
wxAuiDockInfo& dock,
|
||||
wxAuiPaneInfo& pane,
|
||||
wxAuiDockUIPartArray& uiparts,
|
||||
bool spacer_only);
|
||||
bool spacerOnly);
|
||||
|
||||
void LayoutAddDock(wxSizer* container,
|
||||
wxAuiDockInfo& dock,
|
||||
wxAuiDockUIPartArray& uiparts,
|
||||
bool spacer_only);
|
||||
wxAuiDockUIPartArray& uiParts,
|
||||
bool spacerOnly);
|
||||
|
||||
wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
|
||||
wxAuiDockInfoArray& docks,
|
||||
wxAuiDockUIPartArray& uiparts,
|
||||
bool spacer_only = false);
|
||||
wxAuiDockUIPartArray & uiParts,
|
||||
bool spacerOnly = false);
|
||||
|
||||
virtual bool ProcessDockResult(wxAuiPaneInfo& target,
|
||||
const wxAuiPaneInfo& new_pos);
|
||||
const wxAuiPaneInfo& newPos);
|
||||
|
||||
bool DoDrop(wxAuiDockInfoArray& docks,
|
||||
wxAuiPaneInfoArray& panes,
|
||||
wxAuiPaneInfo& drop,
|
||||
const wxPoint& pt,
|
||||
const wxPoint& action_offset = wxPoint(0,0));
|
||||
const wxPoint& actionOffset = wxPoint(0,0));
|
||||
|
||||
wxAuiDockUIPart* HitTest(int x, int y);
|
||||
wxAuiDockUIPart* GetPanePart(wxWindow* pane);
|
||||
@ -585,7 +585,7 @@ protected:
|
||||
void Render(wxDC* dc);
|
||||
void Repaint(wxDC* dc = NULL);
|
||||
void ProcessMgrEvent(wxAuiManagerEvent& event);
|
||||
void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
|
||||
void UpdateButtonOnScreen(wxAuiDockUIPart* buttonUiPart,
|
||||
const wxMouseEvent& event);
|
||||
void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
|
||||
wxArrayInt& positions,
|
||||
@ -636,29 +636,29 @@ protected:
|
||||
|
||||
wxAuiPaneInfoArray m_panes; // array of panes structures
|
||||
wxAuiDockInfoArray m_docks; // array of docks structures
|
||||
wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
|
||||
wxAuiDockUIPartArray m_uiParts; // array of UI parts (captions, buttons, etc)
|
||||
|
||||
int m_action; // current mouse action
|
||||
wxPoint m_action_start; // position where the action click started
|
||||
wxPoint m_action_offset; // offset from upper left of the item clicked
|
||||
wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
|
||||
wxWindow* m_action_window; // action frame or window (NULL if none)
|
||||
wxRect m_action_hintrect; // hint rectangle for the action
|
||||
wxRect m_last_rect;
|
||||
wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
|
||||
wxRect m_last_hint; // last hint rectangle
|
||||
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
|
||||
wxPoint m_actionStart; // position where the action click started
|
||||
wxPoint m_actionOffset; // offset from upper left of the item clicked
|
||||
wxAuiDockUIPart* m_actionPart; // ptr to the part the action happened to
|
||||
wxWindow* m_actionWindow; // action frame or window (NULL if none)
|
||||
wxRect m_actionHintRect; // hint rectangle for the action
|
||||
wxRect m_lastRect;
|
||||
wxAuiDockUIPart* m_hoverButton;// button uipart being hovered over
|
||||
wxRect m_lastHint; // last hint rectangle
|
||||
wxPoint m_lastMouseMove; // last mouse move position (see OnMotion)
|
||||
int m_currentDragItem;
|
||||
bool m_skipping;
|
||||
bool m_has_maximized;
|
||||
bool m_hasMaximized;
|
||||
|
||||
double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume
|
||||
double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume
|
||||
double m_dockConstraintX; // 0.0 .. 1.0; max pct of window width a dock can consume
|
||||
double m_dockConstraintY; // 0.0 .. 1.0; max pct of window height a dock can consume
|
||||
|
||||
wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
|
||||
wxTimer m_hint_fadetimer; // transparent fade timer
|
||||
wxByte m_hint_fadeamt; // transparent fade amount
|
||||
wxByte m_hint_fademax; // maximum value of hint fade
|
||||
wxFrame* m_hintWnd; // transparent hint window, if supported by platform
|
||||
wxTimer m_hintFadeTimer; // transparent fade timer
|
||||
wxByte m_hintFadeAmt; // transparent fade amount
|
||||
wxByte m_hintFadeMax; // maximum value of hint fade
|
||||
|
||||
void* m_reserved;
|
||||
|
||||
|
@ -138,7 +138,7 @@ public:
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual void SetMenuBar(wxMenuBar *menuBar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
@ -199,7 +199,7 @@ public:
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
|
||||
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// no size hints
|
||||
@ -215,12 +215,12 @@ public:
|
||||
|
||||
protected:
|
||||
wxAuiMDIParentFrame* m_pMDIParentFrame;
|
||||
wxRect m_mdi_newrect;
|
||||
wxRect m_mdi_currect;
|
||||
wxRect m_mdiNewRect;
|
||||
wxRect m_mdiCurRect;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
wxIconBundle m_icon_bundle;
|
||||
bool m_activate_on_create;
|
||||
wxIconBundle m_iconBundle;
|
||||
bool m_activateOnCreate;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar* m_pMenuBar;
|
||||
@ -252,7 +252,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
void PageChanged(int old_selection, int new_selection);
|
||||
void PageChanged(int oldSelection, int newSelection);
|
||||
void OnPageClose(wxAuiNotebookEvent& evt);
|
||||
void OnPageChanged(wxAuiNotebookEvent& evt);
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
|
1078
src/aui/auibar.cpp
1078
src/aui/auibar.cpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -152,64 +152,64 @@ wxString wxAuiChopText(wxDC& dc, const wxString& text, int max_size)
|
||||
wxAuiDefaultDockArt::wxAuiDefaultDockArt()
|
||||
{
|
||||
#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON
|
||||
wxColor base_colour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground));
|
||||
wxColor baseColour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground));
|
||||
#else
|
||||
wxColor base_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||
wxColor baseColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||
#endif
|
||||
|
||||
// the base_colour is too pale to use as our base colour,
|
||||
// the baseColour is too pale to use as our base colour,
|
||||
// so darken it a bit --
|
||||
if ((255-base_colour.Red()) +
|
||||
(255-base_colour.Green()) +
|
||||
(255-base_colour.Blue()) < 60)
|
||||
if ((255-baseColour.Red()) +
|
||||
(255-baseColour.Green()) +
|
||||
(255-baseColour.Blue()) < 60)
|
||||
{
|
||||
base_colour = base_colour.ChangeLightness(92);
|
||||
baseColour = baseColour.ChangeLightness(92);
|
||||
}
|
||||
|
||||
m_base_colour = base_colour;
|
||||
wxColor darker1_colour = base_colour.ChangeLightness(85);
|
||||
wxColor darker2_colour = base_colour.ChangeLightness(75);
|
||||
wxColor darker3_colour = base_colour.ChangeLightness(60);
|
||||
//wxColor darker4_colour = base_colour.ChangeLightness(50);
|
||||
wxColor darker5_colour = base_colour.ChangeLightness(40);
|
||||
m_baseColour = baseColour;
|
||||
wxColor darker1Colour = baseColour.ChangeLightness(85);
|
||||
wxColor darker2Colour = baseColour.ChangeLightness(75);
|
||||
wxColor darker3Colour = baseColour.ChangeLightness(60);
|
||||
//wxColor darker4Colour = baseColour.ChangeLightness(50);
|
||||
wxColor darker5Colour = baseColour.ChangeLightness(40);
|
||||
|
||||
m_active_caption_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||
m_active_caption_gradient_colour = wxAuiLightContrastColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
|
||||
m_active_caption_text_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
m_inactive_caption_colour = darker1_colour;
|
||||
m_inactive_caption_gradient_colour = base_colour.ChangeLightness(97);
|
||||
m_inactive_caption_text_colour = *wxBLACK;
|
||||
m_activeCaptionColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||
m_activeCaptionGradientColour = wxAuiLightContrastColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
|
||||
m_activeCaptionTextColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
m_inactiveCaptionColour = darker1Colour;
|
||||
m_inactiveCaptionGradientColour = baseColour.ChangeLightness(97);
|
||||
m_inactiveCaptionTextColour = *wxBLACK;
|
||||
|
||||
m_sash_brush = wxBrush(base_colour);
|
||||
m_background_brush = wxBrush(base_colour);
|
||||
m_gripper_brush = wxBrush(base_colour);
|
||||
m_sashBrush = wxBrush(baseColour);
|
||||
m_backgroundBrush = wxBrush(baseColour);
|
||||
m_gripperBrush = wxBrush(baseColour);
|
||||
|
||||
m_border_pen = wxPen(darker2_colour);
|
||||
m_gripper_pen1 = wxPen(darker5_colour);
|
||||
m_gripper_pen2 = wxPen(darker3_colour);
|
||||
m_gripper_pen3 = *wxWHITE_PEN;
|
||||
m_borderPen = wxPen(darker2Colour);
|
||||
m_gripperPen1 = wxPen(darker5Colour);
|
||||
m_gripperPen2 = wxPen(darker3Colour);
|
||||
m_gripperPen3 = *wxWHITE_PEN;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_caption_font = *wxSMALL_FONT;
|
||||
m_captionFont = *wxSMALL_FONT;
|
||||
#else
|
||||
m_caption_font = wxFont(8, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE);
|
||||
m_captionFont = wxFont(8, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE);
|
||||
#endif
|
||||
|
||||
// default metric values
|
||||
#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON
|
||||
SInt32 height;
|
||||
GetThemeMetric( kThemeMetricSmallPaneSplitterHeight , &height );
|
||||
m_sash_size = height;
|
||||
m_sashSize = height;
|
||||
#elif defined(__WXGTK__)
|
||||
m_sash_size = wxRendererNative::Get().GetSplitterParams(NULL).widthSash;
|
||||
m_sashSize = wxRendererNative::Get().GetSplitterParams(NULL).widthSash;
|
||||
#else
|
||||
m_sash_size = 4;
|
||||
m_sashSize = 4;
|
||||
#endif
|
||||
m_caption_size = 17;
|
||||
m_border_size = 1;
|
||||
m_button_size = 14;
|
||||
m_gripper_size = 9;
|
||||
m_gradient_type = wxAUI_GRADIENT_VERTICAL;
|
||||
m_captionSize = 17;
|
||||
m_borderSize = 1;
|
||||
m_buttonSize = 14;
|
||||
m_gripperSize = 9;
|
||||
m_gradientType = wxAUI_GRADIENT_VERTICAL;
|
||||
|
||||
InitBitmaps();
|
||||
}
|
||||
@ -258,43 +258,43 @@ wxAuiDefaultDockArt::InitBitmaps ()
|
||||
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_inactive_close_bitmap = wxAuiBitmapFromBits(close_bits, 16, 16, *wxWHITE);
|
||||
m_active_close_bitmap = wxAuiBitmapFromBits(close_bits, 16, 16, *wxWHITE );
|
||||
m_inactiveCloseBitmap = wxAuiBitmapFromBits(close_bits, 16, 16, *wxWHITE);
|
||||
m_activeCloseBitmap = wxAuiBitmapFromBits(close_bits, 16, 16, *wxWHITE );
|
||||
#else
|
||||
m_inactive_close_bitmap = wxAuiBitmapFromBits(close_bits, 16, 16, m_inactive_caption_text_colour);
|
||||
m_active_close_bitmap = wxAuiBitmapFromBits(close_bits, 16, 16, m_active_caption_text_colour);
|
||||
m_inactiveCloseBitmap = wxAuiBitmapFromBits(close_bits, 16, 16, m_inactiveCaptionTextColour);
|
||||
m_activeCloseBitmap = wxAuiBitmapFromBits(close_bits, 16, 16, m_activeCaptionTextColour);
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_inactive_maximize_bitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, *wxWHITE);
|
||||
m_active_maximize_bitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, *wxWHITE );
|
||||
m_inactiveMaximizeBitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, *wxWHITE);
|
||||
m_activeMaximizeBitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, *wxWHITE );
|
||||
#else
|
||||
m_inactive_maximize_bitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, m_inactive_caption_text_colour);
|
||||
m_active_maximize_bitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, m_active_caption_text_colour);
|
||||
m_inactiveMaximizeBitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, m_inactiveCaptionTextColour);
|
||||
m_activeMaximizeBitmap = wxAuiBitmapFromBits(maximize_bits, 16, 16, m_activeCaptionTextColour);
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_inactive_restore_bitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, *wxWHITE);
|
||||
m_active_restore_bitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, *wxWHITE );
|
||||
m_inactiveRestoreBitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, *wxWHITE);
|
||||
m_activeRestoreBitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, *wxWHITE );
|
||||
#else
|
||||
m_inactive_restore_bitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, m_inactive_caption_text_colour);
|
||||
m_active_restore_bitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, m_active_caption_text_colour);
|
||||
m_inactiveRestoreBitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, m_inactiveCaptionTextColour);
|
||||
m_activeRestoreBitmap = wxAuiBitmapFromBits(restore_bits, 16, 16, m_activeCaptionTextColour);
|
||||
#endif
|
||||
|
||||
m_inactive_pin_bitmap = wxAuiBitmapFromBits(pin_bits, 16, 16, m_inactive_caption_text_colour);
|
||||
m_active_pin_bitmap = wxAuiBitmapFromBits(pin_bits, 16, 16, m_active_caption_text_colour);
|
||||
m_inactivePinBitmap = wxAuiBitmapFromBits(pin_bits, 16, 16, m_inactiveCaptionTextColour);
|
||||
m_activePinBitmap = wxAuiBitmapFromBits(pin_bits, 16, 16, m_activeCaptionTextColour);
|
||||
}
|
||||
|
||||
int wxAuiDefaultDockArt::GetMetric(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case wxAUI_DOCKART_SASH_SIZE: return m_sash_size;
|
||||
case wxAUI_DOCKART_CAPTION_SIZE: return m_caption_size;
|
||||
case wxAUI_DOCKART_GRIPPER_SIZE: return m_gripper_size;
|
||||
case wxAUI_DOCKART_PANE_BORDER_SIZE: return m_border_size;
|
||||
case wxAUI_DOCKART_PANE_BUTTON_SIZE: return m_button_size;
|
||||
case wxAUI_DOCKART_GRADIENT_TYPE: return m_gradient_type;
|
||||
case wxAUI_DOCKART_SASH_SIZE: return m_sashSize;
|
||||
case wxAUI_DOCKART_CAPTION_SIZE: return m_captionSize;
|
||||
case wxAUI_DOCKART_GRIPPER_SIZE: return m_gripperSize;
|
||||
case wxAUI_DOCKART_PANE_BORDER_SIZE: return m_borderSize;
|
||||
case wxAUI_DOCKART_PANE_BUTTON_SIZE: return m_buttonSize;
|
||||
case wxAUI_DOCKART_GRADIENT_TYPE: return m_gradientType;
|
||||
default: wxFAIL_MSG(wxT("Invalid Metric Ordinal")); break;
|
||||
}
|
||||
|
||||
@ -305,12 +305,12 @@ void wxAuiDefaultDockArt::SetMetric(int id, int new_val)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case wxAUI_DOCKART_SASH_SIZE: m_sash_size = new_val; break;
|
||||
case wxAUI_DOCKART_CAPTION_SIZE: m_caption_size = new_val; break;
|
||||
case wxAUI_DOCKART_GRIPPER_SIZE: m_gripper_size = new_val; break;
|
||||
case wxAUI_DOCKART_PANE_BORDER_SIZE: m_border_size = new_val; break;
|
||||
case wxAUI_DOCKART_PANE_BUTTON_SIZE: m_button_size = new_val; break;
|
||||
case wxAUI_DOCKART_GRADIENT_TYPE: m_gradient_type = new_val; break;
|
||||
case wxAUI_DOCKART_SASH_SIZE: m_sashSize = new_val; break;
|
||||
case wxAUI_DOCKART_CAPTION_SIZE: m_captionSize = new_val; break;
|
||||
case wxAUI_DOCKART_GRIPPER_SIZE: m_gripperSize = new_val; break;
|
||||
case wxAUI_DOCKART_PANE_BORDER_SIZE: m_borderSize = new_val; break;
|
||||
case wxAUI_DOCKART_PANE_BUTTON_SIZE: m_buttonSize = new_val; break;
|
||||
case wxAUI_DOCKART_GRADIENT_TYPE: m_gradientType = new_val; break;
|
||||
default: wxFAIL_MSG(wxT("Invalid Metric Ordinal")); break;
|
||||
}
|
||||
}
|
||||
@ -319,16 +319,16 @@ wxColour wxAuiDefaultDockArt::GetColour(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case wxAUI_DOCKART_BACKGROUND_COLOUR: return m_background_brush.GetColour();
|
||||
case wxAUI_DOCKART_SASH_COLOUR: return m_sash_brush.GetColour();
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR: return m_inactive_caption_colour;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR: return m_inactive_caption_gradient_colour;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR: return m_inactive_caption_text_colour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR: return m_active_caption_colour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR: return m_active_caption_gradient_colour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR: return m_active_caption_text_colour;
|
||||
case wxAUI_DOCKART_BORDER_COLOUR: return m_border_pen.GetColour();
|
||||
case wxAUI_DOCKART_GRIPPER_COLOUR: return m_gripper_brush.GetColour();
|
||||
case wxAUI_DOCKART_BACKGROUND_COLOUR: return m_backgroundBrush.GetColour();
|
||||
case wxAUI_DOCKART_SASH_COLOUR: return m_sashBrush.GetColour();
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR: return m_inactiveCaptionColour;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR: return m_inactiveCaptionGradientColour;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR: return m_inactiveCaptionTextColour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR: return m_activeCaptionColour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR: return m_activeCaptionGradientColour;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR: return m_activeCaptionTextColour;
|
||||
case wxAUI_DOCKART_BORDER_COLOUR: return m_borderPen.GetColour();
|
||||
case wxAUI_DOCKART_GRIPPER_COLOUR: return m_gripperBrush.GetColour();
|
||||
default: wxFAIL_MSG(wxT("Invalid Metric Ordinal")); break;
|
||||
}
|
||||
|
||||
@ -339,19 +339,19 @@ void wxAuiDefaultDockArt::SetColour(int id, const wxColor& colour)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case wxAUI_DOCKART_BACKGROUND_COLOUR: m_background_brush.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_SASH_COLOUR: m_sash_brush.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR: m_inactive_caption_colour = colour; break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR: m_inactive_caption_gradient_colour = colour; break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR: m_inactive_caption_text_colour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR: m_active_caption_colour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR: m_active_caption_gradient_colour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR: m_active_caption_text_colour = colour; break;
|
||||
case wxAUI_DOCKART_BORDER_COLOUR: m_border_pen.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_BACKGROUND_COLOUR: m_backgroundBrush.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_SASH_COLOUR: m_sashBrush.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR: m_inactiveCaptionColour = colour; break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR: m_inactiveCaptionGradientColour = colour; break;
|
||||
case wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR: m_inactiveCaptionTextColour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR: m_activeCaptionColour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR: m_activeCaptionGradientColour = colour; break;
|
||||
case wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR: m_activeCaptionTextColour = colour; break;
|
||||
case wxAUI_DOCKART_BORDER_COLOUR: m_borderPen.SetColour(colour); break;
|
||||
case wxAUI_DOCKART_GRIPPER_COLOUR:
|
||||
m_gripper_brush.SetColour(colour);
|
||||
m_gripper_pen1.SetColour(colour.ChangeLightness(40));
|
||||
m_gripper_pen2.SetColour(colour.ChangeLightness(60));
|
||||
m_gripperBrush.SetColour(colour);
|
||||
m_gripperPen1.SetColour(colour.ChangeLightness(40));
|
||||
m_gripperPen2.SetColour(colour.ChangeLightness(60));
|
||||
break;
|
||||
default: wxFAIL_MSG(wxT("Invalid Metric Ordinal")); break;
|
||||
}
|
||||
@ -362,13 +362,13 @@ void wxAuiDefaultDockArt::SetColour(int id, const wxColor& colour)
|
||||
void wxAuiDefaultDockArt::SetFont(int id, const wxFont& font)
|
||||
{
|
||||
if (id == wxAUI_DOCKART_CAPTION_FONT)
|
||||
m_caption_font = font;
|
||||
m_captionFont = font;
|
||||
}
|
||||
|
||||
wxFont wxAuiDefaultDockArt::GetFont(int id)
|
||||
{
|
||||
if (id == wxAUI_DOCKART_CAPTION_FONT)
|
||||
return m_caption_font;
|
||||
return m_captionFont;
|
||||
return wxNullFont;
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation,
|
||||
#elif defined(__WXGTK__)
|
||||
// clear out the rectangle first
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(m_sash_brush);
|
||||
dc.SetBrush(m_sashBrush);
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
|
||||
#if 0
|
||||
@ -401,7 +401,7 @@ void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation,
|
||||
{
|
||||
gdk_rect.x = rect.x;
|
||||
gdk_rect.y = rect.y;
|
||||
gdk_rect.width = m_sash_size;
|
||||
gdk_rect.width = m_sashSize;
|
||||
gdk_rect.height = rect.height;
|
||||
}
|
||||
else
|
||||
@ -409,7 +409,7 @@ void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation,
|
||||
gdk_rect.x = rect.x;
|
||||
gdk_rect.y = rect.y;
|
||||
gdk_rect.width = rect.width;
|
||||
gdk_rect.height = m_sash_size;
|
||||
gdk_rect.height = m_sashSize;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -438,7 +438,7 @@ void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation,
|
||||
wxUnusedVar(window);
|
||||
wxUnusedVar(orientation);
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(m_sash_brush);
|
||||
dc.SetBrush(m_sashBrush);
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
#endif
|
||||
}
|
||||
@ -453,14 +453,14 @@ void wxAuiDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), i
|
||||
dc.SetBrush(*wxWHITE_BRUSH) ;
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
#endif
|
||||
dc.SetBrush(m_background_brush);
|
||||
dc.SetBrush(m_backgroundBrush);
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
|
||||
void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect,
|
||||
wxAuiPaneInfo& pane)
|
||||
{
|
||||
dc.SetPen(m_border_pen);
|
||||
dc.SetPen(m_borderPen);
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
|
||||
wxRect rect = _rect;
|
||||
@ -473,7 +473,7 @@ void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const
|
||||
dc.SetPen(*wxWHITE_PEN);
|
||||
dc.DrawLine(rect.x, rect.y, rect.x+rect.width, rect.y);
|
||||
dc.DrawLine(rect.x, rect.y, rect.x, rect.y+rect.height);
|
||||
dc.SetPen(m_border_pen);
|
||||
dc.SetPen(m_borderPen);
|
||||
dc.DrawLine(rect.x, rect.y+rect.height-1,
|
||||
rect.x+rect.width, rect.y+rect.height-1);
|
||||
dc.DrawLine(rect.x+rect.width-1, rect.y,
|
||||
@ -494,12 +494,12 @@ void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const
|
||||
|
||||
void wxAuiDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active)
|
||||
{
|
||||
if (m_gradient_type == wxAUI_GRADIENT_NONE)
|
||||
if (m_gradientType == wxAUI_GRADIENT_NONE)
|
||||
{
|
||||
if (active)
|
||||
dc.SetBrush(wxBrush(m_active_caption_colour));
|
||||
dc.SetBrush(wxBrush(m_activeCaptionColour));
|
||||
else
|
||||
dc.SetBrush(wxBrush(m_inactive_caption_colour));
|
||||
dc.SetBrush(wxBrush(m_inactiveCaptionColour));
|
||||
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
@ -510,15 +510,15 @@ void wxAuiDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bo
|
||||
// on mac the gradients are expected to become darker from the top
|
||||
#ifdef __WXMAC__
|
||||
DrawGradientRectangle(dc, rect,
|
||||
m_active_caption_colour,
|
||||
m_active_caption_gradient_colour,
|
||||
m_gradient_type);
|
||||
m_activeCaptionColour,
|
||||
m_activeCaptionGradientColour,
|
||||
m_gradientType);
|
||||
#else
|
||||
// on other platforms, active gradients become lighter at the top
|
||||
DrawGradientRectangle(dc, rect,
|
||||
m_active_caption_gradient_colour,
|
||||
m_active_caption_colour,
|
||||
m_gradient_type);
|
||||
m_activeCaptionGradientColour,
|
||||
m_activeCaptionColour,
|
||||
m_gradientType);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -526,15 +526,15 @@ void wxAuiDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bo
|
||||
#ifdef __WXMAC__
|
||||
// on mac the gradients are expected to become darker from the top
|
||||
DrawGradientRectangle(dc, rect,
|
||||
m_inactive_caption_gradient_colour,
|
||||
m_inactive_caption_colour,
|
||||
m_gradient_type);
|
||||
m_inactiveCaptionGradientColour,
|
||||
m_inactiveCaptionColour,
|
||||
m_gradientType);
|
||||
#else
|
||||
// on other platforms, inactive gradients become lighter at the bottom
|
||||
DrawGradientRectangle(dc, rect,
|
||||
m_inactive_caption_colour,
|
||||
m_inactive_caption_gradient_colour,
|
||||
m_gradient_type);
|
||||
m_inactiveCaptionColour,
|
||||
m_inactiveCaptionGradientColour,
|
||||
m_gradientType);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -547,7 +547,7 @@ void wxAuiDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
wxAuiPaneInfo& pane)
|
||||
{
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetFont(m_caption_font);
|
||||
dc.SetFont(m_captionFont);
|
||||
|
||||
DrawCaptionBackground(dc, rect,
|
||||
(pane.state & wxAuiPaneInfo::optionActive)?true:false);
|
||||
@ -561,9 +561,9 @@ void wxAuiDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
}
|
||||
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
dc.SetTextForeground(m_active_caption_text_colour);
|
||||
dc.SetTextForeground(m_activeCaptionTextColour);
|
||||
else
|
||||
dc.SetTextForeground(m_inactive_caption_text_colour);
|
||||
dc.SetTextForeground(m_inactiveCaptionTextColour);
|
||||
|
||||
|
||||
wxCoord w,h;
|
||||
@ -573,11 +573,11 @@ void wxAuiDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
clip_rect.width -= 3; // text offset
|
||||
clip_rect.width -= 2; // button padding
|
||||
if (pane.HasCloseButton())
|
||||
clip_rect.width -= m_button_size;
|
||||
clip_rect.width -= m_buttonSize;
|
||||
if (pane.HasPinButton())
|
||||
clip_rect.width -= m_button_size;
|
||||
clip_rect.width -= m_buttonSize;
|
||||
if (pane.HasMaximizeButton())
|
||||
clip_rect.width -= m_button_size;
|
||||
clip_rect.width -= m_buttonSize;
|
||||
|
||||
wxString draw_text = wxAuiChopText(dc, text, clip_rect.width);
|
||||
|
||||
@ -600,7 +600,7 @@ void wxAuiDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
wxAuiPaneInfo& pane)
|
||||
{
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(m_gripper_brush);
|
||||
dc.SetBrush(m_gripperBrush);
|
||||
|
||||
dc.DrawRectangle(rect.x, rect.y, rect.width,rect.height);
|
||||
|
||||
@ -609,12 +609,12 @@ void wxAuiDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
int y = 5;
|
||||
while (1)
|
||||
{
|
||||
dc.SetPen(m_gripper_pen1);
|
||||
dc.SetPen(m_gripperPen1);
|
||||
dc.DrawPoint(rect.x+3, rect.y+y);
|
||||
dc.SetPen(m_gripper_pen2);
|
||||
dc.SetPen(m_gripperPen2);
|
||||
dc.DrawPoint(rect.x+3, rect.y+y+1);
|
||||
dc.DrawPoint(rect.x+4, rect.y+y);
|
||||
dc.SetPen(m_gripper_pen3);
|
||||
dc.SetPen(m_gripperPen3);
|
||||
dc.DrawPoint(rect.x+5, rect.y+y+1);
|
||||
dc.DrawPoint(rect.x+5, rect.y+y+2);
|
||||
dc.DrawPoint(rect.x+4, rect.y+y+2);
|
||||
@ -629,12 +629,12 @@ void wxAuiDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
int x = 5;
|
||||
while (1)
|
||||
{
|
||||
dc.SetPen(m_gripper_pen1);
|
||||
dc.SetPen(m_gripperPen1);
|
||||
dc.DrawPoint(rect.x+x, rect.y+3);
|
||||
dc.SetPen(m_gripper_pen2);
|
||||
dc.SetPen(m_gripperPen2);
|
||||
dc.DrawPoint(rect.x+x+1, rect.y+3);
|
||||
dc.DrawPoint(rect.x+x, rect.y+4);
|
||||
dc.SetPen(m_gripper_pen3);
|
||||
dc.SetPen(m_gripperPen3);
|
||||
dc.DrawPoint(rect.x+x+1, rect.y+5);
|
||||
dc.DrawPoint(rect.x+x+2, rect.y+5);
|
||||
dc.DrawPoint(rect.x+x+2, rect.y+4);
|
||||
@ -660,30 +660,30 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
default:
|
||||
case wxAUI_BUTTON_CLOSE:
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
bmp = m_active_close_bitmap;
|
||||
bmp = m_activeCloseBitmap;
|
||||
else
|
||||
bmp = m_inactive_close_bitmap;
|
||||
bmp = m_inactiveCloseBitmap;
|
||||
break;
|
||||
case wxAUI_BUTTON_PIN:
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
bmp = m_active_pin_bitmap;
|
||||
bmp = m_activePinBitmap;
|
||||
else
|
||||
bmp = m_inactive_pin_bitmap;
|
||||
bmp = m_inactivePinBitmap;
|
||||
break;
|
||||
case wxAUI_BUTTON_MAXIMIZE_RESTORE:
|
||||
if (pane.IsMaximized())
|
||||
{
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
bmp = m_active_restore_bitmap;
|
||||
bmp = m_activeRestoreBitmap;
|
||||
else
|
||||
bmp = m_inactive_restore_bitmap;
|
||||
bmp = m_inactiveRestoreBitmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
bmp = m_active_maximize_bitmap;
|
||||
bmp = m_activeMaximizeBitmap;
|
||||
else
|
||||
bmp = m_inactive_maximize_bitmap;
|
||||
bmp = m_inactiveMaximizeBitmap;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -707,13 +707,13 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
|
||||
{
|
||||
if (pane.state & wxAuiPaneInfo::optionActive)
|
||||
{
|
||||
dc.SetBrush(wxBrush(m_active_caption_colour.ChangeLightness(120)));
|
||||
dc.SetPen(wxPen(m_active_caption_colour.ChangeLightness(70)));
|
||||
dc.SetBrush(wxBrush(m_activeCaptionColour.ChangeLightness(120)));
|
||||
dc.SetPen(wxPen(m_activeCaptionColour.ChangeLightness(70)));
|
||||
}
|
||||
else
|
||||
{
|
||||
dc.SetBrush(wxBrush(m_inactive_caption_colour.ChangeLightness(120)));
|
||||
dc.SetPen(wxPen(m_inactive_caption_colour.ChangeLightness(70)));
|
||||
dc.SetBrush(wxBrush(m_inactiveCaptionColour.ChangeLightness(120)));
|
||||
dc.SetPen(wxPen(m_inactiveCaptionColour.ChangeLightness(70)));
|
||||
}
|
||||
|
||||
// draw the background behind the button
|
||||
|
@ -54,17 +54,17 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent,
|
||||
(pane.IsFixed()?0:wxRESIZE_BORDER)
|
||||
)
|
||||
{
|
||||
m_owner_mgr = owner_mgr;
|
||||
m_ownerMgr = owner_mgr;
|
||||
m_moving = false;
|
||||
m_mgr.SetManagedWindow(this);
|
||||
m_solid_drag = true;
|
||||
m_solidDrag = true;
|
||||
|
||||
// find out if the system supports solid window drag.
|
||||
// on non-msw systems, this is assumed to be the case
|
||||
#ifdef __WXMSW__
|
||||
BOOL b = TRUE;
|
||||
SystemParametersInfo(38 /*SPI_GETDRAGFULLWINDOWS*/, 0, &b, 0);
|
||||
m_solid_drag = b ? true : false;
|
||||
m_solidDrag = b ? true : false;
|
||||
#endif
|
||||
|
||||
SetExtraStyle(wxWS_EX_PROCESS_IDLE);
|
||||
@ -73,9 +73,9 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent,
|
||||
wxAuiFloatingFrame::~wxAuiFloatingFrame()
|
||||
{
|
||||
// if we do not do this, then we can crash...
|
||||
if (m_owner_mgr && m_owner_mgr->m_action_window == this)
|
||||
if (m_ownerMgr && m_ownerMgr->m_actionWindow == this)
|
||||
{
|
||||
m_owner_mgr->m_action_window = NULL;
|
||||
m_ownerMgr->m_actionWindow = NULL;
|
||||
}
|
||||
|
||||
m_mgr.UnInit();
|
||||
@ -83,8 +83,8 @@ wxAuiFloatingFrame::~wxAuiFloatingFrame()
|
||||
|
||||
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
{
|
||||
m_pane_window = pane.window;
|
||||
m_pane_window->Reparent(this);
|
||||
m_paneWindow = pane.window;
|
||||
m_paneWindow->Reparent(this);
|
||||
|
||||
wxAuiPaneInfo contained_pane = pane;
|
||||
contained_pane.Dock().Center().Show().
|
||||
@ -108,7 +108,7 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
|
||||
SetMinSize(pane.window->GetMinSize());
|
||||
|
||||
m_mgr.AddPane(m_pane_window, contained_pane);
|
||||
m_mgr.AddPane(m_paneWindow, contained_pane);
|
||||
m_mgr.Update();
|
||||
|
||||
if (pane.min_size.IsFullySpecified())
|
||||
@ -148,13 +148,13 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
if (size == wxDefaultSize)
|
||||
size = pane.min_size;
|
||||
if (size == wxDefaultSize)
|
||||
size = m_pane_window->GetSize();
|
||||
if (m_owner_mgr && pane.HasGripper())
|
||||
size = m_paneWindow->GetSize();
|
||||
if (m_ownerMgr && pane.HasGripper())
|
||||
{
|
||||
if (pane.HasGripperTop())
|
||||
size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
|
||||
size.y += m_ownerMgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
|
||||
else
|
||||
size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
|
||||
size.x += m_ownerMgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
|
||||
}
|
||||
|
||||
SetClientSize(size);
|
||||
@ -163,34 +163,34 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
|
||||
wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const
|
||||
{
|
||||
return m_owner_mgr;
|
||||
return m_ownerMgr;
|
||||
}
|
||||
|
||||
|
||||
void wxAuiFloatingFrame::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
{
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneResized(m_pane_window, GetRect());
|
||||
m_ownerMgr->OnFloatingPaneResized(m_paneWindow, GetRect());
|
||||
}
|
||||
}
|
||||
|
||||
void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt)
|
||||
{
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
|
||||
m_ownerMgr->OnFloatingPaneClosed(m_paneWindow, evt);
|
||||
}
|
||||
if (!evt.GetVeto())
|
||||
{
|
||||
m_mgr.DetachPane(m_pane_window);
|
||||
m_mgr.DetachPane(m_paneWindow);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||
{
|
||||
if (!m_solid_drag)
|
||||
if (!m_solidDrag)
|
||||
{
|
||||
// systems without solid window dragging need to be
|
||||
// handled slightly differently, due to the lack of
|
||||
@ -204,70 +204,70 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||
}
|
||||
|
||||
|
||||
wxRect win_rect = GetRect();
|
||||
wxRect winRect = GetRect();
|
||||
|
||||
if (win_rect == m_last_rect)
|
||||
if (winRect == m_lastRect)
|
||||
return;
|
||||
|
||||
// skip the first move event
|
||||
if (m_last_rect.IsEmpty())
|
||||
if (m_lastRect.IsEmpty())
|
||||
{
|
||||
m_last_rect = win_rect;
|
||||
m_lastRect = winRect;
|
||||
return;
|
||||
}
|
||||
|
||||
// skip if moving too fast to avoid massive redraws and
|
||||
// jumping hint windows
|
||||
if ((abs(win_rect.x - m_last_rect.x) > 3) ||
|
||||
(abs(win_rect.y - m_last_rect.y) > 3))
|
||||
if ((abs(winRect.x - m_lastRect.x) > 3) ||
|
||||
(abs(winRect.y - m_lastRect.y) > 3))
|
||||
{
|
||||
m_last3_rect = m_last2_rect;
|
||||
m_last2_rect = m_last_rect;
|
||||
m_last_rect = win_rect;
|
||||
m_last3Rect = m_last2Rect;
|
||||
m_last2Rect = m_lastRect;
|
||||
m_lastRect = winRect;
|
||||
|
||||
// However still update the internally stored position to avoid
|
||||
// snapping back to the old one later.
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->GetPane(m_pane_window).
|
||||
floating_pos = win_rect.GetPosition();
|
||||
m_ownerMgr->GetPane(m_paneWindow).
|
||||
floating_pos = winRect.GetPosition();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// prevent frame redocking during resize
|
||||
if (m_last_rect.GetSize() != win_rect.GetSize())
|
||||
if (m_lastRect.GetSize() != winRect.GetSize())
|
||||
{
|
||||
m_last3_rect = m_last2_rect;
|
||||
m_last2_rect = m_last_rect;
|
||||
m_last_rect = win_rect;
|
||||
m_last3Rect = m_last2Rect;
|
||||
m_last2Rect = m_lastRect;
|
||||
m_lastRect = winRect;
|
||||
return;
|
||||
}
|
||||
|
||||
wxDirection dir = wxALL;
|
||||
|
||||
int horiz_dist = abs(win_rect.x - m_last3_rect.x);
|
||||
int vert_dist = abs(win_rect.y - m_last3_rect.y);
|
||||
int horiz_dist = abs(winRect.x - m_last3Rect.x);
|
||||
int vert_dist = abs(winRect.y - m_last3Rect.y);
|
||||
|
||||
if (vert_dist >= horiz_dist)
|
||||
{
|
||||
if (win_rect.y < m_last3_rect.y)
|
||||
if (winRect.y < m_last3Rect.y)
|
||||
dir = wxNORTH;
|
||||
else
|
||||
dir = wxSOUTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (win_rect.x < m_last3_rect.x)
|
||||
if (winRect.x < m_last3Rect.x)
|
||||
dir = wxWEST;
|
||||
else
|
||||
dir = wxEAST;
|
||||
}
|
||||
|
||||
m_last3_rect = m_last2_rect;
|
||||
m_last2_rect = m_last_rect;
|
||||
m_last_rect = win_rect;
|
||||
m_last3Rect = m_last2Rect;
|
||||
m_last2Rect = m_lastRect;
|
||||
m_lastRect = winRect;
|
||||
|
||||
if (!isMouseDown())
|
||||
return;
|
||||
@ -278,7 +278,7 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||
m_moving = true;
|
||||
}
|
||||
|
||||
if (m_last3_rect.IsEmpty())
|
||||
if (m_last3Rect.IsEmpty())
|
||||
return;
|
||||
|
||||
OnMoving(event.GetRect(), dir);
|
||||
@ -303,18 +303,18 @@ void wxAuiFloatingFrame::OnIdle(wxIdleEvent& event)
|
||||
void wxAuiFloatingFrame::OnMoveStart()
|
||||
{
|
||||
// notify the owner manager that the pane has started to move
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneMoveStart(m_pane_window);
|
||||
m_ownerMgr->OnFloatingPaneMoveStart(m_paneWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void wxAuiFloatingFrame::OnMoving(const wxRect& WXUNUSED(window_rect), wxDirection dir)
|
||||
{
|
||||
// notify the owner manager that the pane is moving
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneMoving(m_pane_window, dir);
|
||||
m_ownerMgr->OnFloatingPaneMoving(m_paneWindow, dir);
|
||||
}
|
||||
m_lastDirection = dir;
|
||||
}
|
||||
@ -322,17 +322,17 @@ void wxAuiFloatingFrame::OnMoving(const wxRect& WXUNUSED(window_rect), wxDirecti
|
||||
void wxAuiFloatingFrame::OnMoveFinished()
|
||||
{
|
||||
// notify the owner manager that the pane has finished moving
|
||||
if (m_owner_mgr)
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneMoved(m_pane_window, m_lastDirection);
|
||||
m_ownerMgr->OnFloatingPaneMoved(m_paneWindow, m_lastDirection);
|
||||
}
|
||||
}
|
||||
|
||||
void wxAuiFloatingFrame::OnActivate(wxActivateEvent& event)
|
||||
{
|
||||
if (m_owner_mgr && event.GetActive())
|
||||
if (m_ownerMgr && event.GetActive())
|
||||
{
|
||||
m_owner_mgr->OnFloatingPaneActivated(m_pane_window);
|
||||
m_ownerMgr->OnFloatingPaneActivated(m_paneWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -409,7 +409,7 @@ wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
// is, but those are the expected symantics. No style flag is passed
|
||||
// onto the panel underneath.
|
||||
if (style & wxMINIMIZE)
|
||||
m_activate_on_create = false;
|
||||
m_activateOnCreate = false;
|
||||
|
||||
Create(parent, id, title, wxDefaultPosition, size, 0, name);
|
||||
}
|
||||
@ -451,7 +451,7 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent,
|
||||
|
||||
// see comment in constructor
|
||||
if (style & wxMINIMIZE)
|
||||
m_activate_on_create = false;
|
||||
m_activateOnCreate = false;
|
||||
|
||||
wxSize cli_size = pClientWindow->GetClientSize();
|
||||
|
||||
@ -471,7 +471,7 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent,
|
||||
|
||||
m_title = title;
|
||||
|
||||
pClientWindow->AddPage(this, title, m_activate_on_create);
|
||||
pClientWindow->AddPage(this, title, m_activateOnCreate);
|
||||
pClientWindow->Refresh();
|
||||
|
||||
return true;
|
||||
@ -565,12 +565,12 @@ void wxAuiMDIChildFrame::SetIcons(const wxIconBundle& icons)
|
||||
{
|
||||
// get icon with the system icon size
|
||||
SetIcon(icons.GetIcon(-1));
|
||||
m_icon_bundle = icons;
|
||||
m_iconBundle = icons;
|
||||
}
|
||||
|
||||
const wxIconBundle& wxAuiMDIChildFrame::GetIcons() const
|
||||
{
|
||||
return m_icon_bundle;
|
||||
return m_iconBundle;
|
||||
}
|
||||
|
||||
void wxAuiMDIChildFrame::SetIcon(const wxIcon& icon)
|
||||
@ -658,7 +658,7 @@ wxAuiMDIParentFrame* wxAuiMDIChildFrame::GetMDIParentFrame() const
|
||||
|
||||
void wxAuiMDIChildFrame::Init()
|
||||
{
|
||||
m_activate_on_create = true;
|
||||
m_activateOnCreate = true;
|
||||
m_pMDIParentFrame = NULL;
|
||||
#if wxUSE_MENUS
|
||||
m_pMenuBar = NULL;
|
||||
@ -667,7 +667,7 @@ void wxAuiMDIChildFrame::Init()
|
||||
|
||||
bool wxAuiMDIChildFrame::Show(bool show)
|
||||
{
|
||||
m_activate_on_create = show;
|
||||
m_activateOnCreate = show;
|
||||
|
||||
// do nothing
|
||||
return true;
|
||||
@ -680,7 +680,7 @@ void wxAuiMDIChildFrame::DoShow(bool show)
|
||||
|
||||
void wxAuiMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
{
|
||||
m_mdi_newrect = wxRect(x, y, width, height);
|
||||
m_mdiNewRect = wxRect(x, y, width, height);
|
||||
#ifdef __WXGTK__
|
||||
wxPanel::DoSetSize(x,y,width, height, sizeFlags);
|
||||
#else
|
||||
@ -690,16 +690,16 @@ void wxAuiMDIChildFrame::DoSetSize(int x, int y, int width, int height, int size
|
||||
|
||||
void wxAuiMDIChildFrame::DoMoveWindow(int x, int y, int width, int height)
|
||||
{
|
||||
m_mdi_newrect = wxRect(x, y, width, height);
|
||||
m_mdiNewRect = wxRect(x, y, width, height);
|
||||
}
|
||||
|
||||
void wxAuiMDIChildFrame::ApplyMDIChildFrameRect()
|
||||
{
|
||||
if (m_mdi_currect != m_mdi_newrect)
|
||||
if (m_mdiCurRect != m_mdiNewRect)
|
||||
{
|
||||
wxPanel::DoMoveWindow(m_mdi_newrect.x, m_mdi_newrect.y,
|
||||
m_mdi_newrect.width, m_mdi_newrect.height);
|
||||
m_mdi_currect = m_mdi_newrect;
|
||||
wxPanel::DoMoveWindow(m_mdiNewRect.x, m_mdiNewRect.y,
|
||||
m_mdiNewRect.width, m_mdiNewRect.height);
|
||||
m_mdiCurRect = m_mdiNewRect;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user