Finished initial review of the rest of the [c*] interface headers.

Turned on wxPython and wxPerl doc sections as they should be on by default (in
tradition of the old manual for now).
Removed double border on tables for definition lists (we should work on nicer
looking tables for everything, but it can wait).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2008-04-14 05:36:08 +00:00
parent 9ef1ad0d2c
commit dc215c81ff
4 changed files with 209 additions and 437 deletions

View File

@@ -147,7 +147,7 @@ ALIASES += endTable="</table></center>"
# In any case a definition list differs from a table because of its semantic # In any case a definition list differs from a table because of its semantic
# nature and because it is always the association of a "title" with a "description" # nature and because it is always the association of a "title" with a "description"
# (in contrast a table may have more than 2 columns of data)... # (in contrast a table may have more than 2 columns of data)...
ALIASES += beginDefList="<table class='doclist'>" ALIASES += beginDefList="<table class='doclist' border='1' cellspacing='0'>"
ALIASES += itemdef{2}="<tr><td><span class='itemdef'>\1</span></td> <td>\2</td></tr>" ALIASES += itemdef{2}="<tr><td><span class='itemdef'>\1</span></td> <td>\2</td></tr>"
ALIASES += itemdef{3}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3</td></tr>" ALIASES += itemdef{3}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3</td></tr>"
ALIASES += itemdef{4}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3,\4</td></tr>" ALIASES += itemdef{4}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3,\4</td></tr>"
@@ -160,9 +160,9 @@ ALIASES += itemdef{10}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3,\
ALIASES += endDefList="</table>" ALIASES += endDefList="</table>"
# See ENABLED_SECTIONS configuration key for more info about these: # See ENABLED_SECTIONS configuration key for more info about these:
ALIASES += beginWxPerlOnly="\if WXPERL_MANUAL \n <b>wxPerl note</b>\n\n" ALIASES += beginWxPerlOnly="\if WXPERL_MANUAL \n <b>wxPerl Note:</b>\n\n"
ALIASES += endWxPerlOnly="\endif" ALIASES += endWxPerlOnly="\endif"
ALIASES += beginWxPythonOnly="\if WXPYTHON_MANUAL \n <b>wxPython note</b>\n\n" ALIASES += beginWxPythonOnly="\if WXPYTHON_MANUAL \n <b>wxPython Note:</b>\n\n"
ALIASES += endWxPythonOnly="\endif" ALIASES += endWxPythonOnly="\endif"
# This is to get around a bug in Doxygen that prevents use of '{' or '}' # This is to get around a bug in Doxygen that prevents use of '{' or '}'
@@ -198,7 +198,7 @@ GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES GENERATE_DEPRECATEDLIST= YES
# can contain WXPERL_MANUAL, WXPYTHON_MANUAL keywords # can contain WXPERL_MANUAL, WXPYTHON_MANUAL keywords
ENABLED_SECTIONS = ENABLED_SECTIONS = WXPERL_MANUAL WXPYTHON_MANUAL
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES SHOW_USED_FILES = YES

View File

