class wxSVGFileDC : public wxDC
{
public:
- //@{
/**
- Constructors:
- a filename @a f with default size 340x240 at 72.0 dots per inch (a frequent
- screen resolution).
- a filename @a f with size @a Width by @a Height at 72.0 dots per inch
- a filename @a f with size @a Width by @a Height at @a dpi resolution.
+ Initializes a wxSVGFileDC with the given @a f filename with a default
+ size (340x240) at 72.0 dots per inch (a frequent screen resolution).
*/
wxSVGFileDC(wxString f);
+ /**
+ Initializes a wxSVGFileDC with the given @a f filename with the given
+ @a Width and @a Height at 72.0 dots per inch.
+ */
wxSVGFileDC(wxString f, int Width, int Height);
+ /**
+ Initializes a wxSVGFileDC with the given @a f filename with the given
+ @a Width and @a Height at @a dpi resolution.
+ */
wxSVGFileDC(wxString f, int Width, int Height, float dpi);
- //@}
/**
Destructor.
~wxSVGFileDC();
/**
- Does nothing
- */
-
-
- /**
- As wxDC: Copy from a source DC to this DC, specifying the destination
+ Copies from a source DC to this DC, specifying the destination
coordinates, size of area to copy, source DC, source coordinates,
- logical function, whether to use a bitmap mask, and mask source position.
+ logical function, whether to use a bitmap mask, and mask source
+ position.
+
+ @see wxDC::Blit()
*/
- bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width,
- wxCoord height, wxSVGFileDC* source,
- wxCoord xsrc, wxCoord ysrc,
- int logicalFunc = wxCOPY,
- bool useMask = FALSE,
- wxCoord xsrcMask = -1,
- wxCoord ysrcMask = -1);
+ bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxSVGFileDC* source, wxCoord xsrc, wxCoord ysrc,
+ int logicalFunc = wxCOPY, bool useMask = FALSE,
+ wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
/**
- Adds the specified point to the bounding box which can be retrieved with
- wxDC::MinX, wxDC::MaxX and
- wxDC::MinY, wxDC::MaxY functions.
+ Adds the specified point to the bounding box which can be retrieved
+ with wxDC::MinX(), wxDC::MaxX() and wxDC::MinY(), wxDC::MaxY()
+ functions.
*/
void CalcBoundingBox(wxCoord x, wxCoord y);
/**
- This makes no sense in wxSVGFileDC and does nothing
+ This makes no sense in wxSVGFileDC and does nothing.
*/
void Clear();
/**
- Not Implemented
+ Not Implemented.
*/
void CrossHair(wxCoord x, wxCoord y);
/**
- Not Implemented
+ Not Implemented.
*/
void DestroyClippingRegion();
wxCoord DeviceToLogicalX(wxCoord x);
/**
- Convert device X coordinate to relative logical coordinate, using the current
- mapping mode but ignoring the x axis orientation.
- Use this function for converting a width, for example.
+ Convert device X coordinate to relative logical coordinate, using the
+ current mapping mode but ignoring the x axis orientation. Use this
+ function for converting a width, for example.
*/
wxCoord DeviceToLogicalXRel(wxCoord x);
wxCoord DeviceToLogicalY(wxCoord y);
/**
- Convert device Y coordinate to relative logical coordinate, using the current
- mapping mode but ignoring the y axis orientation.
- Use this function for converting a height, for example.
+ Convert device Y coordinate to relative logical coordinate, using the
+ current mapping mode but ignoring the y axis orientation. Use this
+ function for converting a height, for example.
*/
wxCoord DeviceToLogicalYRel(wxCoord y);
/**
- Draws an arc of a circle, centred on (@e xc, yc), with starting point (@e x1,
- y1)
- and ending at (@e x2, y2). The current pen is used for the outline
- and the current brush for filling the shape.
- The arc is drawn in an anticlockwise direction from the start point to the end
- point.
+ Draws an arc of a circle, centred on (@a xc, @a yc), with starting
+ point (@a x1, @a y1) and ending at (@a x2, @a y2). The current pen is
+ used for the outline and the current brush for filling the shape.
+
+ The arc is drawn in a counter-clockwise direction from the start point
+ to the end point.
*/
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc);
/**
- Draw a bitmap on the device context at the specified point. If @a transparent
- is @true and the bitmap has
- a transparency mask, the bitmap will be drawn transparently.
- When drawing a mono-bitmap, the current text foreground colour will be used to
- draw the foreground
- of the bitmap (all bits set to 1), and the current text background colour to
- draw the background
- (all bits set to 0). See also wxDC::SetTextForeground,
- wxDC::SetTextBackground and wxMemoryDC.
+ Draw a bitmap on the device context at the specified point. If
+ @a transparent is @true and the bitmap has a transparency mask, the
+ bitmap will be drawn transparently.
+
+ When drawing a mono-bitmap, the current text foreground colour will be
+ used to draw the foreground of the bitmap (all bits set to 1), and the
+ current text background colour to draw the background (all bits set to
+ 0).
+
+ @see wxDC::SetTextForeground(), wxDC::SetTextBackground(), wxMemoryDC
*/
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y,
bool transparent);
/**
Draws a check mark inside the given rectangle.
*/
- void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height);
+ void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawCheckMark(const wxRect& rect);
//@}
/**
Draws a circle with the given centre and radius.
- @see wxDC::DrawEllipse
+ @see wxDC::DrawEllipse()
*/
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
void DrawCircle(const wxPoint& pt, wxCoord radius);
//@{
/**
- Draws an ellipse contained in the rectangle specified either with the given top
- left corner and the given size or directly. The current pen is used for the
- outline and the current brush for filling the shape.
+ Draws an ellipse contained in the rectangle specified either with the
+ given top left corner and the given size or directly. The current pen
+ is used for the outline and the current brush for filling the shape.
- @see wxDC::DrawCircle
+ @see wxDC::DrawCircle()
*/
- void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height);
+ void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DrawEllipse(const wxPoint& pt, const wxSize& size);
void DrawEllipse(const wxRect& rect);
//@}
/**
- Draws an arc of an ellipse. The current pen is used for drawing the arc and
- the current brush is used for drawing the pie.
- @a x and @a y specify the x and y coordinates of the upper-left corner of the
- rectangle that contains
- the ellipse.
- @a width and @a height specify the width and height of the rectangle that
- contains
- the ellipse.
- @a start and @a end specify the start and end of the arc relative to the
- three-o'clock
- position from the center of the rectangle. Angles are specified
- in degrees (360 is a complete circle). Positive values mean
- counter-clockwise motion. If @a start is equal to @e end, a
- complete ellipse will be drawn.
+ Draws an arc of an ellipse. The current pen is used for drawing the arc
+ and the current brush is used for drawing the pie.
+
+ @a x and @a y specify the x and y coordinates of the upper-left corner
+ of the rectangle that contains the ellipse.
+
+ @a width and @a height specify the width and height of the rectangle
+ that contains the ellipse.
+
+ @a start and @a end specify the start and end of the arc relative to
+ the three-o'clock position from the center of the rectangle. Angles are
+ specified in degrees (360 is a complete circle). Positive values mean
+ counter-clockwise motion. If @a start is equal to @a end, a complete
+ ellipse will be drawn.
*/
- void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height,
- double start,
- double end);
+ void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
+ double start, double end);
/**
- Draw an icon on the display (does nothing if the device context is PostScript).
- This can be the simplest way of drawing bitmaps on a window.
+ Draw an icon on the display (does nothing if the device context is
+ PostScript). This can be the simplest way of drawing bitmaps on a
+ window.
*/
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
/**
- Draws a line from the first point to the second. The current pen is used
- for drawing the line.
+ Draws a line from the first point to the second. The current pen is
+ used for drawing the line.
*/
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
//@{
/**
- Draws lines using an array of @a points of size @e n, or list of
+ Draws lines using an array of @a points of size @a n, or list of
pointers to points, adding the optional offset coordinate. The current
- pen is used for drawing the lines. The programmer is responsible for
+ pen is used for drawing the lines. The programmer is responsible for
deleting the list of points.
*/
void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
//@{
/**
- Draws a filled polygon using an array of @a points of size @e n,
+ Draws a filled polygon using an array of @a points of size @a n,
or list of pointers to points, adding the optional offset coordinate.
- The last argument specifies the fill rule: @b wxODDEVEN_RULE (the
- default) or @b wxWINDING_RULE.
+ wxWidgets automatically closes the first and last points.
+
+ The last argument specifies the fill rule: @c wxODDEVEN_RULE (the
+ default) or @c wxWINDING_RULE.
+
The current pen is used for drawing the outline, and the current brush
- for filling the shape. Using a transparent brush suppresses filling.
+ for filling the shape. Using a transparent brush suppresses filling.
+
The programmer is responsible for deleting the list of points.
- Note that wxWindows automatically closes the first and last points.
*/
void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
- wxCoord yoffset = 0,
- int fill_style = wxODDEVEN_RULE);
+ wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE);
void DrawPolygon(wxList* points, wxCoord xoffset = 0,
- wxCoord yoffset = 0,
- int fill_style = wxODDEVEN_RULE);
+ wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE);
//@}
/**
size. The current pen is used for the outline and the current brush
for filling the shape.
*/
- void DrawRectangle(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height);
+ void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
/**
Draws the text rotated by @a angle degrees.
- The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different
- points, depending on the size of the font
+
+ The wxMSW wxDC and wxSVGFileDC rotate the text around slightly
+ different points, depending on the size of the font.
*/
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle);
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.
- If @a radius is positive, the value is assumed to be the
- radius of the rounded corner. If @a radius is negative,
- the absolute value is assumed to be the @e proportion of the smallest
- dimension of the rectangle. This means that the corner can be
- a sensible size relative to the size of the rectangle, and also avoids
- the strange effects X produces when the corners are too big for
- the rectangle.
+
+ If @a radius is positive, the value is assumed to be the radius of the
+ rounded corner. If @a radius is negative, the absolute value is assumed
+ to be the @e proportion of the smallest dimension of the rectangle.
+ This means that the corner can be a sensible size relative to the size
+ of the rectangle, and also avoids the strange effects X produces when
+ the corners are too big for the rectangle.
*/
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height,
- double radius = 20);
+ wxCoord height, double radius = 20);
- //@{
/**
- Draws a three-point spline using the current pen.
+ Draws a spline between all given control points, using the current pen.
+ The programmer is responsible for deleting the list of points. The
+ spline is drawn using a series of lines, using an algorithm taken from
+ the X drawing program "XFIG".
*/
void DrawSpline(wxList* points);
- void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
- wxCoord y2,
- wxCoord x3,
- wxCoord y3);
- //@}
+ /**
+ @param string
+ The text string to measure.
+ Draws a three-point spline using the current pen.
+ */
+ void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
+ wxCoord x3, wxCoord y3);
/**
- Draws a text string at the specified point, using the current text font,
- and the current text foreground and background colours.
+ Draws a text string at the specified point, using the current text
+ font, and the current text foreground and background colours.
+
The coordinates refer to the top-left corner of the rectangle bounding
- the string. See GetTextExtent() for how
- to get the dimensions of a text string, which can be used to position the
- text more precisely.
+ the string. See wxDC::GetTextExtent() for how to get the dimensions of
+ a text string, which can be used to position the text more precisely.
*/
void DrawText(const wxString& text, wxCoord x, wxCoord y);
/**
- Does nothing
+ Does nothing.
*/
void EndDoc();
/**
- Does nothing
+ Does nothing.
*/
void EndDrawing();
/**
- Does nothing
+ Does nothing.
*/
void EndPage();
/**
- Not implemented
+ Not implemented.
*/
void FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
int style = wxFLOOD_SURFACE);
//@{
/**
- Gets the brush used for painting the background (see
- wxSVGFileDC::SetBackground).
+ Gets the brush used for painting the background.
+
+ @see SetBackground()
*/
wxBrush GetBackground() const;
const wxBrush GetBackground() const;
/**
Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT.
- @see wxDC::SetBackgroundMode
+ @see SetBackgroundMode()
*/
int GetBackgroundMode() const;
//@{
/**
- Gets the current brush (see wxSVGFileDC::SetBrush).
+ Gets the current brush.
+
+ @see SetBrush()
*/
wxBrush GetBrush() const;
const wxBrush GetBrush() const;
wxCoord GetCharWidth();
/**
- Not implemented
+ Not implemented.
*/
- void GetClippingBox(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height);
+ void GetClippingBox(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
//@{
/**
- Gets the current font (see wxSVGFileDC::SetFont).
+ Gets the current font.
+
+ @see SetFont()
*/
wxFont GetFont() const;
const wxFont GetFont() const;
//@}
/**
- Gets the current logical function (see wxSVGFileDC::SetLogicalFunction).
+ Gets the current logical function.
+
+ @see SetLogicalFunction()
*/
int GetLogicalFunction();
/**
- Gets the @e mapping mode for the device context (see wxSVGFileDC::SetMapMode).
+ Gets the mapping mode for the device context.
+
+ @see SetMapMode()
*/
int GetMapMode();
//@{
/**
- Gets the current pen (see wxSVGFileDC::SetPen).
+ Gets the current pen.
+
+ @see SetPen()
*/
wxPen GetPen() const;
const wxPen GetPen() const;
//@}
/**
- Not implemented
+ Not implemented.
*/
bool GetPixel(wxCoord x, wxCoord y, wxColour* colour);
/**
- For a Windows printer device context, this gets the horizontal and vertical
- resolution.
+ For a Windows printer device context, this gets the horizontal and
+ vertical resolution.
*/
void GetSize(wxCoord* width, wxCoord* height);
//@{
/**
- Gets the current text background colour (see wxSVGFileDC::SetTextBackground).
+ Gets the current text background colour.
+
+ @see SetTextBackground()
*/
wxColour GetTextBackground() const;
const wxColour GetTextBackground() const;
/**
Gets the dimensions of the string using the currently selected font.
- @a string is the text string to measure, @a w and @a h are
- the total width and height respectively, @a descent is the
- dimension from the baseline of the font to the bottom of the
- descender, and @a externalLeading is any extra vertical space added
- to the font by the font designer (usually is zero).
- The optional parameter @a font specifies an alternative
- to the currently selected font: but note that this does not
- yet work under Windows, so you need to set a font for
- the device context first.
- See also wxFont, SetFont().
- */
- void GetTextExtent(const wxString& string, wxCoord* w,
- wxCoord* h,
+
+ @param string
+ The text string to measure.
+ @param w
+ This value will be set to the width after this call.
+ @param h
+ This value will be set to the height after this call.
+ @param descent
+ The dimension from the baseline of the font to the bottom of the
+ descender.
+ @param externalLeading
+ Any extra vertical space added to the font by the font designer
+ (usually is zero).
+
+ The optional parameter @a font specifies an alternative to the
+ currently selected font: but note that this does not yet work under
+ Windows, so you need to set a font for the device context first.
+
+ @see wxFont, SetFont()
+ */
+ void GetTextExtent(const wxString& string, wxCoord* w, wxCoord* h,
wxCoord* descent = NULL,
wxCoord* externalLeading = NULL,
wxFont* font = NULL);
//@{
/**
- Gets the current text foreground colour (see wxSVGFileDC::SetTextForeground).
+ Gets the current text foreground colour.
+
+ @see SetTextForeground()
*/
wxColour GetTextForeground() const;
const wxColour GetTextForeground() const;
//@}
/**
- Gets the current user scale factor (set by wxDC::SetUserScale).
+ Gets the current user scale factor.
+
+ @see SetUserScale()
*/
void GetUserScale(double x, double y);
wxCoord LogicalToDeviceX(wxCoord x);
/**
- Converts logical X coordinate to relative device coordinate, using the current
- mapping mode but ignoring the x axis orientation.
- Use this for converting a width, for example.
+ Converts logical X coordinate to relative device coordinate, using the
+ current mapping mode but ignoring the x axis orientation. Use this for
+ converting a width, for example.
*/
wxCoord LogicalToDeviceXRel(wxCoord x);
wxCoord LogicalToDeviceY(wxCoord y);
/**
- Converts logical Y coordinate to relative device coordinate, using the current
- mapping mode but ignoring the y axis orientation.
- Use this for converting a height, for example.
+ Converts logical Y coordinate to relative device coordinate, using the
+ current mapping mode but ignoring the y axis orientation. Use this for
+ converting a height, for example.
*/
wxCoord LogicalToDeviceYRel(wxCoord y);
wxCoord MinY();
/**
- Returns @true if the DC is ok to use; False values arise from being unable to
- write the file
+ Returns @true if the DC is ok to use. @false values arise from being
+ unable to write the file.
*/
bool Ok();
/**
- Resets the bounding box: after a call to this function, the bounding box
- doesn't contain anything.
+ Resets the bounding box. After a call to this function, the bounding
+ box doesn't contain anything.
- @see wxDC::CalcBoundingBox
+ @see CalcBoundingBox()
*/
void ResetBoundingBox();
orientation, e.g. x axis from left to right and y axis from bottom up.
@param xLeftRight
- True to set the x axis orientation to the natural
- left to right orientation, @false to invert it.
+ @true to set the x axis orientation to the natural left to right
+ orientation, @false to invert it.
@param yBottomUp
- True to set the y axis orientation to the natural
- bottom up orientation, @false to invert it.
+ @true to set the y axis orientation to the natural bottom up
+ orientation, @false to invert it.
*/
void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
void SetBackgroundMode(int mode);
/**
- Sets the current brush for the DC.
- If the argument is wxNullBrush, the current brush is selected out of the device
- context, and the original brush restored, allowing the current brush to
- be destroyed safely.
- See also wxBrush.
- See also wxMemoryDC for the interpretation of colours
- when drawing into a monochrome bitmap.
+ Sets the current brush for the DC. If the argument is wxNullBrush, the
+ current brush is selected out of the device context, and the original
+ brush restored, allowing the current brush to be destroyed safely.
+
+ @see wxBrush, wxMemoryDC (for the interpretation of colours
+ when drawing into a monochrome bitmap).
*/
void SetBrush(const wxBrush& brush);
//@{
/**
- Not implemented
+ Not implemented.
*/
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
//@}
/**
- Sets the device origin (i.e., the origin in pixels after scaling has been
- applied).
- This function may be useful in Windows printing
+ Sets the device origin (i.e., the origin in pixels after scaling has
+ been applied). This function may be useful in Windows printing
operations for placing a graphic on a page.
*/
void SetDeviceOrigin(wxCoord x, wxCoord y);
/**
- Sets the current font for the DC. It must be a valid font, in particular you
- should not pass @c wxNullFont to this method.
- See also wxFont.
+ Sets the current font for the DC. It must be a valid font, in
+ particular you should not pass @c wxNullFont to this method.
+
+ @see wxFont
*/
void SetFont(const wxFont& font);
/**
- Only wxCOPY is avalaible; trying to set one of the othe values will fail
+ Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is
+ avalaible. Trying to set one of the othe values will fail.
*/
void SetLogicalFunction(int function);
/**
- The @e mapping mode of the device context defines the unit of
- measurement used to convert logical units to device units. Note that
- in X, text drawing isn't handled consistently with the mapping mode; a
- font is always specified in point size. However, setting the @e user scale (see
- wxSVGFileDC::SetUserScale) scales the text appropriately. In
- Windows, scaleable TrueType fonts are always used; in X, results depend
- on availability of fonts, but usually a reasonable match is found.
+ The mapping mode of the device context defines the unit of measurement
+ used to convert logical units to device units. Note that in X, text
+ drawing isn't handled consistently with the mapping mode; a font is
+ always specified in point size. However, setting the user scale scales
+ the text appropriately. In Windows, scalable TrueType fonts are always
+ used; in X, results depend on availability of fonts, but usually a
+ reasonable match is found.
+
Note that the coordinate origin should ideally be selectable, but for
now is always at the top left of the screen/printer.
- Drawing to a Windows printer device context under UNIX
- uses the current mapping mode, but mapping mode is currently ignored for
- PostScript output.
- The mapping mode can be one of the following:
-
- wxMM_TWIPS
-
- Each logical unit is 1/20 of a point, or 1/1440 of
- an inch.
-
- wxMM_POINTS
-
- Each logical unit is a point, or 1/72 of an inch.
-
- wxMM_METRIC
- Each logical unit is 1 mm.
+ Drawing to a Windows printer device context under UNIX uses the current
+ mapping mode, but mapping mode is currently ignored for PostScript
+ output.
- wxMM_LOMETRIC
-
- Each logical unit is 1/10 of a mm.
-
- wxMM_TEXT
-
- Each logical unit is 1 pixel.
+ The mapping mode can be one of the following:
+ - wxMM_TWIPS - Each logical unit is 1/20 of a point, or 1/1440 of an
+ inch.
+ - wxMM_POINTS - Each logical unit is a point, or 1/72 of an inch.
+ - wxMM_METRIC - Each logical unit is 1 mm.
+ - wxMM_LOMETRIC - Each logical unit is 1/10 of a mm.
+ - wxMM_TEXT - Each logical unit is 1 pixel.
*/
- void SetMapMode(int int);
+ void SetMapMode(int mode);
/**
- Not implemented
+ Not implemented.
*/
void SetPalette(const wxPalette& palette);
/**
- Sets the current pen for the DC.
- If the argument is wxNullPen, the current pen is selected out of the device
- context, and the original pen restored.
- See also wxMemoryDC for the interpretation of colours
- when drawing into a monochrome bitmap.
+ Sets the current pen for the DC. If the argument is wxNullPen, the
+ current pen is selected out of the device context, and the original pen
+ restored.
+
+ @see wxMemoryDC (for the interpretation of colours when drawing into a
+ monochrome bitmap)
*/
void SetPen(const wxPen& pen);
/**
Sets the current text foreground colour for the DC.
- See also wxMemoryDC for the interpretation of colours
- when drawing into a monochrome bitmap.
+
+ @see wxMemoryDC (for the interpretation of colours when drawing into a
+ monochrome bitmap)
*/
void SetTextForeground(const wxColour& colour);
/**
Sets the user scaling factor, useful for applications which require
- 'zooming'.
+ "zooming".
*/
void SetUserScale(double xScale, double yScale);
/**
- Does nothing
+ Does nothing.
*/
bool StartDoc(const wxString& message);
};
@wxheader{dde.h}
A wxDDEConnection object represents the connection between a client and a
- server. It can be created by making a connection using a
- wxDDEClient object, or by the acceptance of a connection by a
- wxDDEServer object. The bulk of a DDE (Dynamic Data Exchange)
- conversation is controlled by
- calling members in a @b wxDDEConnection object or by overriding its
- members.
+ server. It can be created by making a connection using a wxDDEClient
+ object, or by the acceptance of a connection by a wxDDEServer object. The
+ bulk of a DDE (Dynamic Data Exchange) conversation is controlled by calling
+ members in a wxDDEConnection object or by overriding its members.
An application should normally derive a new connection class from
- wxDDEConnection, in order to override the communication event handlers
- to do something interesting.
+ wxDDEConnection, in order to override the communication event handlers to
+ do something interesting.
- This DDE-based implementation is available on Windows only,
- but a platform-independent, socket-based version
- of this API is available using wxTCPConnection.
+ This DDE-based implementation is available on Windows only, but a
+ platform-independent, socket-based version of this API is available using
+ wxTCPConnection.
@library{wxbase}
- @category{FIXME}
+ @category{ipc}
- @see wxDDEClient, wxDDEServer, @ref overview_ipcoverview "Interprocess
- communications overview"
+ @see wxConnectionBase, wxDDEClient, wxDDEServer, @ref overview_ipc
*/
-class wxDDEConnection : public wxObject
+class wxDDEConnection : public wxConnectionBase
{
public:
- //@{
/**
Constructs a connection object. If no user-defined connection object is
to be derived from wxDDEConnection, then the constructor should not be
- called directly, since the default connection object will be provided on
- requesting (or accepting) a connection. However, if the user defines his
- or her own derived connection object, the wxDDEServer::OnAcceptConnection
- and/or wxDDEClient::OnMakeConnection members should be replaced by
- functions which construct the new connection object. If the arguments of
- the wxDDEConnection constructor are void, then a default buffer is
- associated with the connection. Otherwise, the programmer must provide a
- a buffer and size of the buffer for the connection object to use in
- transactions.
+ called directly, since the default connection object will be provided
+ on requesting (or accepting) a connection. However, if the user defines
+ his or her own derived connection object, the
+ wxDDEServer::OnAcceptConnection() and/or
+ wxDDEClient::OnMakeConnection() members should be replaced by functions
+ which construct the new connection object.
+
+ A default buffer will be associated with this connection.
*/
wxDDEConnection();
+ /**
+ Constructs a connection object. If no user-defined connection object is
+ to be derived from wxDDEConnection, then the constructor should not be
+ called directly, since the default connection object will be provided
+ on requesting (or accepting) a connection. However, if the user defines
+ his or her own derived connection object, the
+ wxDDEServer::OnAcceptConnection() and/or
+ wxDDEClient::OnMakeConnection() members should be replaced by functions
+ which construct the new connection object.
+
+ @param buffer
+ Buffer for this connection object to use in transactions.
+ @param size
+ Size of the buffer given.
+ */
wxDDEConnection(void* buffer, size_t size);
- //@}
//@{
/**
Called by the server application to advise the client of a change in
- the data associated with the given item. Causes the client
- connection's OnAdvise()
- member to be called. Returns @true if successful.
+ the data associated with the given item. Causes the client connection's
+ OnAdvise() member to be called.
+
+ @returns @true if successful.
*/
bool Advise(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
/**
Called by the client or server application to disconnect from the other
- program; it causes the OnDisconnect() message
- to be sent to the corresponding connection object in the other
- program. The default behaviour of @b OnDisconnect is to delete the
- connection, but the calling application must explicitly delete its
- side of the connection having called @b Disconnect. Returns @true if
- successful.
+ program; it causes the OnDisconnect() message to be sent to the
+ corresponding connection object in the other program. The default
+ behaviour of OnDisconnect() is to delete the connection, but the
+ calling application must explicitly delete its side of the connection
+ having called Disconnect().
+
+ @returns @true if successful.
*/
bool Disconnect();
//@{
/**
- Called by the client application to execute a command on the server. Can
- also be used to transfer arbitrary data to the server (similar
- to Poke() in that respect). Causes the
- server connection's OnExecute() member to be
- called. Returns @true if successful.
+ Called by the client application to execute a command on the server.
+ Can also be used to transfer arbitrary data to the server (similar to
+ Poke() in that respect). Causes the server connection's OnExecute()
+ member to be called.
+
+ @returns @true if successful.
*/
bool Execute(const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
Message sent to the client application when the server notifies it of a
change in the data associated with the given item.
*/
- virtual bool OnAdvise(const wxString& topic,
- const wxString& item,
- const void* data,
- size_t size,
- wxIPCFormat format);
+ virtual bool OnAdvise(const wxString& topic, const wxString& item,
+ const void* data, size_t size, wxIPCFormat format);
/**
Message sent to the client or server application when the other
this message.
*/
virtual bool OnExecute(const wxString& topic, const void* data,
- size_t size,
- wxIPCFormat format);
+ size_t size, wxIPCFormat format);
/**
Message sent to the server application when the client notifies it to
accept the given data.
*/
virtual bool OnPoke(const wxString& topic, const wxString& item,
- const void* data,
- size_t size,
- wxIPCFormat format);
+ const void* data, size_t size, wxIPCFormat format);
/**
- Message sent to the server application when the client
- calls Request(). The server
- should respond by returning a character string from @b OnRequest,
- or @NULL to indicate no data.
+ Message sent to the server application when the client calls Request().
+ The server should respond by returning a character string from
+ OnRequest(), or @NULL to indicate no data.
*/
virtual const void* OnRequest(const wxString& topic,
- const wxString& item,
- size_t* size,
+ const wxString& item, size_t* size,
wxIPCFormat format);
/**
Message sent to the server application by the client, when the client
- wishes to start an 'advise loop' for the given topic and item. The
+ wishes to start an "advise loop" for the given topic and item. The
server can refuse to participate by returning @false.
*/
- virtual bool OnStartAdvise(const wxString& topic,
- const wxString& item);
+ virtual bool OnStartAdvise(const wxString& topic, const wxString& item);
/**
Message sent to the server application by the client, when the client
- wishes to stop an 'advise loop' for the given topic and item. The
+ wishes to stop an "advise loop" for the given topic and item. The
server can refuse to stop the advise loop by returning @false, although
this doesn't have much meaning in practice.
*/
- virtual bool OnStopAdvise(const wxString& topic,
- const wxString& item);
+ virtual bool OnStopAdvise(const wxString& topic, const wxString& item);
//@{
/**
Called by the client application to poke data into the server. Can be
used to transfer arbitrary data to the server. Causes the server
- connection's OnPoke() member
- to be called. Returns @true if successful.
+ connection's OnPoke() member to be called.
+
+ @returns @true if successful.
*/
bool Poke(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
//@}
/**
- Called by the client application to request data from the server. Causes
- the server connection's OnRequest() member to be called. Returns a
- character string (actually a pointer to the connection's buffer) if
- successful, @NULL otherwise.
+ Called by the client application to request data from the server.
+ Causes the server connection's OnRequest() member to be called.
+
+ @returns A character string (actually a pointer to the connection's
+ buffer) if successful, @NULL otherwise.
*/
const void* Request(const wxString& item, size_t* size,
wxIPCFormat format = wxIPC_TEXT);
/**
- Called by the client application to ask if an advise loop can be started
- with the server. Causes the server connection's OnStartAdvise()
- member to be called. Returns @true if the server okays it, @false
- otherwise.
+ Called by the client application to ask if an advise loop can be
+ started with the server. Causes the server connection's OnStartAdvise()
+ member to be called.
+
+ @returns @true if the server okays it, @false otherwise.
*/
bool StartAdvise(const wxString& item);
/**
Called by the client application to ask if an advise loop can be
- stopped. Causes the server connection's OnStopAdvise() member
- to be called. Returns @true if the server okays it, @false otherwise.
+ stopped. Causes the server connection's OnStopAdvise() member to be
+ called.
+
+ @returns @true if the server okays it, @false otherwise.
*/
bool StopAdvise(const wxString& item);
};
A wxDDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation.
- To create a client which can communicate with a suitable server,
- you need to derive a class from wxDDEConnection and another from wxDDEClient.
- The custom wxDDEConnection class will intercept communications in
- a 'conversation' with a server, and the custom wxDDEServer is required
- so that a user-overridden wxDDEClient::OnMakeConnection member can return
- a wxDDEConnection of the required class, when a connection is made.
+ To create a client which can communicate with a suitable server, you need
+ to derive a class from wxDDEConnection and another from wxDDEClient. The
+ custom wxDDEConnection class will intercept communications in a
+ "conversation" with a server, and the custom wxDDEServer is required so
+ that a user-overridden OnMakeConnection() member can return a
+ wxDDEConnection of the required class, when a connection is made.
- This DDE-based implementation is
- available on Windows only, but a platform-independent, socket-based version
- of this API is available using wxTCPClient.
+ This DDE-based implementation is available on Windows only, but a
+ platform-independent, socket-based version of this API is available using
+ wxTCPClient.
@library{wxbase}
- @category{FIXME}
+ @category{ipc}
- @see wxDDEServer, wxDDEConnection, @ref overview_ipcoverview "Interprocess
- communications overview"
+ @see wxDDEServer, wxDDEConnection, @ref overview_ipc
*/
class wxDDEClient : public wxObject
{
wxDDEClient();
/**
- Tries to make a connection with a server specified by the host
- (machine name under UNIX, ignored under Windows), service name (must
- contain an integer port number under UNIX), and topic string. If the
- server allows a connection, a wxDDEConnection object will be returned.
- The type of wxDDEConnection returned can be altered by overriding
- the OnMakeConnection() member to return your own
- derived connection object.
+ Tries to make a connection with a server specified by the host (machine
+ name under UNIX, ignored under Windows), service name (must contain an
+ integer port number under UNIX), and topic string. If the server allows
+ a connection, a wxDDEConnection object will be returned.
+
+ The type of wxDDEConnection returned can be altered by overriding the
+ OnMakeConnection() member to return your own derived connection object.
*/
wxConnectionBase* MakeConnection(const wxString& host,
const wxString& service,
/**
The type of wxDDEConnection returned from a MakeConnection() call can
- be altered by deriving the @b OnMakeConnection member to return your
- own derived connection object. By default, a wxDDEConnection
- object is returned.
+ be altered by deriving the OnMakeConnection() member to return your own
+ derived connection object. By default, a wxDDEConnection object is
+ returned.
+
The advantage of deriving your own connection class is that it will
- enable you to intercept messages initiated by the server, such
- as wxDDEConnection::OnAdvise. You may also want to
- store application-specific data in instances of the new class.
+ enable you to intercept messages initiated by the server, such as
+ wxDDEConnection::OnAdvise(). You may also want to store
+ application-specific data in instances of the new class.
*/
wxConnectionBase* OnMakeConnection();
/**
- Returns @true if this is a valid host name, @false otherwise. This always
- returns @true under MS Windows.
+ Returns @true if this is a valid host name, @false otherwise. This
+ always returns @true under MS Windows.
*/
bool ValidHost(const wxString& host);
};
A wxDDEServer object represents the server part of a client-server DDE
(Dynamic Data Exchange) conversation.
- This DDE-based implementation is
- available on Windows only, but a platform-independent, socket-based version
- of this API is available using wxTCPServer.
+ This DDE-based implementation is available on Windows only, but a
+ platform-independent, socket-based version of this API is available using
+ wxTCPServer.
@library{wxbase}
- @category{FIXME}
+ @category{ipc}
- @see wxDDEClient, wxDDEConnection, @ref overview_ipcoverview "IPC overview"
+ @see wxDDEClient, wxDDEConnection, @ref overview_ipc
*/
class wxDDEServer
{
/**
Registers the server using the given service name. Under UNIX, the
string must contain an integer id which is used as an Internet port
- number. @false is returned if the call failed (for example, the port
+ number. @false is returned if the call failed (for example, if the port
number is already in use).
*/
bool Create(const wxString& service);
/**
- When a client calls @b MakeConnection, the server receives the
- message and this member is called. The application should derive a
+ When a client calls wxDDEClient::MakeConnection(), the server receives
+ the message and this member is called. The application should derive a
member to intercept this message and return a connection object of
- either the standard wxDDEConnection type, or of a user-derived type. If the
- topic is "STDIO", the application may wish to refuse the connection.
- Under UNIX, when a server is created the OnAcceptConnection message is
- always sent for standard input and output, but in the context of DDE
- messages it doesn't make a lot of sense.
+ either the standard wxDDEConnection type, or of a user-derived type.
+
+ If the @a topic is "STDIO", the application may wish to refuse the
+ connection. Under UNIX, when a server is created the
+ OnAcceptConnection() message is always sent for standard input and
+ output, but in the context of DDE messages it doesn't make a lot of
+ sense.
*/
virtual wxConnectionBase* OnAcceptConnection(const wxString& topic);
};
/////////////////////////////////////////////////////////////////////////////
// Name: debugrpt.h
-// Purpose: interface of wxDebugReportPreview
+// Purpose: interface of wxDebugReport*
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@class wxDebugReportPreview
@wxheader{debugrpt.h}
- This class presents the debug report to the user and allows him to veto report
- entirely or remove some parts of it. Although not mandatory, using this class
- is strongly recommended as data included in the debug report might contain
- sensitive private information and the user should be notified about it as well
- as having a possibility to examine the data which had been gathered to check
- whether this is effectively the case and discard the debug report if it is.
+ This class presents the debug report to the user and allows him to veto
+ report entirely or remove some parts of it. Although not mandatory, using
+ this class is strongly recommended as data included in the debug report
+ might contain sensitive private information and the user should be notified
+ about it as well as having a possibility to examine the data which had been
+ gathered to check whether this is effectively the case and discard the
+ debug report if it is.
wxDebugReportPreview is an abstract base class, currently the only concrete
- class deriving from it is
- wxDebugReportPreviewStd.
+ class deriving from it is wxDebugReportPreviewStd.
@library{wxqa}
@category{debugging}
{
public:
/**
- Trivial default constructor.
+ Default constructor.
*/
wxDebugReportPreview();
/**
- dtor is trivial as well but should be virtual for a base class
+ Destructor is trivial as well but should be virtual for a base class.
*/
- ~wxDebugReportPreview();
+ virtual ~wxDebugReportPreview();
/**
- Present the report to the user and allow him to modify it by removing some or
- all of the files and, potentially, adding some notes. Return @true if the
- report should be processed or @false if the user chose to cancel report
- generation or removed all files from it.
+ Present the report to the user and allow him to modify it by removing
+ some or all of the files and, potentially, adding some notes.
+
+ @returns @true if the report should be processed or @false if the user
+ chose to cancel report generation or removed all files from
+ it.
*/
- bool Show(wxDebugReport& dbgrpt) const;
+ virtual bool Show(wxDebugReport& dbgrpt) const;
};
@class wxDebugReportCompress
@wxheader{debugrpt.h}
- wxDebugReportCompress is a wxDebugReport which
- compresses all the files in this debug report into a single .ZIP file in its
- @c @e Process() function.
+ wxDebugReportCompress is a wxDebugReport which compresses all the files in
+ this debug report into a single ZIP file in its wxDebugReport::Process()
+ function.
@library{wxqa}
@category{debugging}
wxDebugReportCompress();
/**
- Returns the full path of the compressed file (empty if creation failed).
+ Returns the full path of the compressed file (empty if creation
+ failed).
*/
const wxString GetCompressedFileName() const;
};
@class wxDebugReport
@wxheader{debugrpt.h}
- wxDebugReport is used to generate a debug report, containing information about
- the program current state. It is usually used from
- wxApp::OnFatalException as shown in the
- sample().
+ wxDebugReport is used to generate a debug report, containing information
+ about the program current state. It is usually used from
+ wxApp::OnFatalException() as shown in the @ref page_samples_debugrpt.
- A wxDebugReport object contains one or more files. A few of them can be created
- by the
- class itself but more can be created from the outside and then added to the
- report. Also note that several virtual functions may be overridden to further
- customize the class behaviour.
+ A wxDebugReport object contains one or more files. A few of them can be
+ created by the class itself but more can be created from the outside and
+ then added to the report. Also note that several virtual functions may be
+ overridden to further customize the class behaviour.
Once a report is fully assembled, it can simply be left in the temporary
- directory so that the user can email it to the developers (in which case you
- should still use wxDebugReportCompress to
- compress it in a single file) or uploaded to a Web server using
- wxDebugReportUpload (setting up the Web server
- to accept uploads is your responsibility, of course). Other handlers, for
- example for
- automatically emailing the report, can be defined as well but are not currently
- included in wxWidgets.
+ directory so that the user can email it to the developers (in which case
+ you should still use wxDebugReportCompress to compress it in a single file)
+ or uploaded to a Web server using wxDebugReportUpload (setting up the Web
+ server to accept uploads is your responsibility, of course). Other
+ handlers, for example for automatically emailing the report, can be defined
+ as well but are not currently included in wxWidgets.
+
+ A typical usage example:
+
+ @code
+ wxDebugReport report;
+ wxDebugReportPreviewStd preview;
+
+ report.AddCurrentContext(); // could also use AddAll()
+ report.AddCurrentDump(); // to do both at once
+
+ if ( preview.Show(report) )
+ report.Process();
+ @endcode
@library{wxqa}
@category{debugging}
class wxDebugReport
{
public:
+ /**
+ This enum is used for functions that report either the current state or
+ the state during the last (fatal) exception.
+ */
+ enum Context {
+ Context_Current,
+ Context_Exception
+ };
+
/**
The constructor creates a temporary directory where the files that will
- be included in the report are created. Use
- IsOk() to check for errors.
+ be included in the report are created. Use IsOk() to check for errors.
*/
wxDebugReport();
/**
The destructor normally destroys the temporary directory created in the
- constructor
- with all the files it contains. Call Reset() to
- prevent this from happening.
+ constructor with all the files it contains. Call Reset() to prevent
+ this from happening.
*/
~wxDebugReport();
/**
Adds all available information to the report. Currently this includes a
- text (XML) file describing the process context and, under Win32, a minidump
- file.
+ text (XML) file describing the process context and, under Win32, a
+ minidump file.
*/
void AddAll(Context context = Context_Exception);
bool AddContext(Context ctx);
/**
- The same as @ref addcontext() AddContext(Context_Current).
+ The same as calling AddContext(Context_Current).
*/
bool AddCurrentContext();
/**
- The same as @ref adddump() AddDump(Context_Current).
+ The same as calling AddDump(Context_Current).
*/
bool AddCurrentDump();
/**
Adds the minidump file to the debug report.
- Minidumps are only available under recent Win32 versions (@c dbghlp32.dll
- can be installed under older systems to make minidumps available).
+
+ Minidumps are only available under recent Win32 versions
+ (@c dbghlp32.dll can be installed under older systems to make minidumps
+ available).
*/
bool AddDump(Context ctx);
/**
- The same as @ref addcontext() AddContext(Context_Exception).
+ The same as calling AddContext(Context_Exception).
*/
bool AddExceptionContext();
/**
- The same as @ref adddump() AddDump(Context_Exception).
+ The same as calling AddDump(Context_Exception).
*/
bool AddExceptionDump();
/**
- Add another file to the report. If @a filename is an absolute path, it is
- copied to a file in the debug report directory with the same name. Otherwise
- the file should already exist in this directory
- @a description only exists to be displayed to the user in the report summary
- shown by wxDebugReportPreview.
+ Add another file to the report. If @a filename is an absolute path, it
+ is copied to a file in the debug report directory with the same name.
+ Otherwise the file should already exist in this directory
+ @a description only exists to be displayed to the user in the report
+ summary shown by wxDebugReportPreview.
+
+ @see GetDirectory(), AddText()
*/
- void AddFile(const wxString& filename,
- const wxString& description);
+ void AddFile(const wxString& filename, const wxString& description);
/**
- This is a convenient wrapper around AddFile(). It
- creates the file with the given @e name and writes @a text to it, then
- adds the file to the report. The @a filename shouldn't contain the path.
- Returns @true if file could be added successfully, @false if an IO error
- occurred.
+ This is a convenient wrapper around AddFile(). It creates the file with
+ the given @a name and writes @a text to it, then adds the file to the
+ report. The @a filename shouldn't contain the path.
+
+ @returns @true if file could be added successfully, @false if an IO
+ error occurred.
*/
bool AddText(const wxString& filename, const wxString& text,
const wxString& description);
/**
- This function may be overridden to add arbitrary custom context to the XML
- context file created by AddContext(). By
- default, it does nothing.
+ This function may be overridden to add arbitrary custom context to the
+ XML context file created by AddContext(). By default, it does nothing.
*/
void DoAddCustomContext(wxXmlNode* nodeRoot);
/**
- This function may be overridden to modify the contents of the exception tag in
- the XML context file.
+ This function may be overridden to modify the contents of the exception
+ tag in the XML context file.
*/
bool DoAddExceptionInfo(wxXmlNode* nodeContext);
/**
- This function may be overridden to modify the contents of the modules tag in
- the XML context file.
+ This function may be overridden to modify the contents of the modules
+ tag in the XML context file.
*/
bool DoAddLoadedModules(wxXmlNode* nodeModules);
/**
- This function may be overridden to modify the contents of the system tag in
- the XML context file.
+ This function may be overridden to modify the contents of the system
+ tag in the XML context file.
*/
bool DoAddSystemInfo(wxXmlNode* nodeSystemInfo);
/**
- Returns the name of the temporary directory used for the files in this report.
- This method should be used to construct the full name of the files which you
- wish to add to the report using AddFile().
+ This method should be used to construct the full name of the files
+ which you wish to add to the report using AddFile().
+
+ @returns The name of the temporary directory used for the files in this
+ report.
*/
const wxString GetDirectory() const;
/**
- Retrieves the name (relative to
- wxDebugReport::GetDirectory) and the description of the
- file with the given index. If @a n is greater than or equal to the number of
- filse, @false is returned.
+ Retrieves the name (relative to GetDirectory()) and the description of
+ the file with the given index. If @a n is greater than or equal to the
+ number of filse, @false is returned.
*/
bool GetFile(size_t n, wxString* name, wxString* desc) const;
/**
Gets the name used as a base name for various files, by default
- wxApp::GetAppName is used.
+ wxApp::GetAppName() is used.
*/
wxString GetReportName() const;
/**
- Returns @true if the object was successfully initialized. If this method
- returns
- @false the report can't be used.
+ Returns @true if the object was successfully initialized. If this
+ method returns @false the report can't be used.
*/
bool IsOk() const;
bool Process();
/**
- Removes the file from report: this is used by
- wxDebugReportPreview to allow the user to
- remove files potentially containing private information from the report.
+ Removes the file from report: this is used by wxDebugReportPreview to
+ allow the user to remove files potentially containing private
+ information from the report.
*/
void RemoveFile(const wxString& name);
/**
- Resets the directory name we use. The object can't be used any more after
- this as it becomes uninitialized and invalid.
+ Resets the directory name we use. The object can't be used any more
+ after this as it becomes uninitialized and invalid.
*/
void Reset();
};
@class wxDebugReportPreviewStd
@wxheader{debugrpt.h}
- wxDebugReportPreviewStd is a standard debug report preview window. It displays
- a GUIdialog allowing the user to examine the contents of a debug report, remove
- files from and add notes to it.
+ wxDebugReportPreviewStd is a standard debug report preview window. It
+ displays a dialog allowing the user to examine the contents of a debug
+ report, remove files from and add notes to it.
@library{wxqa}
@category{debugging}
wxDebugReportPreviewStd();
/**
- Show the dialog, see
- wxDebugReportPreview::Show for more
- information.
+ Shows the dialog.
+
+ @see wxDebugReportPreview::Show()
*/
bool Show(wxDebugReport& dbgrpt) const;
};
@class wxDebugReportUpload
@wxheader{debugrpt.h}
- This class is used to upload a compressed file using HTTP POST request. As this
- class derives from wxDebugReportCompress, before upload the report is
- compressed in a single .ZIP file.
+ This class is used to upload a compressed file using HTTP POST request. As
+ this class derives from wxDebugReportCompress, before upload the report is
+ compressed in a single ZIP file.
@library{wxqa}
@category{debugging}
{
public:
/**
- )
- This class will upload the compressed file created by its base class to an HTML
- multipart/form-data form at the specified address. The @a url is the upload
- page address, @a input is the name of the @c "type=file" control on
- the form used for the file name and @a action is the value of the form
- action field. The report is uploaded using @c @e curl program which
- should be available, the @e curl parameter may be used to specify the full
- path to it.
+ This class will upload the compressed file created by its base class to
+ an HTML multipart/form-data form at the specified address. The @a url
+ is the upload page address, @a input is the name of the @c "type=file"
+ control on the form used for the file name and @a action is the value
+ of the form action field. The report is uploaded using the @e curl
+ program which should be available, the @e curl parameter may be used to
+ specify the full path to it.
*/
wxDebugReportUpload(const wxString& url, const wxString& input,
- const wxString& action);
+ const wxString& action,
+ const wxString& curl = "curl");
/**
- )
- This function may be overridden in a derived class to show the output from
- curl: this may be an HTML page or anything else that the server returned.
- Value returned by this function becomes the return value of
- wxDebugReport::Process.
+ This function may be overridden in a derived class to show the output
+ from curl: this may be an HTML page or anything else that the server
+ returned. Value returned by this function becomes the return value of
+ wxDebugReport::Process().
*/
- bool OnServerReply();
+ bool OnServerReply(const wxArrayString& reply);
};
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+/**
+ Modes used for wxDialog::SetLayoutAdaptationMode().
+*/
+enum wxDialogLayoutAdaptationMode
+{
+ wxDIALOG_ADAPTATION_MODE_DEFAULT = 0, ///< Use global adaptation enabled status.
+ wxDIALOG_ADAPTATION_MODE_ENABLED = 1, ///< Enable this dialog overriding global status.
+ wxDIALOG_ADAPTATION_MODE_DISABLED = 2 ///< Disable this dialog overriding global status.
+};
+
/**
@class wxDialog
@wxheader{dialog.h}
- A dialog box is a window with a title bar and sometimes a system menu, which
- can be moved around the screen. It can contain controls and other windows and
- is often used to allow the user to make some choice or to answer a question.
-
- Dialogs can be made scrollable, automatically: please see @ref
- overview_autoscrollingdialogs "Automatic scrolling dialogs" for further details.
+ A dialog box is a window with a title bar and sometimes a system menu,
+ which can be moved around the screen. It can contain controls and other
+ windows and is often used to allow the user to make some choice or to
+ answer a question.
+
+ Dialogs can be made scrollable, automatically, for computers with low
+ resolution screens: please see @ref overview_dialog_autoscrolling for
+ further details.
+
+ Dialogs usually contains either a single button allowing to close the
+ dialog or two buttons, one accepting the changes and the other one
+ discarding them (such button, if present, is automatically activated if the
+ user presses the "Esc" key). By default, buttons with the standard wxID_OK
+ and wxID_CANCEL identifiers behave as expected. Starting with wxWidgets 2.7
+ it is also possible to use a button with a different identifier instead,
+ see SetAffirmativeId() and SetEscapeId().
+
+ Also notice that the CreateButtonSizer() should be used to create the
+ buttons appropriate for the current platform and positioned correctly
+ (including their order which is platform-dependent).
+
+ @section dialog_modal Modal and Modeless
+
+ There are two kinds of dialog, modal and modeless. A modal dialog blocks
+ program flow and user input on other windows until it is dismissed, whereas
+ a modeless dialog behaves more like a frame in that program flow continues,
+ and input in other windows is still possible. To show a modal dialog you
+ should use the ShowModal() method while to show a dialog modelessly you
+ simply use Show(), just as with frames.
+
+ Note that the modal dialog is one of the very few examples of
+ wxWindow-derived objects which may be created on the stack and not on the
+ heap. In other words, while most windows would be created like this:
+
+ @code
+ void AskUser()
+ {
+ MyAskDialog *dlg = new MyAskDialog(...);
+ if ( dlg->ShowModal() == wxID_OK )
+ // ...
+ //else: dialog was cancelled or some another button pressed
+
+ dlg->Destroy();
+ }
+ @endcode
+
+ You can achieve the same result with dialogs by using simpler code:
+
+ @code
+ void AskUser()
+ {
+ MyAskDialog dlg(...);
+ if ( dlg.ShowModal() == wxID_OK )
+ // ...
+
+ // no need to call Destroy() here
+ }
+ @endcode
+
+ An application can define a wxCloseEvent handler for the dialog to respond
+ to system close events.
@beginStyleTable
@style{wxCAPTION}
Puts a caption on the dialog box.
@style{wxDEFAULT_DIALOG_STYLE}
Equivalent to a combination of wxCAPTION, wxCLOSE_BOX and
- wxSYSTEM_MENU (the last one is not used under Unix)
+ wxSYSTEM_MENU (the last one is not used under Unix).
@style{wxRESIZE_BORDER}
Display a resizeable frame around the window.
@style{wxSYSTEM_MENU}
borders unless specified in the control.
@style{wxDIALOG_NO_PARENT}
By default, a dialog created with a @NULL parent window will be
- given the application's top level window as parent. Use this style
- to prevent this from happening and create an orphan dialog. This is
- not recommended for modal dialogs.
+ given the @ref wxApp::GetTopWindow() "application's top level window"
+ as parent. Use this style to prevent this from happening and create
+ an orphan dialog. This is not recommended for modal dialogs.
@style{wxDIALOG_EX_CONTEXTHELP}
Under Windows, puts a query button on the caption. When pressed,
Windows will go into a context-sensitive help mode and wxWidgets
will send a wxEVT_HELP event if the user clicked on an application
window. Note that this is an extended style and must be set by
- calling SetExtraStyle before Create is called (two-step
+ calling SetExtraStyle() before Create is called (two-step
construction).
@style{wxDIALOG_EX_METAL}
On Mac OS X, frames with this style will be shown with a metallic
look. This is an extra style.
@endStyleTable
+ Under Unix or Linux, MWM (the Motif Window Manager) or other window
+ managers recognizing the MHM hints should be running for any of these
+ styles to have an effect.
+
@library{wxcore}
@category{cmndlg}
- @see @ref overview_wxdialogoverview, wxFrame, @ref overview_validatoroverview
- "Validator overview"
+ @see @ref overview_dialog, wxFrame, @ref overview_validator
*/
class wxDialog : public wxTopLevelWindow
{
public:
- //@{
+ /**
+ Default constructor.
+ */
+ wxDialog();
/**
Constructor.
@param parent
Can be @NULL, a frame or another dialog box.
@param id
- An identifier for the dialog. A value of -1 is taken to mean a default.
+ An identifier for the dialog. A value of -1 is taken to mean a
+ default.
@param title
The title of the dialog.
@param pos
- The dialog position. The value wxDefaultPosition indicates a default position,
- chosen by
- either the windowing system or wxWidgets, depending on platform.
+ The dialog position. The value wxDefaultPosition indicates a
+ default position, chosen by either the windowing system or
+ wxWidgets, depending on platform.
@param size
- The dialog size. The value wxDefaultSize indicates a default size, chosen by
- either the windowing system or wxWidgets, depending on platform.
+ The dialog size. The value wxDefaultSize indicates a default size,
+ chosen by either the windowing system or wxWidgets, depending on
+ platform.
@param style
- The window style. See wxDialog.
+ The window style.
@param name
- Used to associate a name with the window,
- allowing the application user to set Motif resource values for
- individual dialog boxes.
+ Used to associate a name with the window, allowing the application
+ user to set Motif resource values for individual dialog boxes.
@see Create()
*/
- wxDialog();
- wxDialog(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ wxDialog(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = "dialogBox");
- //@}
/**
- Destructor. Deletes any child windows before deleting the physical window.
+ Destructor. Deletes any child windows before deleting the physical
+ window.
*/
~wxDialog();
/**
- Adds an identifier to be regarded as a main button for the non-scrolling area
- of a dialog.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Adds an identifier to be regarded as a main button for the
+ non-scrolling area of a dialog.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
void AddMainButtonId(wxWindowID id);
/**
- Returns @true if this dialog can and should perform layout adaptation using
- DoLayoutAdaptation(), usually if
- the dialog is too large to fit on the display.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Returns @true if this dialog can and should perform layout adaptation
+ using DoLayoutAdaptation(), usually if the dialog is too large to fit
+ on the display.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
bool CanDoLayoutAdapation();
void Centre(int direction = wxBOTH);
/**
- Used for two-step dialog box construction. See wxDialog()
- for details.
+ Used for two-step dialog box construction.
+
+ @see wxDialog()
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = "dialogBox");
/**
- Creates a sizer with standard buttons. @a flags is a bit list
- of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE,
- wxHELP, wxNO_DEFAULT.
+ Creates a sizer with standard buttons. @a flags is a bit list of the
+ following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE, wxHELP,
+ wxNO_DEFAULT.
+
The sizer lays out the buttons in a manner appropriate to the platform.
- This function uses CreateStdDialogButtonSizer()
- internally for most platforms but doesn't create the sizer at all for the
- platforms with hardware buttons (such as smartphones) for which it sets up the
- hardware buttons appropriately and returns @NULL, so don't forget to test that
- the return value is valid before using it.
+
+ This function uses CreateStdDialogButtonSizer() internally for most
+ platforms but doesn't create the sizer at all for the platforms with
+ hardware buttons (such as smartphones) for which it sets up the
+ hardware buttons appropriately and returns @NULL, so don't forget to
+ test that the return value is valid before using it.
*/
wxSizer* CreateButtonSizer(long flags);
/**
- Creates a sizer with standard buttons using
- CreateButtonSizer() separated from the rest
- of the dialog contents by a horizontal wxStaticLine.
- Please notice that just like CreateButtonSizer() this function may return @c
- @NULL
- if no buttons were created.
+ Creates a sizer with standard buttons using CreateButtonSizer()
+ separated from the rest of the dialog contents by a horizontal
+ wxStaticLine.
+
+ @note Just like CreateButtonSizer(), this function may return @NULL if
+ no buttons were created.
*/
wxSizer* CreateSeparatedButtonSizer(long flags);
/**
- Creates a wxStdDialogButtonSizer with standard buttons. @a flags is a bit list
- of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE,
- wxHELP, wxNO_DEFAULT.
+ Creates a wxStdDialogButtonSizer with standard buttons. @a flags is a
+ bit list of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY,
+ wxCLOSE, wxHELP, wxNO_DEFAULT.
+
The sizer lays out the buttons in a manner appropriate to the platform.
*/
wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags);
/**
- Performs layout adaptation, usually if the dialog is too large to fit on the
- display.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Performs layout adaptation, usually if the dialog is too large to fit
+ on the display.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
bool DoLayoutAdapation();
/**
- This function is called when the titlebar OK button is pressed (PocketPC only).
- A command event for the identifier returned by GetAffirmativeId is sent by
- default. You can override this function. If the function returns @false,
- wxWidgets
- will call Close() for the dialog.
+ This function is called when the titlebar OK button is pressed
+ (PocketPC only). A command event for the identifier returned by
+ GetAffirmativeId() is sent by default. You can override this function.
+ If the function returns @false, wxWidgets will call Close() for the
+ dialog.
*/
virtual bool DoOK();
/**
- A static function enabling or disabling layout adaptation for all dialogs.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ A static function enabling or disabling layout adaptation for all
+ dialogs.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
static void EnableLayoutAdaptation(bool enable);
/**
- Ends a modal dialog, passing a value to be returned from the ShowModal()
- invocation.
+ Ends a modal dialog, passing a value to be returned from the
+ ShowModal() invocation.
@param retCode
The value that should be returned by ShowModal.
void EndModal(int retCode);
/**
- Gets the identifier of the button which works like standard OK button in this
- dialog.
+ Gets the identifier of the button which works like standard OK button
+ in this dialog.
@see SetAffirmativeId()
*/
int GetAffirmativeId() const;
/**
- Override this to return a window containing the main content of the dialog.
- This is
- particularly useful when the dialog implements pages, such as
- wxPropertySheetDialog,
- and allows the @ref overview_wxdialogoverview "layout adaptation code" to know
- that only the pages need to be made scrollable.
+ Override this to return a window containing the main content of the
+ dialog. This is particularly useful when the dialog implements pages,
+ such as wxPropertySheetDialog, and allows the
+ @ref overview_dialog "layout adaptation code" to know that only the
+ pages need to be made scrollable.
*/
wxWindow* GetContentWindow() const;
/**
- Gets the identifier of the button to map presses of @c ESC
- button to.
+ Gets the identifier of the button to map presses of @c ESC button to.
@see SetEscapeId()
*/
int GetEscapeId() const;
/**
- Returns @true if the dialog has been adapted, usually by making it scrollable
- to work with a small display.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Returns @true if the dialog has been adapted, usually by making it
+ scrollable to work with a small display.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
bool GetLayoutAdaptationDone() const;
/**
- Gets a value representing the aggressiveness of search for buttons and sizers
- to be in the non-scrolling part of a layout-adapted dialog.
- Zero switches off adaptation, and 3 allows search for standard buttons anywhere
- in the dialog.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Gets a value representing the aggressiveness of search for buttons and
+ sizers to be in the non-scrolling part of a layout-adapted dialog. Zero
+ switches off adaptation, and 3 allows search for standard buttons
+ anywhere in the dialog.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
int GetLayoutAdaptationLevel();
/**
Gets the adaptation mode, overriding the global adaptation flag.
- See also SetLayoutAdaptationMode() and @ref overview_autoscrollingdialogs
- "Automatic scrolling dialogs".
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const;
/**
A static function getting the current layout adapter object.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
static wxDialogLayoutAdapter* GetLayoutAdapter();
/**
- Returns an array of identifiers to be regarded as the main buttons for the
- non-scrolling area of a dialog.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Returns an array of identifiers to be regarded as the main buttons for
+ the non-scrolling area of a dialog.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
wxArrayInt GetMainButtonIds();
/**
Gets the return code for this window.
- @remarks A return code is normally associated with a modal dialog, where
- ShowModal() returns a code to the application.
+ @remarks A return code is normally associated with a modal dialog,
+ where ShowModal() returns a code to the application.
@see SetReturnCode(), ShowModal(), EndModal()
*/
/**
On PocketPC, a dialog is automatically provided with an empty toolbar.
- GetToolBar
- allows you to access the toolbar and add tools to it. Removing tools and adding
- arbitrary controls are not currently supported.
+ This function allows you to access the toolbar and add tools to it.
+ Removing tools and adding arbitrary controls are not currently
+ supported.
+
This function is not available on any other platform.
*/
wxToolBar* GetToolBar() const;
If @true, iconizes the dialog box; if @false, shows and restores it.
@remarks Note that in Windows, iconization has no effect since dialog
- boxes cannot be iconized. However, applications may
- need to explicitly restore dialog boxes under Motif
- which have user-iconizable frames, and under Windows
- calling Iconize(@false) will bring the window to the
- front, as does Show(@true).
+ boxes cannot be iconized. However, applications may need to
+ explicitly restore dialog boxes under Motif which have
+ user-iconizable frames, and under Windows calling
+ Iconize(@false) will bring the window to the front, as does
+ Show(@true).
*/
void Iconize(bool iconize);
bool IsIconized() const;
/**
- A static function returning @true if layout adaptation is enabled for all
- dialogs.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ A static function returning @true if layout adaptation is enabled for
+ all dialogs.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
static bool IsLayoutAdaptationEnabled();
/**
- Returns @true if @a id is in the array of identifiers to be regarded as the
- main buttons for the non-scrolling area of a dialog.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Returns @true if @a id is in the array of identifiers to be regarded as
+ the main buttons for the non-scrolling area of a dialog.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
bool IsMainButton(wxWindowID& id) const;
The colour change event.
@remarks Changes the dialog's colour to conform to the current settings
- (Windows only). Add an event table entry for your
- dialog class if you wish the behaviour to be different
- (such as keeping a user-defined background colour). If
- you do override this function, call wxEvent::Skip to
- propagate the notification to child windows and
- controls.
+ (Windows only). Add an event table entry for your dialog class
+ if you wish the behaviour to be different (such as keeping a
+ user-defined background colour). If you do override this
+ function, call wxEvent::Skip() to propagate the notification
+ to child windows and controls.
@see wxSysColourChangedEvent
*/
/**
Sets the identifier to be used as OK button. When the button with this
- identifier is pressed, the dialog calls wxWindow::Validate
- and wxWindow::TransferDataFromWindow
- and, if they both return @true, closes the dialog with @c wxID_OK return
- code.
- Also, when the user presses a hardware OK button on the devices having one or
- the special OK button in the PocketPC title bar, an event with this id is
- generated.
+ identifier is pressed, the dialog calls wxWindow::Validate() and
+ wxWindow::TransferDataFromWindow() and, if they both return @true,
+ closes the dialog with wxID_OK return code.
+
+ Also, when the user presses a hardware OK button on the devices having
+ one or the special OK button in the PocketPC title bar, an event with
+ this id is generated.
+
By default, the affirmative id is wxID_OK.
@see GetAffirmativeId(), SetEscapeId()
/**
Sets the identifier of the button which should work like the standard
- @c CANCEL button in this dialog. When the button with this id is
- clicked, the dialog is closed. Also, when the user presses @c ESC
- key in the dialog or closes the dialog using the close button in the title bar,
- this is mapped to the click of the button with the specified id.
- By default, the escape id is the special value @c wxID_ANY meaning that
- @c wxID_CANCEL button is used if it's present in the dialog and
- otherwise the button with GetAffirmativeId()
- is used. Another special value for @a id is @c wxID_NONE meaning that
- @c ESC presses should be ignored. If any other value is given, it
- is interpreted as the id of the button to map the escape key to.
+ "Cancel" button in this dialog. When the button with this id is
+ clicked, the dialog is closed. Also, when the user presses @c ESC key
+ in the dialog or closes the dialog using the close button in the title
+ bar, this is mapped to the click of the button with the specified id.
+
+ By default, the escape id is the special value wxID_ANY meaning that
+ wxID_CANCEL button is used if it's present in the dialog and otherwise
+ the button with GetAffirmativeId() is used. Another special value for
+ @a id is wxID_NONE meaning that @c ESC presses should be ignored. If
+ any other value is given, it is interpreted as the id of the button to
+ map the escape key to.
*/
void SetEscapeId(int id);
@param icon
The icon to associate with this dialog.
+
+ @see wxIcon
*/
void SetIcon(const wxIcon& icon);
@param icons
The icons to associate with this dialog.
+
+ @see wxIconBundle
*/
void SetIcons(const wxIconBundle& icons);
/**
- Marks the dialog as having been adapted, usually by making it scrollable to
- work with a small display.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ Marks the dialog as having been adapted, usually by making it
+ scrollable to work with a small display.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
void SetLayoutAdaptationDone(bool done);
/**
Sets the aggressiveness of search for buttons and sizers to be in the
- non-scrolling part of a layout-adapted dialog.
- Zero switches off adaptation, and 3 allows search for standard buttons anywhere
- in the dialog.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ non-scrolling part of a layout-adapted dialog. Zero switches off
+ adaptation, and 3 allows search for standard buttons anywhere in the
+ dialog.
+
+ @see @ref overview_dialog_autoscrolling (for more on layout adaptation)
*/
void SetLayoutAdaptationLevel(int level);
/**
- Sets the adaptation mode, overriding the global adaptation flag. @a mode may be
- one of the following values:
+ Sets the adaptation mode, overriding the global adaptation flag.
- See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
- more on layout adaptation.
+ @see wxDialogLayoutAdaptationMode, @ref overview_dialog_autoscrolling
+ (for more on layout adaptation)
*/
void SetLayoutAdaptationMode(wxDialogLayoutAdaptationMode mode);
/**
- A static function for setting the current layout adapter object, returning the
- old adapter. If you call this, you should
- delete the old adapter object.
- See also wxDialogLayoutAdapter and @ref overview_autoscrollingdialogs
- "Automatic scrolling dialogs".
+ A static function for setting the current layout adapter object,
+ returning the old adapter. If you call this, you should delete the old
+ adapter object.
+
+ @see wxDialogLayoutAdapter, @ref overview_dialog_autoscrolling
*/
static wxDialogLayoutAdapter* SetLayoutAdapter(wxDialogLayoutAdapter* adapter);
/**
- @note This function is deprecated and doesn't work for all ports, just use
- ShowModal() to show a modal dialog instead.
- Allows the programmer to specify whether the dialog box is modal (Show() blocks
- control
- until the dialog is hidden) or modeless (control returns immediately).
+ @deprecated This function doesn't work for all ports, just use
+ ShowModal() to show a modal dialog instead.
+
+ Allows the programmer to specify whether the dialog box is modal
+ (Show() blocks control until the dialog is hidden) or modeless (control
+ returns immediately).
@param flag
If @true, the dialog will be modal, otherwise it will be modeless.
/**
Sets the return code for this window.
+ A return code is normally associated with a modal dialog, where
+ ShowModal() returns a code to the application. The function EndModal()
+ calls SetReturnCode().
+
@param retCode
The integer return code, usually a control identifier.
- @remarks A return code is normally associated with a modal dialog, where
- ShowModal() returns a code to the application.
- The function EndModal() calls SetReturnCode.
-
@see GetReturnCode(), ShowModal(), EndModal()
*/
void SetReturnCode(int retCode);
/**
- Hides or shows the dialog.
+ Hides or shows the dialog. The preferred way of dismissing a modal
+ dialog is to use EndModal().
@param show
- If @true, the dialog box is shown and brought to the front;
- otherwise the box is hidden. If @false and the dialog is
- modal, control is returned to the calling program.
-
- @remarks The preferred way of dismissing a modal dialog is to use
- EndModal().
+ If @true, the dialog box is shown and brought to the front,
+ otherwise the box is hidden. If @false and the dialog is modal,
+ control is returned to the calling program.
*/
bool Show(bool show);
/**
- Shows a modal dialog. Program flow does not return until the dialog has been
- dismissed with
- EndModal().
+ Shows a modal dialog. Program flow does not return until the dialog has
+ been dismissed with EndModal().
+
+ @returns The value set with SetReturnCode().
- @returns The return value is the value set with SetReturnCode().
+ @see EndModal(), GetReturnCode(), SetReturnCode()
*/
int ShowModal();
};
@class wxDialogLayoutAdapter
@wxheader{dialog.h}
- This abstract class is the base for classes that help wxWidgets peform run-time
- layout adaptation of dialogs. Principally,
- this is to cater for small displays by making part of the dialog scroll, but
- the application developer may find other
- uses for layout adaption.
+ This abstract class is the base for classes that help wxWidgets peform
+ run-time layout adaptation of dialogs. Principally, this is to cater for
+ small displays by making part of the dialog scroll, but the application
+ developer may find other uses for layout adaption.
- By default, there is one instance of wxStandardDialogLayoutAdapter
- which can perform adaptation for most custom dialogs and dialogs with book
- controls
- such as wxPropertySheetDialog.
+ By default, there is one instance of wxStandardDialogLayoutAdapter which
+ can perform adaptation for most custom dialogs and dialogs with book
+ controls such as wxPropertySheetDialog.
@library{wxcore}
- @category{FIXME}
+ @category{winlayout}
- @see @ref overview_autoscrollingdialogs "Automatic scrolling dialogs"
+ @see @ref overview_dialog_autoscrolling
*/
class wxDialogLayoutAdapter
{
bool CanDoLayoutAdaptation(wxDialog* dialog);
/**
- Override this to perform layout adaptation, such as making parts of the dialog
- scroll and resizing the dialog to fit the display.
- Normally this function will be called just before the dialog is shown.
+ Override this to perform layout adaptation, such as making parts of the
+ dialog scroll and resizing the dialog to fit the display. Normally this
+ function will be called just before the dialog is shown.
*/
bool DoLayoutAdaptation(wxDialog* dialog);
};
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: ipcbase.h
+// Purpose: interface of wxConnectionBase
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+enum wxIPCFormat
+{
+ wxIPC_INVALID = 0,
+ wxIPC_TEXT = 1, ///< CF_TEXT
+ wxIPC_BITMAP = 2, ///< CF_BITMAP
+ wxIPC_METAFILE = 3, ///< CF_METAFILEPICT
+ wxIPC_SYLK = 4,
+ wxIPC_DIF = 5,
+ wxIPC_TIFF = 6,
+ wxIPC_OEMTEXT = 7, ///< CF_OEMTEXT
+ wxIPC_DIB = 8, ///< CF_DIB
+ wxIPC_PALETTE = 9,
+ wxIPC_PENDATA = 10,
+ wxIPC_RIFF = 11,
+ wxIPC_WAVE = 12,
+ wxIPC_UTF16TEXT = 13, ///< CF_UNICODE
+ wxIPC_ENHMETAFILE = 14,
+ wxIPC_FILENAME = 15, ///< CF_HDROP
+ wxIPC_LOCALE = 16,
+ wxIPC_UTF8TEXT = 17,
+ wxIPC_UTF32TEXT = 18,
+ wxIPC_UNICODETEXT = wxIPC_UTF16TEXT,
+ wxIPC_PRIVATE = 20
+};
+
+/**
+ @class wxConnectionBase
+ @wxheader{ipcbase.h}
+
+ @todo Document this class.
+
+ This class provides base, common functionality shared between
+ wxDDEConnection, and wxTCPConnection.
+
+ @library{wxbase}
+ @category{ipc}
+
+ @see wxDDEConnection, wxTCPConnection
+*/
+class wxConnectionBase: public wxObject
+{
+public:
+
+};
+