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