revised the first two interface headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: aboutdlg.h
|
// Name: aboutdlg.h
|
||||||
// Purpose: documentation for wxAboutDialogInfo class
|
// Purpose: interface of wxAboutDialogInfo
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -18,10 +18,9 @@
|
|||||||
documentation writers, artists and translators. The simple properties from the
|
documentation writers, artists and translators. The simple properties from the
|
||||||
former group are represented as a string with the exception of the program icon
|
former group are represented as a string with the exception of the program icon
|
||||||
and the program web site, while the lists from the latter group are stored as
|
and the program web site, while the lists from the latter group are stored as
|
||||||
wxArrayString and can be either set entirely at once
|
wxArrayString and can be either set entirely at once using
|
||||||
using wxAboutDialogInfo::SetDevelopers and similar
|
wxAboutDialogInfo::SetDevelopers and similar functions or built one by one using
|
||||||
functions or built one by one using wxAboutDialogInfo::AddDeveloper
|
wxAboutDialogInfo::AddDeveloper etc.
|
||||||
etc.
|
|
||||||
|
|
||||||
Please also notice that while all the main platforms have the native
|
Please also notice that while all the main platforms have the native
|
||||||
implementation of the about dialog, they are often more limited than the
|
implementation of the about dialog, they are often more limited than the
|
||||||
@@ -44,9 +43,7 @@ class wxAboutDialogInfo
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Default constructor leaves all fields are initially uninitialized, in general
|
Default constructor leaves all fields are initially uninitialized, in general
|
||||||
you should call at least SetVersion(),
|
you should call at least SetVersion(), SetCopyright() and SetDescription().
|
||||||
SetCopyright() and
|
|
||||||
SetDescription().
|
|
||||||
*/
|
*/
|
||||||
wxAboutDialogInfo();
|
wxAboutDialogInfo();
|
||||||
|
|
||||||
@@ -73,10 +70,10 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Adds a translator name to be shown in the program credits. Notice that if no
|
Adds a translator name to be shown in the program credits. Notice that if no
|
||||||
translator names are specified explicitely, wxAboutBox
|
translator names are specified explicitely, wxAboutBox will try to use the
|
||||||
will try to use the translation of the string @c translator-credits from
|
translation of the string @c translator-credits from the currently used message
|
||||||
the currently used message catalog -- this can be used to show just the name of
|
catalog -- this can be used to show just the name of the translator of the
|
||||||
the translator of the program in the current language.
|
program in the current language.
|
||||||
|
|
||||||
@see SetTranslators()
|
@see SetTranslators()
|
||||||
*/
|
*/
|
||||||
@@ -127,6 +124,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Set the long, multiline string containing the text of the program licence.
|
Set the long, multiline string containing the text of the program licence.
|
||||||
|
|
||||||
Only GTK+ version supports showing the licence text in the native about dialog
|
Only GTK+ version supports showing the licence text in the native about dialog
|
||||||
currently so the generic version will be used under all the other platforms if
|
currently so the generic version will be used under all the other platforms if
|
||||||
this method is called. To preserve the native look and feel it is advised that
|
this method is called. To preserve the native look and feel it is advised that
|
||||||
@@ -147,22 +145,21 @@ public:
|
|||||||
void SetName(const wxString& name);
|
void SetName(const wxString& name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the list of translators. Please see
|
Set the list of translators. Please see AddTranslator() for additional
|
||||||
AddTranslator() for additional
|
|
||||||
discussion.
|
discussion.
|
||||||
*/
|
*/
|
||||||
void SetTranslators(const wxArrayString& translators);
|
void SetTranslators(const wxArrayString& translators);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the version of the program. The version is in free format, i.e. not
|
Set the version of the program. The version is in free format, i.e. not
|
||||||
necessarily in the @c x.y.z form but it shouldn't contain the "version"
|
necessarily in the @c x.y.z form but it shouldn't contain the "version" word.
|
||||||
word.
|
|
||||||
*/
|
*/
|
||||||
void SetVersion(const wxString& version);
|
void SetVersion(const wxString& version);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the web site for the program and its description (which defaults to URL
|
Set the web site for the program and its description (which defaults to @a url
|
||||||
itself if empty).
|
itself if empty).
|
||||||
|
|
||||||
Please notice that only GTK+ version currently supports showing the link in the
|
Please notice that only GTK+ version currently supports showing the link in the
|
||||||
native about dialog so if this method is called, the generic version will be
|
native about dialog so if this method is called, the generic version will be
|
||||||
used under all the other platforms.
|
used under all the other platforms.
|
||||||
@@ -178,10 +175,11 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function shows the standard about dialog containing the information
|
This function shows the standard about dialog containing the information
|
||||||
specified in @e info. If the current platform has a native about dialog
|
specified in @a info. If the current platform has a native about dialog
|
||||||
which is capable of showing all the fields in @e info, the native dialog is
|
which is capable of showing all the fields in @a info, the native dialog is
|
||||||
used, otherwise the function falls back to the generic wxWidgets version of the
|
used, otherwise the function falls back to the generic wxWidgets version of
|
||||||
dialog, i.e. does the same thing as wxGenericAboutBox.
|
the dialog, i.e. does the same thing as wxGenericAboutBox.
|
||||||
|
|
||||||
Here is an example of how this function may be used:
|
Here is an example of how this function may be used:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
@@ -197,20 +195,21 @@ public:
|
|||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
Please see the @ref overview_sampledialogs "dialogs sample" for more examples of
|
Please see the @ref page_utils_samples_dialogs for more examples of
|
||||||
using this function and wxAboutDialogInfo for the
|
using this function and wxAboutDialogInfo for the description of the
|
||||||
description of the information which can be shown in the about dialog.
|
information which can be shown in the about dialog.
|
||||||
*/
|
*/
|
||||||
void wxAboutBox(const wxAboutDialogInfo& info);
|
void wxAboutBox(const wxAboutDialogInfo& info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function does the same thing as wxAboutBox except
|
This function does the same thing as wxAboutBox except that it always uses
|
||||||
that it always uses the generic wxWidgets version of the dialog instead of the
|
the generic wxWidgets version of the dialog instead of the native one.
|
||||||
native one. This is mainly useful if you need to customize the dialog by e.g.
|
|
||||||
adding custom controls to it (customizing the native dialog is not currently
|
This is mainly useful if you need to customize the dialog by e.g. adding
|
||||||
|
custom controls to it (customizing the native dialog is not currently
|
||||||
supported).
|
supported).
|
||||||
See the @ref overview_sampledialogs "dialogs sample" for an example of about
|
|
||||||
dialog
|
See the @ref page_utils_samples_dialogs for an example of about dialog
|
||||||
customization.
|
customization.
|
||||||
|
|
||||||
@see wxAboutDialogInfo
|
@see wxAboutDialogInfo
|
||||||
|
@@ -1,17 +1,38 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: accel.h
|
// Name: accel.h
|
||||||
// Purpose: documentation for wxAcceleratorEntry class
|
// Purpose: interface of wxAccelerator* classes
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/** wxAcceleratorEntry flags */
|
||||||
|
enum wxAcceleratorEntryFlags
|
||||||
|
{
|
||||||
|
/** no modifiers */
|
||||||
|
wxACCEL_NORMAL,
|
||||||
|
|
||||||
|
/** hold Alt key down */
|
||||||
|
wxACCEL_ALT,
|
||||||
|
|
||||||
|
/** hold Ctrl key down */
|
||||||
|
wxACCEL_CTRL,
|
||||||
|
|
||||||
|
/** hold Shift key down */
|
||||||
|
wxACCEL_SHIFT,
|
||||||
|
|
||||||
|
/** Command key on OS X; identic to wxACCEL_CTRL on other platforms. */
|
||||||
|
wxACCEL_CMD
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxAcceleratorEntry
|
@class wxAcceleratorEntry
|
||||||
@wxheader{accel.h}
|
@wxheader{accel.h}
|
||||||
|
|
||||||
An object used by an application wishing to create an @ref
|
An object used by an application wishing to create an accelerator table
|
||||||
overview_wxacceleratortable "accelerator table".
|
(see wxAcceleratorTable).
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{FIXME}
|
@category{FIXME}
|
||||||
@@ -22,22 +43,23 @@
|
|||||||
class wxAcceleratorEntry
|
class wxAcceleratorEntry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
/**
|
||||||
|
Default ctor.
|
||||||
|
*/
|
||||||
|
wxAcceleratorEntry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructor.
|
Constructor.
|
||||||
|
|
||||||
@param flags
|
@param flags
|
||||||
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL.
|
A combination of the wxAcceleratorEntryFlags values, which
|
||||||
Indicates
|
indicates which modifier keys are held down.
|
||||||
which modifier key is held down.
|
|
||||||
@param keyCode
|
@param keyCode
|
||||||
The keycode to be detected. See Keycodes for a full list of keycodes.
|
The keycode to be detected. See @ref page_keycodes for a full list of keycodes.
|
||||||
@param cmd
|
@param cmd
|
||||||
The menu or control command identifier.
|
The menu or control command identifier.
|
||||||
*/
|
*/
|
||||||
wxAcceleratorEntry();
|
|
||||||
wxAcceleratorEntry(int flags, int keyCode, int cmd);
|
wxAcceleratorEntry(int flags, int keyCode, int cmd);
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the command identifier for the accelerator table entry.
|
Returns the command identifier for the accelerator table entry.
|
||||||
@@ -58,13 +80,13 @@ public:
|
|||||||
Sets the accelerator entry parameters.
|
Sets the accelerator entry parameters.
|
||||||
|
|
||||||
@param flags
|
@param flags
|
||||||
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL.
|
A combination of the wxAcceleratorEntryFlags values, which
|
||||||
Indicates
|
indicates which modifier keys are held down.
|
||||||
which modifier key is held down.
|
|
||||||
@param keyCode
|
@param keyCode
|
||||||
The keycode to be detected. See Keycodes for a full list of keycodes.
|
The keycode to be detected. See @ref page_keycodes for a full list of keycodes.
|
||||||
@param cmd
|
@param cmd
|
||||||
The menu or control command identifier.
|
The menu or control command identifier.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
void Set(int flags, int keyCode, int cmd);
|
void Set(int flags, int keyCode, int cmd);
|
||||||
};
|
};
|
||||||
@@ -75,20 +97,35 @@ public:
|
|||||||
@wxheader{accel.h}
|
@wxheader{accel.h}
|
||||||
|
|
||||||
An accelerator table allows the application to specify a table of keyboard
|
An accelerator table allows the application to specify a table of keyboard
|
||||||
shortcuts for
|
shortcuts for menus or other commands. On Windows and Mac OS X, menu or button
|
||||||
menus or other commands. On Windows and Mac OS X, menu or button commands are
|
commands are supported; on GTK, only menu commands are supported.
|
||||||
supported; on GTK,
|
|
||||||
only menu commands are supported.
|
|
||||||
|
|
||||||
The object @b wxNullAcceleratorTable is defined to be a table with no data, and
|
The object #wxNullAcceleratorTable is defined to be a table with no data, and
|
||||||
is the
|
is the initial accelerator table for a window.
|
||||||
initial accelerator table for a window.
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
@code
|
||||||
|
wxAcceleratorEntry entries[4];
|
||||||
|
entries[0].Set(wxACCEL_CTRL, (int) 'N', ID_NEW_WINDOW);
|
||||||
|
entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_EXIT);
|
||||||
|
entries[2].Set(wxACCEL_SHIFT, (int) 'A', ID_ABOUT);
|
||||||
|
entries[3].Set(wxACCEL_NORMAL, WXK_DELETE, wxID_CUT);
|
||||||
|
|
||||||
|
wxAcceleratorTable accel(4, entries);
|
||||||
|
frame->SetAcceleratorTable(accel);
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
@remarks
|
||||||
|
An accelerator takes precedence over normal processing and can be a convenient
|
||||||
|
way to program some event handling. For example, you can use an accelerator table
|
||||||
|
to enable a dialog with a multi-line text control to accept CTRL-Enter as meaning
|
||||||
|
'OK' (but not in GTK+ at present).
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{misc}
|
@category{misc}
|
||||||
|
|
||||||
@stdobjects
|
@stdobjects
|
||||||
Objects:
|
|
||||||
wxNullAcceleratorTable
|
wxNullAcceleratorTable
|
||||||
|
|
||||||
@seealso
|
@seealso
|
||||||
@@ -97,27 +134,38 @@ public:
|
|||||||
class wxAcceleratorTable : public wxObject
|
class wxAcceleratorTable : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Loads the accelerator table from a Windows resource (Windows only).
|
Default ctor.
|
||||||
|
*/
|
||||||
|
wxAcceleratorTable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Copy ctor.
|
||||||
|
*/
|
||||||
|
wxAcceleratorTable(const wxAcceleratorTable& bitmap);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes the accelerator table from an array of wxAcceleratorEntry.
|
||||||
|
|
||||||
@param n
|
@param n
|
||||||
Number of accelerator entries.
|
Number of accelerator entries.
|
||||||
@param entries
|
@param entries
|
||||||
The array of entries.
|
The array of entries.
|
||||||
|
*/
|
||||||
|
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Loads the accelerator table from a Windows resource (Windows only).
|
||||||
|
|
||||||
@param resource
|
@param resource
|
||||||
Name of a Windows accelerator.
|
Name of a Windows accelerator.
|
||||||
*/
|
*/
|
||||||
wxAcceleratorTable();
|
|
||||||
wxAcceleratorTable(const wxAcceleratorTable& bitmap);
|
|
||||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
|
|
||||||
wxAcceleratorTable(const wxString& resource);
|
wxAcceleratorTable(const wxString& resource);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys the wxAcceleratorTable object.
|
Destroys the wxAcceleratorTable object.
|
||||||
See @ref overview_refcountdestruct "reference-counted object destruction" for
|
See @ref overview_refcount_destruct for more info.
|
||||||
more info.
|
|
||||||
*/
|
*/
|
||||||
~wxAcceleratorTable();
|
~wxAcceleratorTable();
|
||||||
|
|
||||||
@@ -127,10 +175,15 @@ public:
|
|||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Assignment operator, using @ref overview_trefcount "reference counting".
|
Assignment operator, using @ref overview_refcount "reference counting".
|
||||||
|
|
||||||
@param accel
|
@param accel
|
||||||
Accelerator table to assign.
|
Accelerator table to assign.
|
||||||
*/
|
*/
|
||||||
wxAcceleratorTable operator =(const wxAcceleratorTable& accel);
|
wxAcceleratorTable operator =(const wxAcceleratorTable& accel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
An empty accelerator table.
|
||||||
|
*/
|
||||||
|
wxAcceleratorTable wxNullAcceleratorTable;
|
||||||
|
Reference in New Issue
Block a user