@@ -14,7 +14,7 @@
context-sensitive help to show the help text for the given window. context-sensitive help to show the help text for the given window.
The current help provider must be explicitly set by the application using The current help provider must be explicitly set by the application using
wxHelpProvider::Set(). Set().
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@@ -29,7 +29,7 @@ public:
/** /**
Virtual destructor for any base class. Virtual destructor for any base class.
*/ */
~wxHelpProvider(); virtual ~wxHelpProvider();
/** /**
Associates the text with the given window. Associates the text with the given window.
@@ -69,7 +69,6 @@ public:
*/ */
virtual wxString GetHelp(const wxWindowBase* window); virtual wxString GetHelp(const wxWindowBase* window);
/** /**
Removes the association between the window pointer and the help text. Removes the association between the window pointer and the help text.
This is called by the wxWindow destructor. Without this, the table of This is called by the wxWindow destructor. Without this, the table of
@@ -99,8 +98,7 @@ public:
This function may be overridden to show help for the window when it This function may be overridden to show help for the window when it
should depend on the position inside the window, By default this method should depend on the position inside the window, By default this method
forwards to ShowHelp(), so it is enough to only implement the latter if forwards to ShowHelp(), so it is enough to only implement the latter if
the help doesn't depend on the position. Returns @true if help was the help doesn't depend on the position.
shown, or @false if no help was available for this window.
@param window @param window
Window to show help text for. Window to show help text for.
@@ -108,9 +106,14 @@ public:
Coordinates of the mouse at the moment of help event emission. Coordinates of the mouse at the moment of help event emission.
@param origin @param origin
Help event origin, see wxHelpEvent::GetOrigin. Help event origin, see wxHelpEvent::GetOrigin.
@returns @true if help was shown, or @false if no help was available
for this window.
@wxsince{2.7.0}
*/ */
virtual bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point, virtual bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point,
wxHelpEvent::Origin origin); wxHelpEvent::Origin origin);
}; };
@@ -121,7 +124,7 @@ public:
wxHelpControllerHelpProvider is an implementation of wxHelpProvider which wxHelpControllerHelpProvider is an implementation of wxHelpProvider which
supports both context identifiers and plain text help strings. If the help supports both context identifiers and plain text help strings. If the help
text is an integer, it is passed to wxHelpController::DisplayContextPopup. text is an integer, it is passed to wxHelpController::DisplayContextPopup().
Otherwise, it shows the string in a tooltip as per wxSimpleHelpProvider. If Otherwise, it shows the string in a tooltip as per wxSimpleHelpProvider. If
you use this with a wxCHMHelpController instance on windows, it will use you use this with a wxCHMHelpController instance on windows, it will use
the native style of tip window instead of wxTipWindow. the native style of tip window instead of wxTipWindow.
@@ -197,6 +200,7 @@ public:
/** /**
Constructs a context help object, calling BeginContextHelp() if Constructs a context help object, calling BeginContextHelp() if
@a doNow is @true (the default). @a doNow is @true (the default).
If @a window is @NULL, the top window is used. If @a window is @NULL, the top window is used.
*/ */
wxContextHelp(wxWindow* window = NULL, bool doNow = true); wxContextHelp(wxWindow* window = NULL, bool doNow = true);
@@ -258,11 +262,14 @@ public:
@param pos @param pos
Button position. Button position.
@param size @param size
Button size. If wxDefaultSize is specified then the button is Button size. If wxDefaultSize is specified then the button is sized
sized
appropriately for the question mark bitmap. appropriately for the question mark bitmap.
@param style @param style
Window style. Window style.
@remarks
Normally you only need pass the parent window to the constructor, and
use the defaults for the remaining parameters.
*/ */
wxContextHelpButton(wxWindow* parent, wxContextHelpButton(wxWindow* parent,
wxWindowID id = wxID_CONTEXT_HELP, wxWindowID id = wxID_CONTEXT_HELP,

View File

@@ -8,6 +8,7 @@
/** /**
@class wxItemContainerImmutable
@wxheader{ctrlsub.h} @wxheader{ctrlsub.h}
wxItemContainer defines an interface which is implemented by all controls wxItemContainer defines an interface which is implemented by all controls
@@ -49,7 +50,6 @@ public:
*/ */
bool IsEmpty() const; bool IsEmpty() const;
/** /**
Returns the label of the item with the given index. Returns the label of the item with the given index.
@@ -91,8 +91,7 @@ public:
//@} //@}
// selection /// @name Selection
// ---------
//@{ //@{
/** /**
@@ -155,6 +154,7 @@ public:
/** /**
@class wxItemContainer
@wxheader{ctrlsub.h} @wxheader{ctrlsub.h}
This class is an abstract base class for some wxWidgets controls which This class is an abstract base class for some wxWidgets controls which
@@ -175,13 +175,13 @@ public:
simply stored by the control but not used in any way by it, or typed simply stored by the control but not used in any way by it, or typed
pointers (wxClientData*) which are owned by the control meaning that the pointers (wxClientData*) which are owned by the control meaning that the
typed client data (and only it) will be deleted when an item is deleted typed client data (and only it) will be deleted when an item is deleted
using wxItemContainer::Delete() or the entire control is cleared using using Delete() or the entire control is cleared using Clear(), which also
wxItemContainer::Clear(), which also happens when it is destroyed. happens when it is destroyed.
Finally note that in the same control all items must have client data of Finally note that in the same control all items must have client data of
the same type (typed or untyped), if any. This type is determined by the the same type (typed or untyped), if any. This type is determined by the
first call to wxItemContainer::Append() (the version with client data first call to Append() (the version with client data pointer) or
pointer) or wxItemContainer::SetClientData(). SetClientData().
Note that this is not a control, it's a mixin interface that classes Note that this is not a control, it's a mixin interface that classes
have to derive from in addition to wxControl or wxWindow. Convenience have to derive from in addition to wxControl or wxWindow. Convenience

View File

@@ -12,32 +12,90 @@
A cursor is a small bitmap usually used for denoting where the mouse A cursor is a small bitmap usually used for denoting where the mouse
pointer is, with a picture that might indicate the interpretation of a pointer is, with a picture that might indicate the interpretation of a
mouse click. As with icons, cursors in X and MS Windows are created mouse click. As with icons, cursors in X and MS Windows are created in a
in a different manner. Therefore, separate cursors will be created for the different manner. Therefore, separate cursors will be created for the
different environments. Platform-specific methods for creating a @b wxCursor different environments. Platform-specific methods for creating a wxCursor
object are catered for, and this is an occasion where object are catered for, and this is an occasion where conditional
conditional compilation will probably be required (see wxIcon for compilation will probably be required (see wxIcon for an example).
an example).
A single cursor object may be used in many windows (any subwindow type). A single cursor object may be used in many windows (any subwindow type).
The wxWidgets convention is to set the cursor for a window, as in X, The wxWidgets convention is to set the cursor for a window, as in X, rather
rather than to set it globally as in MS Windows, although a than to set it globally as in MS Windows, although a global wxSetCursor()
global ::wxSetCursor is also available for MS Windows use. function is also available for MS Windows use.
@section cursor_custom Creating a Custom Cursor
The following is an example of creating a cursor from 32x32 bitmap data
(down_bits) and a mask (down_mask) where 1 is black and 0 is white for the
bits, and 1 is opaque and 0 is transparent for the mask. It works on
Windows and GTK+.
@code
static char down_bits[] = { 255, 255, 255, 255, 31,
255, 255, 255, 31, 255, 255, 255, 31, 255, 255, 255,
31, 255, 255, 255, 31, 255, 255, 255, 31, 255, 255,
255, 31, 255, 255, 255, 31, 255, 255, 255, 25, 243,
255, 255, 19, 249, 255, 255, 7, 252, 255, 255, 15, 254,
255, 255, 31, 255, 255, 255, 191, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255 };
static char down_mask[] = { 240, 1, 0, 0, 240, 1,
0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1,
0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 255, 31, 0, 0, 255,
31, 0, 0, 254, 15, 0, 0, 252, 7, 0, 0, 248, 3, 0, 0,
240, 1, 0, 0, 224, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
#ifdef __WXMSW__
wxBitmap down_bitmap(down_bits, 32, 32);
wxBitmap down_mask_bitmap(down_mask, 32, 32);
down_bitmap.SetMask(new wxMask(down_mask_bitmap));
wxImage down_image = down_bitmap.ConvertToImage();
down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 6);
down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 14);
wxCursor down_cursor = wxCursor(down_image);
#else
wxCursor down_cursor = wxCursor(down_bits, 32, 32, 6, 14,
down_mask, wxWHITE, wxBLACK);
#endif
@endcode
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
::wxNullCursor, ::wxSTANDARD_CURSOR, ::wxHOURGLASS_CURSOR, ::wxCROSS_CURSOR - ::wxNullCursor
- ::wxSTANDARD_CURSOR
- ::wxHOURGLASS_CURSOR
- ::wxCROSS_CURSOR
@see wxBitmap, wxIcon, wxWindow::SetCursor, ::wxSetCursor @see wxBitmap, wxIcon, wxWindow::SetCursor(), wxSetCursor()
*/ */
class wxCursor : public wxBitmap class wxCursor : public wxBitmap
{ {
public: public:
//@{
/** /**
Copy constructor, uses @ref overview_trefcount "reference counting". Default constructor.
*/
wxCursor();
/**
Constructs a cursor by passing an array of bits (Motif and GTK+ only).
@a maskBits is used only under Motif and GTK+. The parameters @a fg and
@a bg are only present on GTK+, and force the cursor to use particular
background and foreground colours.
If either @a hotSpotX or @a hotSpotY is -1, the hotspot will be the
centre of the cursor image (Motif only).
@param bits @param bits
An array of bits. An array of bits.
@@ -51,401 +109,120 @@ public:
Hotspot x coordinate. Hotspot x coordinate.
@param hotSpotY @param hotSpotY
Hotspot y coordinate. Hotspot y coordinate.
@param type
Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under
Windows,
it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
wxBITMAP_TYPE_MACCURSOR_RESOURCE.
Under X, the permitted cursor types are:
wxBITMAP_TYPE_XBM
Load an X bitmap file.
Under Windows, the permitted types are:
wxBITMAP_TYPE_CUR
Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h).
wxBITMAP_TYPE_CUR_RESOURCE
Load a Windows resource (as specified in the .rc file).
wxBITMAP_TYPE_ICO
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY.
@param cursorId
A stock cursor identifier. May be one of:
wxCURSOR_ARROW
A standard arrow cursor.
wxCURSOR_RIGHT_ARROW
A standard arrow cursor
pointing to the right.
wxCURSOR_BLANK
Transparent cursor.
wxCURSOR_BULLSEYE
Bullseye cursor.
wxCURSOR_CHAR
Rectangular character cursor.
wxCURSOR_CROSS
A cross cursor.
wxCURSOR_HAND
A hand cursor.
wxCURSOR_IBEAM
An I-beam cursor (vertical line).
wxCURSOR_LEFT_BUTTON
Represents a mouse with the left button depressed.
wxCURSOR_MAGNIFIER
A magnifier icon.
wxCURSOR_MIDDLE_BUTTON
Represents a mouse with the middle button depressed.
wxCURSOR_NO_ENTRY
A no-entry sign cursor.
wxCURSOR_PAINT_BRUSH
A paintbrush cursor.
wxCURSOR_PENCIL
A pencil cursor.
wxCURSOR_POINT_LEFT
A cursor that points left.
wxCURSOR_POINT_RIGHT
A cursor that points right.
wxCURSOR_QUESTION_ARROW
An arrow and question mark.
wxCURSOR_RIGHT_BUTTON
Represents a mouse with the right button depressed.
wxCURSOR_SIZENESW
A sizing cursor pointing NE-SW.
wxCURSOR_SIZENS
A sizing cursor pointing N-S.
wxCURSOR_SIZENWSE
A sizing cursor pointing NW-SE.
wxCURSOR_SIZEWE
A sizing cursor pointing W-E.
wxCURSOR_SIZING
A general sizing cursor.
wxCURSOR_SPRAYCAN
A spraycan cursor.
wxCURSOR_WAIT
A wait cursor.
wxCURSOR_WATCH
A watch cursor.
wxCURSOR_ARROWWAIT
A cursor with both an arrow and
an hourglass, (windows.)
Note that not all cursors are available on all platforms.
@param cursor
Pointer or reference to a cursor to copy.
*/ */
wxCursor();
wxCursor(const char bits[], int width, int height, wxCursor(const char bits[], int width, int height,
int hotSpotX = -1, int hotSpotY = -1, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL, const char maskBits[] = NULL,
wxColour* fg = NULL, wxColour* fg = NULL, wxColour* bg = NULL);
wxColour* bg = NULL); /**
Constructs a cursor by passing a string resource name or filename.
On MacOS when specifying a string resource name, first the color
cursors 'crsr' and then the black/white cursors 'CURS' in the resource
chain are scanned through.
@a hotSpotX and @a hotSpotY are currently only used under Windows when
loading from an icon file, to specify the cursor hotspot relative to
the top left of the image.
@param type
Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM.
Under Windows, it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under
MacOS, it defaults to wxBITMAP_TYPE_MACCURSOR_RESOURCE.
Under X, the permitted cursor types are:
<ul>
<li>wxBITMAP_TYPE_XBM - Load an X bitmap file.</li>
</ul>
Under Windows, the permitted types are:
- wxBITMAP_TYPE_CUR - Load a cursor from a .cur cursor file (only
if USE_RESOURCE_LOADING_IN_MSW is enabled in
setup.h).
- wxBITMAP_TYPE_CUR_RESOURCE - Load a Windows resource (as
specified in the .rc file).
- wxBITMAP_TYPE_ICO - Load a cursor from a .ico icon file (only if
USE_RESOURCE_LOADING_IN_MSW is enabled in
setup.h). Specify @a hotSpotX and @a hotSpotY.
@param hotSpotX
Hotspot x coordinate.
@param hotSpotY
Hotspot y coordinate.
*/
wxCursor(const wxString& cursorName, long type, wxCursor(const wxString& cursorName, long type,
int hotSpotX = 0, int hotSpotY = 0); int hotSpotX = 0, int hotSpotY = 0);
/**
Constructs a cursor using a cursor identifier.
@param cursorId
A stock cursor identifier. May be one of the following (note that
not all cursors are available on all platforms):
- wxCURSOR_ARROW - A standard arrow cursor.
- wxCURSOR_RIGHT_ARROW - A standard arrow cursor pointing to the
right.
- wxCURSOR_BLANK - Transparent cursor.
- wxCURSOR_BULLSEYE - Bullseye cursor.
- wxCURSOR_CHAR - Rectangular character cursor.
- wxCURSOR_CROSS - A cross cursor.
- wxCURSOR_HAND - A hand cursor.
- wxCURSOR_IBEAM - An I-beam cursor (vertical line).
- wxCURSOR_LEFT_BUTTON - Represents a mouse with the left button
depressed.
- wxCURSOR_MAGNIFIER - A magnifier icon.
- wxCURSOR_MIDDLE_BUTTON - Represents a mouse with the middle
button depressed.
- wxCURSOR_NO_ENTRY - A no-entry sign cursor.
- wxCURSOR_PAINT_BRUSH - A paintbrush cursor.
- wxCURSOR_PENCIL - A pencil cursor.
- wxCURSOR_POINT_LEFT - A cursor that points left.
- wxCURSOR_POINT_RIGHT - A cursor that points right.
- wxCURSOR_QUESTION_ARROW - An arrow and question mark.
- wxCURSOR_RIGHT_BUTTON - Represents a mouse with the right
button depressed.
- wxCURSOR_SIZENESW - A sizing cursor pointing NE-SW.
- wxCURSOR_SIZENS - A sizing cursor pointing N-S.
- wxCURSOR_SIZENWSE - A sizing cursor pointing NW-SE.
- wxCURSOR_SIZEWE - A sizing cursor pointing W-E.
- wxCURSOR_SIZING - A general sizing cursor.
- wxCURSOR_SPRAYCAN - A spraycan cursor.
- wxCURSOR_WAIT - A wait cursor.
- wxCURSOR_WATCH - A watch cursor.
- wxCURSOR_ARROWWAIT - A cursor with both an arrow and an
hourglass, (windows.)
*/
wxCursor(int cursorId); wxCursor(int cursorId);
/**
Constructs a cursor from a wxImage. If cursor are monochrome on the
current platform, colors with the RGB elements all greater than 127
will be foreground, colors less than this background. The mask (if any)
will be used to specify the transparent area.
In wxMSW the foreground will be white and the background black. If the
cursor is larger than 32x32 it is resized.
In wxGTK, colour cursors and alpha channel are supported (starting from
GTK+ 2.2). Otherwise the two most frequent colors will be used for
foreground and background. In any case, the cursor will be displayed at
the size of the image.
In wxMac, if the cursor is larger than 16x16 it is resized and
currently only shown as black/white (mask respected).
*/
wxCursor(const wxImage& image); wxCursor(const wxImage& image);
/**
Copy constructor, uses @ref overview_refcount "reference counting".
@param cursor
Pointer or reference to a cursor to copy.
*/
wxCursor(const wxCursor& cursor); wxCursor(const wxCursor& cursor);
//@}
/** /**
Destroys the cursor. Destroys the cursor. See
See @ref overview_refcountdestruct "reference-counted object destruction" for @ref overview_refcount_destruct "reference-counted object destruction"
more info. for more info.
A cursor can be reused for more
than one window, and does not get destroyed when the window is A cursor can be reused for more than one window, and does not get
destroyed. wxWidgets destroys all cursors on application exit, although destroyed when the window is destroyed. wxWidgets destroys all cursors
it is best to clean them up explicitly. on application exit, although it is best to clean them up explicitly.
*/ */
~wxCursor(); ~wxCursor();
@@ -455,29 +232,17 @@ public:
bool IsOk() const; bool IsOk() const;
/** /**
Assignment operator, using @ref overview_trefcount "reference counting". Assignment operator, using @ref overview_refcount "reference counting".
*/ */
wxCursor operator =(const wxCursor& cursor); wxCursor operator =(const wxCursor& cursor);
}; };
/**
An empty wxCursor. /** @name Predefined cursors. */
*/ //@{
wxCursor wxNullCursor; wxCursor wxNullCursor;
wxCursor* wxSTANDARD_CURSOR;
/** wxCursor* wxHOURGLASS_CURSOR;
FIXME wxCursor* wxCROSS_CURSOR;
*/ //@}
wxCursor wxSTANDARD_CURSOR;
/**
FIXME
*/
wxCursor wxHOURGLASS_CURSOR;
/**
FIXME
*/
wxCursor wxCROSS_CURSOR;