GetDefaultAttributes, and other tweaks needed to get up to date with CVS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -252,8 +252,9 @@ public:
|
|||||||
"For internal use only");
|
"For internal use only");
|
||||||
|
|
||||||
DocStr(GetComCtl32Version,
|
DocStr(GetComCtl32Version,
|
||||||
"Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it\n"
|
"Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
|
||||||
"wasn't found at all. Raises an exception on non-Windows platforms.");
|
0 if it wasn't found at all. Raises an exception on non-Windows
|
||||||
|
platforms.");
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
static int GetComCtl32Version();
|
static int GetComCtl32Version();
|
||||||
#else
|
#else
|
||||||
|
@@ -63,7 +63,7 @@ public:
|
|||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
void , Command(wxCommandEvent& event),
|
void , Command(wxCommandEvent& event),
|
||||||
"Simulates the effect of the user issuing a command to the\n"
|
"Simulates the effect of the user issuing a command to the\n"
|
||||||
"item. See wxCommandEvent.");
|
"item. See wx.CommandEvent.");
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
wxString , GetLabel(),
|
wxString , GetLabel(),
|
||||||
@@ -72,6 +72,10 @@ public:
|
|||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
void , SetLabel(const wxString& label),
|
void , SetLabel(const wxString& label),
|
||||||
"Sets the item's text.");
|
"Sets the item's text.");
|
||||||
|
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -602,11 +602,12 @@
|
|||||||
%rename(AcceleratorTable) wxAcceleratorTable;
|
%rename(AcceleratorTable) wxAcceleratorTable;
|
||||||
%rename(NullAcceleratorTable) wxNullAcceleratorTable;
|
%rename(NullAcceleratorTable) wxNullAcceleratorTable;
|
||||||
%rename(GetAccelFromString) wxGetAccelFromString;
|
%rename(GetAccelFromString) wxGetAccelFromString;
|
||||||
%rename(WINDOW_VARIANT_DEFAULT) wxWINDOW_VARIANT_DEFAULT;
|
%rename(VisualAttributes) wxVisualAttributes;
|
||||||
%rename(WINDOW_VARIANT_NORMAL) wxWINDOW_VARIANT_NORMAL;
|
%rename(WINDOW_VARIANT_NORMAL) wxWINDOW_VARIANT_NORMAL;
|
||||||
%rename(WINDOW_VARIANT_SMALL) wxWINDOW_VARIANT_SMALL;
|
%rename(WINDOW_VARIANT_SMALL) wxWINDOW_VARIANT_SMALL;
|
||||||
%rename(WINDOW_VARIANT_MINI) wxWINDOW_VARIANT_MINI;
|
%rename(WINDOW_VARIANT_MINI) wxWINDOW_VARIANT_MINI;
|
||||||
%rename(WINDOW_VARIANT_LARGE) wxWINDOW_VARIANT_LARGE;
|
%rename(WINDOW_VARIANT_LARGE) wxWINDOW_VARIANT_LARGE;
|
||||||
|
%rename(WINDOW_VARIANT_MAX) wxWINDOW_VARIANT_MAX;
|
||||||
%rename(Window) wxWindow;
|
%rename(Window) wxWindow;
|
||||||
%rename(FindWindowById) wxFindWindowById;
|
%rename(FindWindowById) wxFindWindowById;
|
||||||
%rename(FindWindowByName) wxFindWindowByName;
|
%rename(FindWindowByName) wxFindWindowByName;
|
||||||
|
@@ -127,6 +127,9 @@ public:
|
|||||||
%#endif
|
%#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -767,6 +767,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -708,6 +708,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -24,13 +24,37 @@ MAKE_CONST_WXSTRING(PanelNameStr);
|
|||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
|
||||||
|
DocStr(wxVisualAttributes,
|
||||||
|
"struct containing all the visual attributes of a control");
|
||||||
|
|
||||||
|
struct wxVisualAttributes
|
||||||
|
{
|
||||||
|
%extend {
|
||||||
|
wxVisualAttributes() {}
|
||||||
|
~wxVisualAttributes() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// the font used for control label/text inside it
|
||||||
|
wxFont font;
|
||||||
|
|
||||||
|
// the foreground colour
|
||||||
|
wxColour colFg;
|
||||||
|
|
||||||
|
// the background colour, may be wxNullColour if the controls background
|
||||||
|
// colour is not solid
|
||||||
|
wxColour colBg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum wxWindowVariant
|
enum wxWindowVariant
|
||||||
{
|
{
|
||||||
wxWINDOW_VARIANT_DEFAULT, // Default size (usually == normal, may be set by a wxSystemOptions entry)
|
|
||||||
wxWINDOW_VARIANT_NORMAL, // Normal size
|
wxWINDOW_VARIANT_NORMAL, // Normal size
|
||||||
wxWINDOW_VARIANT_SMALL, // Smaller size (about 25 % smaller than normal )
|
wxWINDOW_VARIANT_SMALL, // Smaller size (about 25 % smaller than normal )
|
||||||
wxWINDOW_VARIANT_MINI, // Mini size (about 33 % smaller than normal )
|
wxWINDOW_VARIANT_MINI, // Mini size (about 33 % smaller than normal )
|
||||||
wxWINDOW_VARIANT_LARGE, // Large size (about 25 % larger than normal )
|
wxWINDOW_VARIANT_LARGE, // Large size (about 25 % larger than normal )
|
||||||
|
wxWINDOW_VARIANT_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -270,12 +294,10 @@ identification purposes. The interpretation of this function
|
|||||||
differs from class to class. For frames and dialogs, the value
|
differs from class to class. For frames and dialogs, the value
|
||||||
returned is the title. For buttons or static text controls, it is
|
returned is the title. For buttons or static text controls, it is
|
||||||
the button text. This function can be useful for meta-programs
|
the button text. This function can be useful for meta-programs
|
||||||
(such as testing tools or special-needs access programs) which
|
such as testing tools or special-needs access programs)which
|
||||||
need to identify windows by name.");
|
need to identify windows by name.");
|
||||||
|
|
||||||
|
|
||||||
// the window name is used for ressource setting in X, it is not the
|
|
||||||
// same as the window title/label
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
virtual void , SetName( const wxString &name ),
|
virtual void , SetName( const wxString &name ),
|
||||||
"Sets the window's name. The window name is used for ressource
|
"Sets the window's name. The window name is used for ressource
|
||||||
@@ -283,16 +305,21 @@ setting in X, it is not the same as the window title/label");
|
|||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
virtual wxString , GetName() const,
|
virtual wxString , GetName() const,
|
||||||
"Returns the window's name. This name is not guaranteed to be
|
"Returns the windows name. This name is not guaranteed to be
|
||||||
unique; it is up to the programmer to supply an appropriate name
|
unique; it is up to the programmer to supply an appropriate name
|
||||||
in the window constructor or via wx.Window.SetName.");
|
in the window constructor or via wx.Window.SetName.");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
void , SetWindowVariant( wxWindowVariant variant ),
|
void , SetWindowVariant( wxWindowVariant variant ),
|
||||||
"Sets the variant of the window/font size to use for this window,
|
"Sets the variant of the window/font size to use for this window,
|
||||||
if the platform supports variants, (for example, wxMac.)");
|
if the platform supports variants, for example, wxMac. Variant values are:
|
||||||
|
|
||||||
|
wx.WINDOW_VARIANT_NORMAL Normal size
|
||||||
|
wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
|
||||||
|
wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
|
||||||
|
wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
|
||||||
|
");
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
wxWindowVariant , GetWindowVariant() const,
|
wxWindowVariant , GetWindowVariant() const,
|
||||||
@@ -1119,9 +1146,29 @@ exposed.");
|
|||||||
// colours, fonts and cursors
|
// colours, fonts and cursors
|
||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
// set/retrieve the window colours (system defaults are used by
|
|
||||||
// default): Set functions return True if colour was changed
|
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxVisualAttributes , GetDefaultAttributes() const,
|
||||||
|
"Get the default attributes for an instance of this class. This
|
||||||
|
is useful if you want to use the same font or colour in your own
|
||||||
|
control as in a standard control -- which is a much better idea
|
||||||
|
than hard coding specific colours or fonts which might look
|
||||||
|
completely out of place on the users system, especially if it
|
||||||
|
uses themes.");
|
||||||
|
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
static wxVisualAttributes ,
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL),
|
||||||
|
"Get the default attributes for this class. This is useful if
|
||||||
|
you want to use the same font or colour in your own control as
|
||||||
|
in a standard control -- which is a much better idea than hard
|
||||||
|
coding specific colours or fonts which might look completely out
|
||||||
|
of place on the users system, especially if it uses themes.
|
||||||
|
|
||||||
|
The variant parameter is only relevant under Mac currently and is
|
||||||
|
ignore under other platforms. Under Mac, it will change the size of the
|
||||||
|
returned font. See SetWindowVariant for more about this.");
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
|
@@ -79,6 +79,7 @@ wxListBoxNameStr = wx.controls.ListBoxNameStr
|
|||||||
wxListBox = wx.controls.ListBox
|
wxListBox = wx.controls.ListBox
|
||||||
wxListBoxPtr = wx.controls.ListBoxPtr
|
wxListBoxPtr = wx.controls.ListBoxPtr
|
||||||
wxPreListBox = wx.controls.PreListBox
|
wxPreListBox = wx.controls.PreListBox
|
||||||
|
wxListBox_GetClassDefaultAttributes = wx.controls.ListBox_GetClassDefaultAttributes
|
||||||
wxCheckListBox = wx.controls.CheckListBox
|
wxCheckListBox = wx.controls.CheckListBox
|
||||||
wxCheckListBoxPtr = wx.controls.CheckListBoxPtr
|
wxCheckListBoxPtr = wx.controls.CheckListBoxPtr
|
||||||
wxPreCheckListBox = wx.controls.PreCheckListBox
|
wxPreCheckListBox = wx.controls.PreCheckListBox
|
||||||
@@ -332,6 +333,7 @@ wxEVT_COMMAND_LIST_ITEM_FOCUSED = wx.controls.wxEVT_COMMAND_LIST_ITEM_FOCUSED
|
|||||||
wxListCtrl = wx.controls.ListCtrl
|
wxListCtrl = wx.controls.ListCtrl
|
||||||
wxListCtrlPtr = wx.controls.ListCtrlPtr
|
wxListCtrlPtr = wx.controls.ListCtrlPtr
|
||||||
wxPreListCtrl = wx.controls.PreListCtrl
|
wxPreListCtrl = wx.controls.PreListCtrl
|
||||||
|
wxListCtrl_GetClassDefaultAttributes = wx.controls.ListCtrl_GetClassDefaultAttributes
|
||||||
wxListView = wx.controls.ListView
|
wxListView = wx.controls.ListView
|
||||||
wxListViewPtr = wx.controls.ListViewPtr
|
wxListViewPtr = wx.controls.ListViewPtr
|
||||||
wxPreListView = wx.controls.PreListView
|
wxPreListView = wx.controls.PreListView
|
||||||
@@ -400,6 +402,7 @@ wxTreeEventPtr = wx.controls.TreeEventPtr
|
|||||||
wxTreeCtrl = wx.controls.TreeCtrl
|
wxTreeCtrl = wx.controls.TreeCtrl
|
||||||
wxTreeCtrlPtr = wx.controls.TreeCtrlPtr
|
wxTreeCtrlPtr = wx.controls.TreeCtrlPtr
|
||||||
wxPreTreeCtrl = wx.controls.PreTreeCtrl
|
wxPreTreeCtrl = wx.controls.PreTreeCtrl
|
||||||
|
wxTreeCtrl_GetClassDefaultAttributes = wx.controls.TreeCtrl_GetClassDefaultAttributes
|
||||||
wxDirDialogDefaultFolderStr = wx.controls.DirDialogDefaultFolderStr
|
wxDirDialogDefaultFolderStr = wx.controls.DirDialogDefaultFolderStr
|
||||||
wxDIRCTRL_DIR_ONLY = wx.controls.DIRCTRL_DIR_ONLY
|
wxDIRCTRL_DIR_ONLY = wx.controls.DIRCTRL_DIR_ONLY
|
||||||
wxDIRCTRL_SELECT_FIRST = wx.controls.DIRCTRL_SELECT_FIRST
|
wxDIRCTRL_SELECT_FIRST = wx.controls.DIRCTRL_SELECT_FIRST
|
||||||
|
@@ -964,11 +964,13 @@ wxAcceleratorTablePtr = wx.core.AcceleratorTablePtr
|
|||||||
wxNullAcceleratorTable = wx.core.NullAcceleratorTable
|
wxNullAcceleratorTable = wx.core.NullAcceleratorTable
|
||||||
wxGetAccelFromString = wx.core.GetAccelFromString
|
wxGetAccelFromString = wx.core.GetAccelFromString
|
||||||
wxPanelNameStr = wx.core.PanelNameStr
|
wxPanelNameStr = wx.core.PanelNameStr
|
||||||
wxWINDOW_VARIANT_DEFAULT = wx.core.WINDOW_VARIANT_DEFAULT
|
wxVisualAttributes = wx.core.VisualAttributes
|
||||||
|
wxVisualAttributesPtr = wx.core.VisualAttributesPtr
|
||||||
wxWINDOW_VARIANT_NORMAL = wx.core.WINDOW_VARIANT_NORMAL
|
wxWINDOW_VARIANT_NORMAL = wx.core.WINDOW_VARIANT_NORMAL
|
||||||
wxWINDOW_VARIANT_SMALL = wx.core.WINDOW_VARIANT_SMALL
|
wxWINDOW_VARIANT_SMALL = wx.core.WINDOW_VARIANT_SMALL
|
||||||
wxWINDOW_VARIANT_MINI = wx.core.WINDOW_VARIANT_MINI
|
wxWINDOW_VARIANT_MINI = wx.core.WINDOW_VARIANT_MINI
|
||||||
wxWINDOW_VARIANT_LARGE = wx.core.WINDOW_VARIANT_LARGE
|
wxWINDOW_VARIANT_LARGE = wx.core.WINDOW_VARIANT_LARGE
|
||||||
|
wxWINDOW_VARIANT_MAX = wx.core.WINDOW_VARIANT_MAX
|
||||||
wxWindow = wx.core.Window
|
wxWindow = wx.core.Window
|
||||||
wxWindowPtr = wx.core.WindowPtr
|
wxWindowPtr = wx.core.WindowPtr
|
||||||
wxPreWindow = wx.core.PreWindow
|
wxPreWindow = wx.core.PreWindow
|
||||||
@@ -977,6 +979,7 @@ wxWindow_NextControlId = wx.core.Window_NextControlId
|
|||||||
wxWindow_PrevControlId = wx.core.Window_PrevControlId
|
wxWindow_PrevControlId = wx.core.Window_PrevControlId
|
||||||
wxWindow_FindFocus = wx.core.Window_FindFocus
|
wxWindow_FindFocus = wx.core.Window_FindFocus
|
||||||
wxWindow_GetCapture = wx.core.Window_GetCapture
|
wxWindow_GetCapture = wx.core.Window_GetCapture
|
||||||
|
wxWindow_GetClassDefaultAttributes = wx.core.Window_GetClassDefaultAttributes
|
||||||
wxFindWindowById = wx.core.FindWindowById
|
wxFindWindowById = wx.core.FindWindowById
|
||||||
wxFindWindowByName = wx.core.FindWindowByName
|
wxFindWindowByName = wx.core.FindWindowByName
|
||||||
wxFindWindowByLabel = wx.core.FindWindowByLabel
|
wxFindWindowByLabel = wx.core.FindWindowByLabel
|
||||||
@@ -1000,6 +1003,7 @@ wxControlNameStr = wx.core.ControlNameStr
|
|||||||
wxControl = wx.core.Control
|
wxControl = wx.core.Control
|
||||||
wxControlPtr = wx.core.ControlPtr
|
wxControlPtr = wx.core.ControlPtr
|
||||||
wxPreControl = wx.core.PreControl
|
wxPreControl = wx.core.PreControl
|
||||||
|
wxControl_GetClassDefaultAttributes = wx.core.Control_GetClassDefaultAttributes
|
||||||
wxItemContainer = wx.core.ItemContainer
|
wxItemContainer = wx.core.ItemContainer
|
||||||
wxItemContainerPtr = wx.core.ItemContainerPtr
|
wxItemContainerPtr = wx.core.ItemContainerPtr
|
||||||
wxControlWithItems = wx.core.ControlWithItems
|
wxControlWithItems = wx.core.ControlWithItems
|
||||||
|
Reference in New Issue
Block a user