Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master. Rebake to resolve conflicts in generated files.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
don't support URLs, licence text nor custom icons in the about dialog and if
|
||||
either of those is used, wxAboutBox() will automatically use the generic version
|
||||
so you should avoid specifying these fields to achieve more native look and feel.
|
||||
|
||||
|
||||
Example of usage:
|
||||
@code
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -37,7 +37,7 @@
|
||||
aboutInfo.SetName("MyApp");
|
||||
aboutInfo.SetVersion(MY_APP_VERSION_STRING);
|
||||
aboutInfo.SetDescription(_("My wxWidgets-based application!"));
|
||||
aboutInfo.SetCopyright("(C) 1992-2018");
|
||||
aboutInfo.SetCopyright("(C) 1992-2020");
|
||||
aboutInfo.SetWebSite("http://myapp.org");
|
||||
aboutInfo.AddDeveloper("My Self");
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
Returns the icon set by SetIcon().
|
||||
*/
|
||||
wxIcon GetIcon() const;
|
||||
|
||||
|
||||
/**
|
||||
Set the icon to be shown in the dialog. By default the icon of the main frame
|
||||
will be shown if the native about dialog supports custom icons. If it doesn't
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
"Version " to @a version).
|
||||
|
||||
The generic about dialog and native GTK+ dialog use @a version only,
|
||||
as a suffix to the program name. The native MSW and OS X about dialogs
|
||||
as a suffix to the program name. The native MSW and macOS about dialogs
|
||||
use the long version.
|
||||
*/
|
||||
void SetVersion(const wxString& version, const wxString& longVersion = wxString());
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
@see SetVersion()
|
||||
*/
|
||||
const wxString& GetVersion() const;
|
||||
|
||||
|
||||
/**
|
||||
Return the long version string if set.
|
||||
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
Returns the description of the website URL set for the dialog.
|
||||
*/
|
||||
const wxString& GetWebSiteDescription() const;
|
||||
|
||||
|
||||
/**
|
||||
Set the web site for the program and its description (which defaults to @a url
|
||||
itself if empty).
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
void SetWebSite(const wxString& url,
|
||||
const wxString& desc = wxEmptyString);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Returns @true if developers have been set in the dialog info.
|
||||
*/
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
*/
|
||||
const wxArrayString& GetTranslators() const;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -15,13 +15,13 @@ enum wxAcceleratorEntryFlags
|
||||
/** hold Alt key down */
|
||||
wxACCEL_ALT,
|
||||
|
||||
/** hold Ctrl key down, corresponds to Command key on OS X */
|
||||
/** hold Ctrl key down, corresponds to Command key on macOS */
|
||||
wxACCEL_CTRL,
|
||||
|
||||
/** hold Shift key down */
|
||||
wxACCEL_SHIFT,
|
||||
|
||||
/** corresponds to real Ctrl key on OS X, identic to @c wxACCEL_CTRL on other platforms */
|
||||
/** corresponds to real Ctrl key on macOS, identic to @c wxACCEL_CTRL on other platforms */
|
||||
wxACCEL_RAW_CTRL,
|
||||
|
||||
/** deprecated, identic to @c wxACCEL_CTRL on all platforms. */
|
||||
|
@@ -95,8 +95,8 @@ public:
|
||||
using this control instead of just creating and managing the buttons
|
||||
directly is that the correct buttons and layout for the current platform
|
||||
are used by this class. E.g. the buttons are positioned under the list
|
||||
control under OS X and GTK+ but to its right under MSW and the buttons
|
||||
themselves use system-specific bitmaps under OS X.
|
||||
control under macOS and GTK+ but to its right under MSW and the buttons
|
||||
themselves use system-specific bitmaps under macOS.
|
||||
|
||||
This class is always used in conjunction with wxAddRemoveAdaptor which is
|
||||
used to actually add items to or remove them from the control containing
|
||||
|
@@ -36,7 +36,7 @@ struct wxMatrix2D
|
||||
|
||||
/**
|
||||
@class wxAffineMatrix2DBase
|
||||
|
||||
|
||||
A 2x3 matrix representing an affine 2D transformation.
|
||||
|
||||
This is an abstract base class implemented by wxAffineMatrix2D only so far,
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
|
||||
@param cRadians
|
||||
Rotation angle in radians, clockwise.
|
||||
*/
|
||||
*/
|
||||
virtual void Rotate(wxDouble cRadians) = 0;
|
||||
|
||||
/**
|
||||
|
32
interface/wx/anidecod.h
Normal file
32
interface/wx/anidecod.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/anidecod.h
|
||||
// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
|
||||
// Author: Francesco Montorsi
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
@class wxANIDecoder
|
||||
|
||||
An animation decoder supporting animated cursor (.ani) files.
|
||||
*/
|
||||
class wxANIDecoder : public wxAnimationDecoder
|
||||
{
|
||||
public:
|
||||
wxANIDecoder();
|
||||
~wxANIDecoder();
|
||||
|
||||
virtual bool Load( wxInputStream& stream );
|
||||
virtual wxAnimationDecoder *Clone() const;
|
||||
virtual wxAnimationType GetType() const;
|
||||
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const;
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const;
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const;
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
|
||||
virtual long GetDelay(unsigned int frame) const;
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const;
|
||||
|
||||
protected:
|
||||
virtual bool DoCanRead(wxInputStream& stream) const;
|
||||
};
|
@@ -39,6 +39,10 @@ enum wxAnimationType
|
||||
|
||||
It is only available if @c wxUSE_ANIMATIONCTRL is set to 1 (the default).
|
||||
|
||||
For the platforms where this control has a native implementation, it may
|
||||
have only limited support for the animation types, see @c
|
||||
wxGenericAnimationCtrl if you need to support all of them.
|
||||
|
||||
@beginStyleTable
|
||||
@style{wxAC_DEFAULT_STYLE}
|
||||
The default style: wxBORDER_NONE.
|
||||
@@ -103,6 +107,28 @@ public:
|
||||
long style = wxAC_DEFAULT_STYLE,
|
||||
const wxString& name = wxAnimationCtrlNameStr);
|
||||
|
||||
/**
|
||||
Create a new animation object compatible with this control.
|
||||
|
||||
A wxAnimation object created using this function is always compatible
|
||||
with controls of this type, see wxAnimation::IsCompatibleWith().
|
||||
|
||||
@see CreateCompatibleAnimation()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
wxAnimation CreateAnimation() const;
|
||||
|
||||
/**
|
||||
Create a new animation object compatible with this control.
|
||||
|
||||
This method does the same thing as CreateAnimation() but is static,
|
||||
i.e. can be called without creating any wxAnimationCtrl objects.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
static wxAnimation CreateCompatibleAnimation();
|
||||
|
||||
/**
|
||||
Returns the animation associated with this control.
|
||||
*/
|
||||
@@ -177,22 +203,109 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxAnimation
|
||||
@class wxGenericAnimationCtrl
|
||||
|
||||
This class encapsulates the concept of a platform-dependent animation.
|
||||
An animation is a sequence of frames of the same size.
|
||||
Sound is not supported by wxAnimation.
|
||||
Generic implementation of wxAnimationCtrl interface.
|
||||
|
||||
Note that on wxGTK wxAnimation is capable of loading the formats supported
|
||||
by the internally-used @c gdk-pixbuf library (typically this means only
|
||||
@c wxANIMATION_TYPE_GIF).
|
||||
On other platforms wxAnimation is always capable of loading both GIF and ANI
|
||||
formats (i.e. both @c wxANIMATION_TYPE_GIF and @c wxANIMATION_TYPE_ANI).
|
||||
If the platform supports a native animation control (currently just wxGTK)
|
||||
then this class implements the same interface internally in wxWidgets.
|
||||
One advantage of using this class instead of the native version is that
|
||||
this version of the control is capable of using animations in other formats
|
||||
than the ones supported by the @c gdk-pixbuf library used by wxGTK, which
|
||||
typically only supports @c wxANIMATION_TYPE_GIF.
|
||||
|
||||
Note that to use this class you need to explicitly include the generic
|
||||
header after including the main one before using it, i.e.
|
||||
@code
|
||||
#include <wx/animate.h>
|
||||
#include <wx/generic/animate.h>
|
||||
@endcode
|
||||
|
||||
@library{wxcore}
|
||||
@category{gdi}
|
||||
*/
|
||||
|
||||
class wxGenericAnimationCtrl : public wxAnimationCtrl
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Initializes the object and calls Create() with
|
||||
all the parameters.
|
||||
*/
|
||||
wxGenericAnimationCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxAnimation& anim = wxNullAnimation,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxAC_DEFAULT_STYLE,
|
||||
const wxString& name = wxAnimationCtrlNameStr);
|
||||
|
||||
/**
|
||||
Creates the control with the given @a anim animation.
|
||||
|
||||
After control creation you must explicitly call Play() to start to play
|
||||
the animation. Until that function won't be called, the first frame
|
||||
of the animation is displayed.
|
||||
|
||||
@param parent
|
||||
Parent window, must be non-@NULL.
|
||||
@param id
|
||||
The identifier for the control.
|
||||
@param anim
|
||||
The initial animation shown in the control.
|
||||
@param pos
|
||||
Initial position.
|
||||
@param size
|
||||
Initial size.
|
||||
@param style
|
||||
The window style, see wxAC_* flags.
|
||||
@param name
|
||||
Control name.
|
||||
|
||||
@return @true if the control was successfully created or @false if
|
||||
creation failed.
|
||||
*/
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxAnimation& anim = wxNullAnimation,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxAC_DEFAULT_STYLE,
|
||||
const wxString& name = wxAnimationCtrlNameStr);
|
||||
|
||||
/**
|
||||
Draw the current frame of the animation into given DC.
|
||||
This is fast as current frame is always cached.
|
||||
*/
|
||||
void DrawCurrentFrame(wxDC& dc);
|
||||
|
||||
/**
|
||||
Returns a wxBitmap with the current frame drawn in it.
|
||||
*/
|
||||
wxBitmap& GetBackingStore();
|
||||
|
||||
/**
|
||||
This overload of Play() lets you specify if the animation must loop or not
|
||||
*/
|
||||
bool Play(bool looped);
|
||||
|
||||
/**
|
||||
Specify whether the animation's background colour is to be shown (the default),
|
||||
or whether the window background should show through
|
||||
*/
|
||||
void SetUseWindowBackgroundColour(bool useWinBackground = true);
|
||||
|
||||
/**
|
||||
Returns @c true if the window's background colour is being used.
|
||||
*/
|
||||
bool IsUsingWindowBackgroundColour() const;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxAnimation
|
||||
|
||||
The @c wxAnimation class handles the interface between the animation
|
||||
control and the details of the animation image or data.
|
||||
|
||||
@stdobjects
|
||||
::wxNullAnimation
|
||||
@@ -203,45 +316,56 @@ class wxAnimation : public wxObject
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Default ctor.
|
||||
*/
|
||||
Constructs a new empty animation object.
|
||||
|
||||
Call Load() to initialize it.
|
||||
|
||||
@see wxAnimationCtrl::CreateAnimation()
|
||||
*/
|
||||
wxAnimation();
|
||||
|
||||
/**
|
||||
Copy ctor.
|
||||
*/
|
||||
wxAnimation(const wxAnimation& anim);
|
||||
|
||||
/**
|
||||
Loads an animation from a file.
|
||||
Constructs a new animation object and load the animation data from the
|
||||
given filename.
|
||||
|
||||
@param name
|
||||
The name of the file to load.
|
||||
A filename.
|
||||
@param type
|
||||
See LoadFile() for more info.
|
||||
*/
|
||||
wxAnimation(const wxString& name,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
One of the ::wxAnimationType values; wxANIMATION_TYPE_ANY
|
||||
means that the function should try to autodetect the filetype.
|
||||
|
||||
@see wxAnimationCtrl::CreateAnimation()
|
||||
*/
|
||||
wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
/**
|
||||
Destructor.
|
||||
See @ref overview_refcount_destruct for more info.
|
||||
Copy constructor.
|
||||
*/
|
||||
virtual ~wxAnimation();
|
||||
wxAnimation(const wxAnimation& other);
|
||||
|
||||
/**
|
||||
Returns @true if animation data is present.
|
||||
*/
|
||||
bool IsOk() const;
|
||||
|
||||
/**
|
||||
Returns @true if animation can be used with controls of the given type.
|
||||
|
||||
This function checks if this animation object can be used with
|
||||
wxAnimationCtrl of particular type. This will be always the case for
|
||||
the platforms where only a single wxAnimationCtrl implementation is
|
||||
available, but not necessarily under e.g. wxGTK where both native (but
|
||||
limited) GTK implementation and generic implementation can be used.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool IsCompatibleWith(wxClassInfo* ci) const;
|
||||
|
||||
/**
|
||||
Returns the delay for the i-th frame in milliseconds.
|
||||
If @c -1 is returned the frame is to be displayed forever.
|
||||
*/
|
||||
virtual int GetDelay(unsigned int i) const;
|
||||
|
||||
/**
|
||||
Returns the i-th frame as a wxImage.
|
||||
|
||||
This method is not implemented in the native wxGTK implementation of
|
||||
this class and always returns an invalid image there.
|
||||
*/
|
||||
virtual wxImage GetFrame(unsigned int i) const;
|
||||
int GetDelay(unsigned int frame) const;
|
||||
|
||||
/**
|
||||
Returns the number of frames for this animation.
|
||||
@@ -249,17 +373,33 @@ public:
|
||||
This method is not implemented in the native wxGTK implementation of
|
||||
this class and always returns 0 there.
|
||||
*/
|
||||
virtual unsigned int GetFrameCount() const;
|
||||
unsigned int GetFrameCount() const;
|
||||
|
||||
/**
|
||||
Returns the size of the animation.
|
||||
Returns the i-th frame as a wxImage.
|
||||
|
||||
This method is not implemented in the native wxGTK implementation of
|
||||
this class and always returns an invalid image there.
|
||||
*/
|
||||
virtual wxSize GetSize() const;
|
||||
wxImage GetFrame(unsigned int frame) const;
|
||||
|
||||
/**
|
||||
Returns @true if animation data is present.
|
||||
Returns the size of the animation.
|
||||
*/
|
||||
virtual bool IsOk() const;
|
||||
wxSize GetSize() const;
|
||||
|
||||
/**
|
||||
Loads an animation from a file.
|
||||
|
||||
@param name
|
||||
A filename.
|
||||
@param type
|
||||
One of the ::wxAnimationType values; wxANIMATION_TYPE_ANY
|
||||
means that the function should try to autodetect the filetype.
|
||||
|
||||
@return @true if the operation succeeded, @false otherwise.
|
||||
*/
|
||||
bool LoadFile(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
/**
|
||||
Loads an animation from the given stream.
|
||||
@@ -273,30 +413,45 @@ public:
|
||||
|
||||
@return @true if the operation succeeded, @false otherwise.
|
||||
*/
|
||||
virtual bool Load(wxInputStream& stream,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
|
||||
/**
|
||||
Loads an animation from a file.
|
||||
|
||||
@param name
|
||||
A filename.
|
||||
@param type
|
||||
One of the ::wxAnimationType values; wxANIMATION_TYPE_ANY
|
||||
means that the function should try to autodetect the filetype.
|
||||
|
||||
@return @true if the operation succeeded, @false otherwise.
|
||||
*/
|
||||
virtual bool LoadFile(const wxString& name,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
Returns the list of animation decoders used by the generic animation
|
||||
and @c wxGenericAnimationCtrl.
|
||||
*/
|
||||
static inline wxAnimationDecoderList& GetHandlers();
|
||||
|
||||
/**
|
||||
Assignment operator, using @ref overview_refcount "reference counting".
|
||||
Add a new decoder to the list of animation decoders.
|
||||
*/
|
||||
static void AddHandler(wxAnimationDecoder *handler);
|
||||
|
||||
/**
|
||||
Insert a new decoder to the front of the list of animation decoders.
|
||||
*/
|
||||
static void InsertHandler(wxAnimationDecoder *handler);
|
||||
|
||||
/**
|
||||
Search for an animation decoder by type.
|
||||
*/
|
||||
static const wxAnimationDecoder *FindHandler( wxAnimationType animType );
|
||||
|
||||
/**
|
||||
Load the stock animation decoders (currently GIF and ANI) into the list
|
||||
of decoders. This is called automatically at program startup.
|
||||
*/
|
||||
wxAnimation& operator =(const wxAnimation& brush);
|
||||
static void InitStandardHandlers();
|
||||
|
||||
/**
|
||||
Clear out the animation decoder list. This is called automatically at
|
||||
program shutdown.
|
||||
*/
|
||||
static void CleanUpHandlers();
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// Global functions/macros
|
||||
// ============================================================================
|
||||
@@ -305,4 +460,3 @@ public:
|
||||
An empty animation object.
|
||||
*/
|
||||
wxAnimation wxNullAnimation;
|
||||
|
||||
|
111
interface/wx/animdecod.h
Normal file
111
interface/wx/animdecod.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/animdecod.h
|
||||
// Purpose: wxAnimationDecoder
|
||||
// Author: Francesco Montorsi
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum wxAnimationDisposal
|
||||
{
|
||||
/// No disposal specified. The decoder is not required to take any action.
|
||||
wxANIM_UNSPECIFIED = -1,
|
||||
|
||||
/// Do not dispose. The graphic is to be left in place.
|
||||
wxANIM_DONOTREMOVE = 0,
|
||||
|
||||
/// Restore to background color. The area used by the graphic must be
|
||||
/// restored to the background color.
|
||||
wxANIM_TOBACKGROUND = 1,
|
||||
|
||||
/// Restore to previous. The decoder is required to restore the area
|
||||
/// overwritten by the graphic with what was there prior to rendering the graphic.
|
||||
wxANIM_TOPREVIOUS = 2
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxAnimationDecoder
|
||||
|
||||
wxAnimationDecoder is used by @c wxAnimation for loading frames and other
|
||||
information for the animation from the animation image file.
|
||||
|
||||
*/
|
||||
class wxAnimationDecoder : public wxObjectRefData
|
||||
{
|
||||
public:
|
||||
wxAnimationDecoder();
|
||||
|
||||
/**
|
||||
Load the animation image frames from the given stream.
|
||||
*/
|
||||
virtual bool Load( wxInputStream& stream ) = 0;
|
||||
|
||||
/**
|
||||
Returns @true if this decoder supports loading from the given stream.
|
||||
*/
|
||||
bool CanRead( wxInputStream& stream ) const;
|
||||
|
||||
/**
|
||||
Create a copy of this decoder.
|
||||
*/
|
||||
virtual wxAnimationDecoder *Clone() const = 0;
|
||||
|
||||
/**
|
||||
Return the animation type this decoder implements.
|
||||
*/
|
||||
virtual wxAnimationType GetType() const = 0;
|
||||
|
||||
/**
|
||||
Convert given frame to @c wxImage.
|
||||
*/
|
||||
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
|
||||
|
||||
|
||||
/*
|
||||
Get the size of the given animation frame.
|
||||
|
||||
It's possible that not all frames are of the same size; e.g. GIF allows
|
||||
to specify that between two frames only a smaller portion of the entire
|
||||
animation has changed.
|
||||
*/
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const = 0;
|
||||
|
||||
/*
|
||||
Returns the position of the frame, in case it's not as big as the animation size,
|
||||
or @c wxPoint(0,0) otherwise.
|
||||
*/
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
|
||||
|
||||
/**
|
||||
What should be done after displaying this frame.
|
||||
*/
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
|
||||
|
||||
/**
|
||||
Return the number of milliseconds this frame should be displayed.
|
||||
If -1 is returned then the frame must be displayed forever.
|
||||
*/
|
||||
virtual long GetDelay(unsigned int frame) const = 0;
|
||||
|
||||
/**
|
||||
The transparent colour for this frame, if any, or @c wxNullColour.
|
||||
*/
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
|
||||
|
||||
wxSize GetAnimationSize() const;
|
||||
wxColour GetBackgroundColour() const;
|
||||
unsigned int GetFrameCount() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
Checks the signature of the data in the given stream and returns true if it
|
||||
appears to be a valid animation format recognized by the animation decoder;
|
||||
this function should modify the stream current position without taking care
|
||||
of restoring it since @c CanRead() will do it.
|
||||
*/
|
||||
virtual bool DoCanRead(wxInputStream& stream) const = 0;
|
||||
};
|
||||
|
||||
|
@@ -84,6 +84,25 @@ public:
|
||||
cannot be converted to a specific data type, wxAny will then
|
||||
hold and manage reference to wxVariantData* similar to how
|
||||
wxVariant does.
|
||||
|
||||
Note that objects constructed from list-valued variants
|
||||
require the list to be explicitly cleared using `WX_CLEAR_LIST`
|
||||
to avoid leaking memory. This unfortunate behaviour will not
|
||||
be changed to prevent breaking the existing code relying on it.
|
||||
|
||||
@code
|
||||
wxVariant vList;
|
||||
vList.NullList();
|
||||
vList.Append(15);
|
||||
vList.Append("abc");
|
||||
|
||||
// Create wxAny from the list variant.
|
||||
wxAny any = wxAny(vList);
|
||||
|
||||
// Clear the list to avoid the memory leak.
|
||||
wxAnyList anyList = any.As<wxAnyList>();
|
||||
WX_CLEAR_LIST(wxAnyList, anyList);
|
||||
@endcode
|
||||
*/
|
||||
wxAny(const wxVariant& variant);
|
||||
|
||||
|
@@ -91,7 +91,7 @@ public:
|
||||
*/
|
||||
wxBitmap GetBitmapPressed() const;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Sets the bitmap to display in the button.
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
previous versions)
|
||||
*/
|
||||
void SetBitmapPressed(const wxBitmap& bitmap);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Get the margins between the bitmap and the text of the button.
|
||||
|
@@ -401,6 +401,12 @@ public:
|
||||
Called from OnInit() and may be used to initialize the parser with the
|
||||
command line options for this application. The base class versions adds
|
||||
support for a few standard options only.
|
||||
|
||||
Note that this method should just configure @a parser to accept the
|
||||
desired command line options by calling wxCmdLineParser::AddOption(),
|
||||
wxCmdLineParser::AddSwitch() and similar methods, but should @e not
|
||||
call wxCmdLineParser::Parse() as this will be done by wxWidgets itself
|
||||
slightly later.
|
||||
*/
|
||||
virtual void OnInitCmdLine(wxCmdLineParser& parser);
|
||||
|
||||
@@ -749,8 +755,7 @@ public:
|
||||
std::locale::global(std::locale(""));
|
||||
@endcode
|
||||
but be warned that locale support in C++ standard library can be poor
|
||||
or worse under some platforms, e.g. the above line results in an
|
||||
immediate crash under OS X up to the version 10.8.2.
|
||||
or worse under some platforms.
|
||||
|
||||
@since 2.9.5
|
||||
*/
|
||||
@@ -766,7 +771,7 @@ public:
|
||||
|
||||
Under Windows and Linux/Unix, you should parse the command line
|
||||
arguments and check for files to be opened when starting your
|
||||
application. Under OS X, you need to override MacOpenFiles()
|
||||
application. Under macOS, you need to override MacOpenFiles()
|
||||
since command line arguments are used differently there.
|
||||
|
||||
You may use the wxCmdLineParser to parse command line arguments.
|
||||
@@ -1049,7 +1054,7 @@ public:
|
||||
|
||||
/**
|
||||
May be overridden to indicate that the application is not a foreground
|
||||
GUI application under OS X.
|
||||
GUI application under macOS.
|
||||
|
||||
This method is called during the application startup and returns @true
|
||||
by default. In this case, wxWidgets ensures that the application is ran
|
||||
@@ -1063,11 +1068,26 @@ public:
|
||||
is specified in the @c Info.plist file.
|
||||
|
||||
@onlyfor{wxosx}
|
||||
|
||||
|
||||
@since 3.0.1
|
||||
*/
|
||||
virtual bool OSXIsGUIApplication();
|
||||
|
||||
/**
|
||||
Enable the automatic tabbing features of macOS.
|
||||
|
||||
This feature is native to the operating system. When it is enabled, macOS
|
||||
will automatically place windows inside tabs and show a tab bar in the
|
||||
application. Entries are also added to the View menu to show/hide the tab bar.
|
||||
|
||||
@onlyfor{wxosx}
|
||||
|
||||
@remarks Requires macOS 10.12+, does nothing under earlier OS versions.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
void OSXEnableAutomaticTabbing(bool enable);
|
||||
|
||||
//@}
|
||||
|
||||
};
|
||||
@@ -1161,7 +1181,7 @@ wxAppDerivedClass& wxGetApp();
|
||||
Notice that this function is only available if @c wxUSE_ON_FATAL_EXCEPTION
|
||||
is 1 and under Windows platform this requires a compiler with support for
|
||||
SEH (structured exception handling) which currently means only Microsoft
|
||||
Visual C++ or a recent Borland C++ version.
|
||||
Visual C++.
|
||||
|
||||
@header{wx/app.h}
|
||||
*/
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@class wxAppProgressIndicator
|
||||
|
||||
A helper class that can be used to update the progress bar in the taskbar
|
||||
button on Windows and the dock icon on OS X.
|
||||
button on Windows and the dock icon on macOS.
|
||||
|
||||
@library{wxcore}
|
||||
@category{misc}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
array.Last().MakeUpper();
|
||||
@endcode
|
||||
|
||||
@note none of the methods of wxArrayString is virtual including its
|
||||
@note None of the methods of wxArrayString is virtual including its
|
||||
destructor, so this class should not be used as a base class.
|
||||
|
||||
Although this is not true strictly speaking, this class may be considered as
|
||||
@@ -48,7 +48,7 @@
|
||||
@library{wxbase}
|
||||
@category{containers}
|
||||
|
||||
@see wxArray<T>, wxString, @ref overview_string
|
||||
@see wxSortedArrayString, wxArray<T>, wxString, @ref overview_string
|
||||
*/
|
||||
class wxArrayString : public wxArray
|
||||
{
|
||||
@@ -132,19 +132,19 @@ public:
|
||||
size_t GetCount() const;
|
||||
|
||||
/**
|
||||
Search the element in the array, starting from the beginning if @a bFromEnd
|
||||
is @false or from end otherwise. If @a bCase, comparison is case sensitive
|
||||
Searches the array for @a str, starting from the beginning if @a bFromEnd
|
||||
is @false or from the end otherwise. If @a bCase, comparison is case sensitive
|
||||
(default), otherwise the case is ignored.
|
||||
|
||||
This function uses linear search for wxArrayString.
|
||||
Returns index of the first item matched or @c wxNOT_FOUND if there is no match.
|
||||
Returns the index of the first item matched or @c wxNOT_FOUND if there is no match.
|
||||
*/
|
||||
int Index(const wxString& sz, bool bCase = true, bool bFromEnd = false) const;
|
||||
int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const;
|
||||
|
||||
/**
|
||||
Insert the given number of @a copies of the new element in the array before the
|
||||
position @a nIndex. Thus, for example, to insert the string in the beginning of
|
||||
the array you would write:
|
||||
Inserts the given number of @a copies of @a str in the array before the
|
||||
array element at the position @a nIndex. Thus, for example, to insert
|
||||
the string in the beginning of the array you would write:
|
||||
|
||||
@code
|
||||
Insert("foo", 0);
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
|
||||
If @a nIndex is equal to GetCount() this function behaves as Add().
|
||||
*/
|
||||
void Insert(wxString lItem, size_t nIndex, size_t copies = 1);
|
||||
void Insert(const wxString& str, size_t nIndex, size_t copies = 1);
|
||||
|
||||
/**
|
||||
Returns @true if the array is empty, @false otherwise. This function returns the
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
bool operator ==(const wxArrayString& array) const;
|
||||
|
||||
/**
|
||||
Return the array element at position @a nIndex. An assert failure will
|
||||
Returns the array element at position @a nIndex. An assert failure will
|
||||
result from an attempt to access an element beyond the end of array in
|
||||
debug mode, but no check is done in release mode.
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
@class wxSortedArrayString
|
||||
|
||||
wxSortedArrayString is an efficient container for storing wxString objects
|
||||
which always keeps the string in alphabetical order.
|
||||
which always keeps the strings in alphabetical order.
|
||||
|
||||
wxSortedArrayString uses binary search in its wxSortedArrayString::Index() method
|
||||
(instead of linear search for wxArrayString::Index()) which makes it much more
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
Conversion constructor.
|
||||
|
||||
Constructs a sorted array with the same contents as the (possibly
|
||||
unsorted) "array" argument.
|
||||
unsorted) @a array argument.
|
||||
*/
|
||||
wxSortedArrayString(const wxArrayString& array);
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
This function uses binary search for wxSortedArrayString, but it ignores
|
||||
the @a bCase and @a bFromEnd parameters.
|
||||
*/
|
||||
int Index(const wxString& sz, bool bCase = true,
|
||||
int Index(const wxString& str, bool bCase = true,
|
||||
bool bFromEnd = false) const;
|
||||
|
||||
/**
|
||||
@@ -363,7 +363,8 @@ public:
|
||||
This function can be used with wxSortedArrayString::Sort() or passed as an
|
||||
argument to wxSortedArrayString constructor.
|
||||
|
||||
@see wxStringSortDescending(), wxDictionaryStringSortAscending()
|
||||
@see wxStringSortDescending(), wxDictionaryStringSortAscending(),
|
||||
wxNaturalStringSortAscending()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
@@ -375,7 +376,8 @@ int wxStringSortAscending(const wxString& s1, const wxString& s2);
|
||||
This function can be used with wxSortedArrayString::Sort() or passed as an
|
||||
argument to wxSortedArrayString constructor.
|
||||
|
||||
@see wxStringSortAscending(), wxDictionaryStringSortAscending()
|
||||
@see wxStringSortAscending(), wxDictionaryStringSortDescending(),
|
||||
wxNaturalStringSortDescending()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
@@ -392,7 +394,9 @@ int wxStringSortDescending(const wxString& s1, const wxString& s2);
|
||||
This function can be used with wxSortedArrayString::Sort() or passed as an
|
||||
argument to wxSortedArrayString constructor.
|
||||
|
||||
@see wxStringSortAscending(), wxDictionaryStringSortDescending()
|
||||
@see wxDictionaryStringSortDescending(),
|
||||
wxStringSortAscending(),
|
||||
wxNaturalStringSortAscending()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
@@ -403,11 +407,91 @@ int wxDictionaryStringSortAscending(const wxString& s1, const wxString& s2);
|
||||
|
||||
See wxDictionaryStringSortAscending() for the dictionary sort description.
|
||||
|
||||
@see wxStringSortDescending()
|
||||
@see wxDictionaryStringSortAscending(),
|
||||
wxStringSortDescending(),
|
||||
wxNaturalStringSortDescending()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
int wxDictionaryStringSortAscending(const wxString& s1, const wxString& s2);
|
||||
int wxDictionaryStringSortDescending(const wxString& s1, const wxString& s2);
|
||||
|
||||
|
||||
/**
|
||||
Comparison function comparing strings in natural order.
|
||||
|
||||
This function can be used with wxSortedArrayString::Sort()
|
||||
or passed as an argument to wxSortedArrayString constructor.
|
||||
|
||||
See wxCmpNatural() for more information about how natural
|
||||
sort order is implemented.
|
||||
|
||||
@see wxNaturalStringSortDescending(),
|
||||
wxStringSortAscending(), wxDictionaryStringSortAscending()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
int wxNaturalStringSortAscending(const wxString& s1, const wxString& s2);
|
||||
|
||||
/**
|
||||
Comparison function comparing strings in reverse natural order.
|
||||
|
||||
This function can be used with wxSortedArrayString::Sort()
|
||||
or passed as an argument to wxSortedArrayString constructor.
|
||||
|
||||
See wxCmpNatural() for more information about how natural
|
||||
sort order is implemented.
|
||||
|
||||
@see wxNaturalStringSortAscending(),
|
||||
wxStringSortDescending(), wxDictionaryStringSortDescending()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
int wxNaturalStringSortDescending(const wxString& s1, const wxString& s2);
|
||||
|
||||
/**
|
||||
This function compares strings using case-insensitive collation and
|
||||
additionally, numbers within strings are recognised and compared
|
||||
numerically, rather than alphabetically. When used for sorting,
|
||||
the result is that e.g. file names containing numbers are sorted
|
||||
in a natural way.
|
||||
|
||||
For example, sorting with a simple string comparison results in:
|
||||
- file1.txt
|
||||
- file10.txt
|
||||
- file100.txt
|
||||
- file2.txt
|
||||
- file20.txt
|
||||
- file3.txt
|
||||
|
||||
But sorting the same strings in natural sort order results in:
|
||||
- file1.txt
|
||||
- file2.txt
|
||||
- file3.txt
|
||||
- file10.txt
|
||||
- file20.txt
|
||||
- file100.txt
|
||||
|
||||
wxCmpNatural() uses an OS native natural sort function when available
|
||||
(currently only under Microsoft Windows), wxCmpNaturalGeneric() otherwise.
|
||||
|
||||
Be aware that OS native implementations might differ from each other,
|
||||
and might change behaviour from release to release.
|
||||
|
||||
@see wxNaturalStringSortAscending(), wxNaturalStringSortDescending()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
int wxCmpNatural(const wxString& s1, const wxString& s2);
|
||||
|
||||
/**
|
||||
This is wxWidgets' own implementation of the natural sort comparison function.
|
||||
|
||||
@see wxCmpNatural()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
int wxCmpNaturalGeneric(const wxString& s1, const wxString& s2);
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// Global functions/macros
|
||||
|
@@ -16,80 +16,80 @@ typedef wxString wxArtClient;
|
||||
typedef wxString wxArtID;
|
||||
|
||||
|
||||
wxArtClient wxART_TOOLBAR;
|
||||
wxArtClient wxART_MENU;
|
||||
wxArtClient wxART_FRAME_ICON;
|
||||
const char* wxART_TOOLBAR;
|
||||
const char* wxART_MENU;
|
||||
const char* wxART_FRAME_ICON;
|
||||
|
||||
wxArtClient wxART_CMN_DIALOG;
|
||||
wxArtClient wxART_HELP_BROWSER;
|
||||
wxArtClient wxART_MESSAGE_BOX;
|
||||
wxArtClient wxART_BUTTON;
|
||||
wxArtClient wxART_LIST;
|
||||
const char* wxART_CMN_DIALOG;
|
||||
const char* wxART_HELP_BROWSER;
|
||||
const char* wxART_MESSAGE_BOX;
|
||||
const char* wxART_BUTTON;
|
||||
const char* wxART_LIST;
|
||||
|
||||
wxArtClient wxART_OTHER;
|
||||
const char* wxART_OTHER;
|
||||
|
||||
|
||||
wxArtID wxART_ADD_BOOKMARK;
|
||||
wxArtID wxART_DEL_BOOKMARK;
|
||||
wxArtID wxART_HELP_SIDE_PANEL;
|
||||
wxArtID wxART_HELP_SETTINGS;
|
||||
wxArtID wxART_HELP_BOOK;
|
||||
wxArtID wxART_HELP_FOLDER;
|
||||
wxArtID wxART_HELP_PAGE;
|
||||
wxArtID wxART_GO_BACK;
|
||||
wxArtID wxART_GO_FORWARD;
|
||||
wxArtID wxART_GO_UP;
|
||||
wxArtID wxART_GO_DOWN;
|
||||
wxArtID wxART_GO_TO_PARENT;
|
||||
wxArtID wxART_GO_HOME;
|
||||
wxArtID wxART_GOTO_FIRST;
|
||||
wxArtID wxART_GOTO_LAST;
|
||||
wxArtID wxART_FILE_OPEN;
|
||||
wxArtID wxART_FILE_SAVE;
|
||||
wxArtID wxART_FILE_SAVE_AS;
|
||||
wxArtID wxART_PRINT;
|
||||
wxArtID wxART_HELP;
|
||||
wxArtID wxART_TIP;
|
||||
wxArtID wxART_REPORT_VIEW;
|
||||
wxArtID wxART_LIST_VIEW;
|
||||
wxArtID wxART_NEW_DIR;
|
||||
wxArtID wxART_HARDDISK;
|
||||
wxArtID wxART_FLOPPY;
|
||||
wxArtID wxART_CDROM;
|
||||
wxArtID wxART_REMOVABLE;
|
||||
wxArtID wxART_FOLDER;
|
||||
wxArtID wxART_FOLDER_OPEN;
|
||||
wxArtID wxART_GO_DIR_UP;
|
||||
wxArtID wxART_EXECUTABLE_FILE;
|
||||
wxArtID wxART_NORMAL_FILE;
|
||||
wxArtID wxART_TICK_MARK;
|
||||
wxArtID wxART_CROSS_MARK;
|
||||
wxArtID wxART_ERROR;
|
||||
wxArtID wxART_QUESTION;
|
||||
wxArtID wxART_WARNING;
|
||||
wxArtID wxART_INFORMATION;
|
||||
wxArtID wxART_MISSING_IMAGE;
|
||||
const char* wxART_ADD_BOOKMARK;
|
||||
const char* wxART_DEL_BOOKMARK;
|
||||
const char* wxART_HELP_SIDE_PANEL;
|
||||
const char* wxART_HELP_SETTINGS;
|
||||
const char* wxART_HELP_BOOK;
|
||||
const char* wxART_HELP_FOLDER;
|
||||
const char* wxART_HELP_PAGE;
|
||||
const char* wxART_GO_BACK;
|
||||
const char* wxART_GO_FORWARD;
|
||||
const char* wxART_GO_UP;
|
||||
const char* wxART_GO_DOWN;
|
||||
const char* wxART_GO_TO_PARENT;
|
||||
const char* wxART_GO_HOME;
|
||||
const char* wxART_GOTO_FIRST;
|
||||
const char* wxART_GOTO_LAST;
|
||||
const char* wxART_FILE_OPEN;
|
||||
const char* wxART_FILE_SAVE;
|
||||
const char* wxART_FILE_SAVE_AS;
|
||||
const char* wxART_PRINT;
|
||||
const char* wxART_HELP;
|
||||
const char* wxART_TIP;
|
||||
const char* wxART_REPORT_VIEW;
|
||||
const char* wxART_LIST_VIEW;
|
||||
const char* wxART_NEW_DIR;
|
||||
const char* wxART_HARDDISK;
|
||||
const char* wxART_FLOPPY;
|
||||
const char* wxART_CDROM;
|
||||
const char* wxART_REMOVABLE;
|
||||
const char* wxART_FOLDER;
|
||||
const char* wxART_FOLDER_OPEN;
|
||||
const char* wxART_GO_DIR_UP;
|
||||
const char* wxART_EXECUTABLE_FILE;
|
||||
const char* wxART_NORMAL_FILE;
|
||||
const char* wxART_TICK_MARK;
|
||||
const char* wxART_CROSS_MARK;
|
||||
const char* wxART_ERROR;
|
||||
const char* wxART_QUESTION;
|
||||
const char* wxART_WARNING;
|
||||
const char* wxART_INFORMATION;
|
||||
const char* wxART_MISSING_IMAGE;
|
||||
|
||||
wxArtID wxART_COPY;
|
||||
wxArtID wxART_CUT;
|
||||
wxArtID wxART_PASTE;
|
||||
wxArtID wxART_DELETE;
|
||||
wxArtID wxART_NEW;
|
||||
const char* wxART_COPY;
|
||||
const char* wxART_CUT;
|
||||
const char* wxART_PASTE;
|
||||
const char* wxART_DELETE;
|
||||
const char* wxART_NEW;
|
||||
|
||||
wxArtID wxART_UNDO;
|
||||
wxArtID wxART_REDO;
|
||||
const char* wxART_UNDO;
|
||||
const char* wxART_REDO;
|
||||
|
||||
wxArtID wxART_PLUS;
|
||||
wxArtID wxART_MINUS;
|
||||
const char* wxART_PLUS;
|
||||
const char* wxART_MINUS;
|
||||
|
||||
wxArtID wxART_CLOSE;
|
||||
wxArtID wxART_QUIT;
|
||||
const char* wxART_CLOSE;
|
||||
const char* wxART_QUIT;
|
||||
|
||||
wxArtID wxART_FIND;
|
||||
wxArtID wxART_FIND_AND_REPLACE;
|
||||
const char* wxART_FIND;
|
||||
const char* wxART_FIND_AND_REPLACE;
|
||||
|
||||
wxArtID wxART_FULL_SCREEN;
|
||||
wxArtID wxART_EDIT;
|
||||
const char* wxART_FULL_SCREEN;
|
||||
const char* wxART_EDIT;
|
||||
|
||||
|
||||
/**
|
||||
@@ -200,6 +200,10 @@ wxArtID wxART_EDIT;
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
@note When building with @c wxNO_IMPLICIT_WXSTRING_ENCODING defined (see
|
||||
@ref overview_string for more details), you need to explicitly use
|
||||
wxASCII_STR() around these constants.
|
||||
|
||||
Additionally, any string recognized by custom art providers registered using
|
||||
wxArtProvider::Push may be used.
|
||||
|
||||
@@ -214,7 +218,7 @@ wxArtID wxART_EDIT;
|
||||
For a list of the GTK+ stock items please refer to the
|
||||
<a href="http://library.gnome.org/devel/gtk/stable/gtk-Stock-Items.html">GTK+ documentation
|
||||
page</a>.
|
||||
It is also possible to load icons from the current icon theme by specifying their name
|
||||
It is also possible to load icons from the current icon theme by specifying their name
|
||||
(without extension and directory components).
|
||||
Icon themes recognized by GTK+ follow the freedesktop.org
|
||||
<a href="http://freedesktop.org/Standards/icon-theme-spec">Icon Themes specification</a>.
|
||||
|
@@ -90,7 +90,7 @@ enum wxAuiToolBarStyle
|
||||
enum wxAuiToolBarArtSetting
|
||||
{
|
||||
/**
|
||||
wxAuiToolBar seperator size.
|
||||
wxAuiToolBar separator size.
|
||||
*/
|
||||
wxAUI_TBART_SEPARATOR_SIZE = 0,
|
||||
|
||||
@@ -179,11 +179,11 @@ public:
|
||||
*/
|
||||
int GetToolId() const;
|
||||
|
||||
|
||||
|
||||
void SetDropDownClicked(bool c);
|
||||
void SetClickPoint(const wxPoint& p);
|
||||
void SetItemRect(const wxRect& r);
|
||||
void SetToolId(int toolId);
|
||||
void SetToolId(int toolId);
|
||||
};
|
||||
|
||||
wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN;
|
||||
@@ -259,15 +259,22 @@ public:
|
||||
|
||||
/**
|
||||
Returns the toolbar item kind.
|
||||
|
||||
@return one of @c wxITEM_NORMAL, @c wxITEM_CHECK or @c wxITEM_RADIO,
|
||||
@c wxITEM_SEPARATOR, @c wxITEM_CONTROL, @c wxITEM_SPACER, @c wxITEM_LABEL,
|
||||
*/
|
||||
int GetKind() const;
|
||||
|
||||
/**
|
||||
Set the current state of the toolbar item.
|
||||
|
||||
@param new_state is an or'd combination of flags from wxAuiPaneButtonState
|
||||
*/
|
||||
void SetState(int new_state);
|
||||
/**
|
||||
Gets the current state of the toolbar item.
|
||||
|
||||
@return an or'd combination of flags from wxAuiPaneButtonState representing the current state
|
||||
*/
|
||||
int GetState() const;
|
||||
|
||||
@@ -407,6 +414,13 @@ public:
|
||||
|
||||
*/
|
||||
int GetAlignment() const;
|
||||
|
||||
/**
|
||||
Returns whether the toolbar item can be toggled.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
bool CanBeToggled() const;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -603,26 +617,34 @@ public:
|
||||
|
||||
@beginStyleTable
|
||||
@style{wxAUI_TB_TEXT}
|
||||
Display the label strings on the toolbar buttons.
|
||||
@style{wxAUI_TB_NO_TOOLTIPS}
|
||||
Do not show tooltips for the toolbar items.
|
||||
@style{wxAUI_TB_NO_AUTORESIZE}
|
||||
Do not automatically resize the toolbar when new tools are added.
|
||||
@style{wxAUI_TB_GRIPPER}
|
||||
Show the toolbar's gripper control. If the toolbar is added to
|
||||
an AUI pane that contains a gripper, this style will be automatically
|
||||
set.
|
||||
@style{wxAUI_TB_OVERFLOW}
|
||||
Show an overflow menu containing toolbar items that can't fit on the
|
||||
toolbar if it is too small.
|
||||
@style{wxAUI_TB_VERTICAL}
|
||||
using this style forces the toolbar to be vertical and
|
||||
Using this style forces the toolbar to be vertical and
|
||||
be only dockable to the left or right sides of the window
|
||||
whereas by default it can be horizontal or vertical and
|
||||
be docked anywhere
|
||||
be docked anywhere.
|
||||
@style{wxAUI_TB_HORZ_LAYOUT}
|
||||
@style{wxAUI_TB_HORIZONTAL}
|
||||
analogous to wxAUI_TB_VERTICAL, but forces the toolbar
|
||||
to be horizontal
|
||||
Analogous to wxAUI_TB_VERTICAL, but forces the toolbar
|
||||
to be horizontal.
|
||||
@style{wxAUI_TB_PLAIN_BACKGROUND}
|
||||
Draw a plain background (based on parent) instead of the
|
||||
default gradient background.
|
||||
@style{wxAUI_TB_HORZ_TEXT}
|
||||
Equivalent to wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT
|
||||
@style{wxAUI_TB_DEFAULT_STYLE}
|
||||
The default is to have no styles
|
||||
The default is to have no styles.
|
||||
@endStyleTable
|
||||
|
||||
@beginEventEmissionTable{wxAuiToolBarEvent}
|
||||
@@ -681,13 +703,13 @@ public:
|
||||
bool SetFont(const wxFont& font);
|
||||
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxString& short_help_string = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL);
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& disabled_bitmap,
|
||||
@@ -696,7 +718,7 @@ public:
|
||||
const wxString& long_help_string,
|
||||
wxObject* client_data);
|
||||
|
||||
wxAuiToolBarItem* AddTool(int tool_id,
|
||||
wxAuiToolBarItem* AddTool(int toolId,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& disabled_bitmap,
|
||||
bool toggle = false,
|
||||
@@ -704,7 +726,7 @@ public:
|
||||
const wxString& short_help_string = wxEmptyString,
|
||||
const wxString& long_help_string = wxEmptyString);
|
||||
|
||||
wxAuiToolBarItem* AddLabel(int tool_id,
|
||||
wxAuiToolBarItem* AddLabel(int toolId,
|
||||
const wxString& label = wxEmptyString,
|
||||
const int width = -1);
|
||||
wxAuiToolBarItem* AddControl(wxControl* control,
|
||||
@@ -718,19 +740,67 @@ public:
|
||||
wxControl* FindControl(int window_id);
|
||||
wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
|
||||
wxAuiToolBarItem* FindToolByIndex(int idx) const;
|
||||
wxAuiToolBarItem* FindTool(int tool_id) const;
|
||||
wxAuiToolBarItem* FindTool(int toolId) const;
|
||||
|
||||
void ClearTools();
|
||||
void Clear();
|
||||
bool DeleteTool(int tool_id);
|
||||
bool DeleteByIndex(int tool_id);
|
||||
|
||||
/**
|
||||
Destroys the tool with the given ID and its associated window, if any.
|
||||
|
||||
@param toolId ID of a previously added tool.
|
||||
@return @true if the tool was destroyed or @false otherwise, e.g. if
|
||||
the tool with the given ID was not found.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool DestroyTool(int toolId);
|
||||
|
||||
/**
|
||||
Destroys the tool at the given position and its associated window, if
|
||||
any.
|
||||
|
||||
@param idx The index, or position, of a previously added tool.
|
||||
@return @true if the tool was destroyed or @false otherwise, e.g. if
|
||||
the provided index is out of range.
|
||||
*/
|
||||
bool DestroyToolByIndex(int idx);
|
||||
|
||||
/**
|
||||
Removes the tool with the given ID from the toolbar.
|
||||
|
||||
Note that if this tool was added by AddControl(), the associated
|
||||
control is @e not deleted and must either be reused (e.g. by
|
||||
reparenting it under a different window) or destroyed by caller.
|
||||
If this behaviour is unwanted, prefer using DestroyTool() instead.
|
||||
|
||||
@param toolId ID of a previously added tool.
|
||||
@return @true if the tool was removed or @false otherwise, e.g. if the
|
||||
tool with the given ID was not found.
|
||||
*/
|
||||
bool DeleteTool(int toolId);
|
||||
|
||||
/**
|
||||
Removes the tool at the given position from the toolbar.
|
||||
|
||||
Note that if this tool was added by AddControl(), the associated
|
||||
control is @e not deleted and must either be reused (e.g. by
|
||||
reparenting it under a different window) or destroyed by caller.
|
||||
If this behaviour is unwanted, prefer using DestroyToolByIndex()
|
||||
instead.
|
||||
|
||||
@param idx The index, or position, of a previously added tool.
|
||||
@return @true if the tool was removed or @false otherwise, e.g. if the
|
||||
provided index is out of range.
|
||||
*/
|
||||
bool DeleteByIndex(int idx);
|
||||
|
||||
size_t GetToolCount() const;
|
||||
int GetToolPos(int tool_id) const;
|
||||
int GetToolIndex(int tool_id) const;
|
||||
bool GetToolFits(int tool_id) const;
|
||||
wxRect GetToolRect(int tool_id) const;
|
||||
bool GetToolFitsByIndex(int tool_id) const;
|
||||
int GetToolPos(int toolId) const;
|
||||
int GetToolIndex(int toolId) const;
|
||||
bool GetToolFits(int toolId) const;
|
||||
wxRect GetToolRect(int toolId) const;
|
||||
bool GetToolFitsByIndex(int toolId) const;
|
||||
bool GetToolBarFits() const;
|
||||
|
||||
void SetMargins(const wxSize& size);
|
||||
@@ -746,11 +816,11 @@ public:
|
||||
bool GetGripperVisible() const;
|
||||
void SetGripperVisible(bool visible);
|
||||
|
||||
void ToggleTool(int tool_id, bool state);
|
||||
bool GetToolToggled(int tool_id) const;
|
||||
void ToggleTool(int toolId, bool state);
|
||||
bool GetToolToggled(int toolId) const;
|
||||
|
||||
void EnableTool(int tool_id, bool state);
|
||||
bool GetToolEnabled(int tool_id) const;
|
||||
void EnableTool(int toolId, bool state);
|
||||
bool GetToolEnabled(int toolId) const;
|
||||
|
||||
/**
|
||||
Set whether the specified toolbar item has a drop down button.
|
||||
@@ -759,7 +829,7 @@ public:
|
||||
|
||||
@see wxAuiToolBarItem::SetHasDropDown()
|
||||
*/
|
||||
void SetToolDropDown(int tool_id, bool dropdown);
|
||||
void SetToolDropDown(int toolId, bool dropdown);
|
||||
|
||||
/**
|
||||
Returns whether the specified toolbar item has an associated drop down
|
||||
@@ -767,7 +837,7 @@ public:
|
||||
|
||||
@see wxAuiToolBarItem::HasDropDown()
|
||||
*/
|
||||
bool GetToolDropDown(int tool_id) const;
|
||||
bool GetToolDropDown(int toolId) const;
|
||||
|
||||
void SetToolBorderPadding(int padding);
|
||||
int GetToolBorderPadding() const;
|
||||
@@ -778,27 +848,39 @@ public:
|
||||
void SetToolPacking(int packing);
|
||||
int GetToolPacking() const;
|
||||
|
||||
void SetToolProportion(int tool_id, int proportion);
|
||||
int GetToolProportion(int tool_id) const;
|
||||
void SetToolProportion(int toolId, int proportion);
|
||||
int GetToolProportion(int toolId) const;
|
||||
|
||||
void SetToolSeparation(int separation);
|
||||
int GetToolSeparation() const;
|
||||
|
||||
void SetToolSticky(int tool_id, bool sticky);
|
||||
bool GetToolSticky(int tool_id) const;
|
||||
void SetToolSticky(int toolId, bool sticky);
|
||||
bool GetToolSticky(int toolId) const;
|
||||
|
||||
wxString GetToolLabel(int tool_id) const;
|
||||
void SetToolLabel(int tool_id, const wxString& label);
|
||||
wxString GetToolLabel(int toolId) const;
|
||||
void SetToolLabel(int toolId, const wxString& label);
|
||||
|
||||
wxBitmap GetToolBitmap(int tool_id) const;
|
||||
void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
|
||||
wxBitmap GetToolBitmap(int toolId) const;
|
||||
void SetToolBitmap(int toolId, const wxBitmap& bitmap);
|
||||
|
||||
wxString GetToolShortHelp(int tool_id) const;
|
||||
void SetToolShortHelp(int tool_id, const wxString& help_string);
|
||||
wxString GetToolShortHelp(int toolId) const;
|
||||
void SetToolShortHelp(int toolId, const wxString& help_string);
|
||||
|
||||
wxString GetToolLongHelp(int tool_id) const;
|
||||
void SetToolLongHelp(int tool_id, const wxString& help_string);
|
||||
wxString GetToolLongHelp(int toolId) const;
|
||||
void SetToolLongHelp(int toolId, const wxString& help_string);
|
||||
|
||||
/**
|
||||
Add toolbar items that are always displayed in the overflow menu.
|
||||
|
||||
If there are custom items set, then the overflow menu will be
|
||||
displayed even if there are no items from the main toolbar that
|
||||
overflow.
|
||||
|
||||
@param prepend are the items to show before any overflow items
|
||||
@param append are the items to show after any overflow items
|
||||
|
||||
@note The toolbar must have the @c wxAUI_TB_OVERFLOW style.
|
||||
*/
|
||||
void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
|
||||
const wxAuiToolBarItemArray& append);
|
||||
|
||||
|
@@ -405,6 +405,29 @@ public:
|
||||
Returns the image index for the given page.
|
||||
*/
|
||||
virtual int GetPageImage(size_t nPage) const;
|
||||
|
||||
/**
|
||||
Returns tab control based on point coordinates inside the tab frame.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
|
||||
|
||||
/**
|
||||
Returns active tab control for this notebook.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
wxAuiTabCtrl* GetActiveTabCtrl();
|
||||
|
||||
/**
|
||||
Finds tab control associated with a given window and its tab index.
|
||||
|
||||
@return @true when the tab control is found, @false otherwise.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -208,6 +208,11 @@ public:
|
||||
*/
|
||||
virtual ~wxAuiDockArt();
|
||||
|
||||
/**
|
||||
Create a copy of this wxAuiDockArt instance.
|
||||
*/
|
||||
virtual wxAuiDockArt* Clone() = 0;
|
||||
|
||||
/**
|
||||
Draws a background.
|
||||
*/
|
||||
@@ -297,6 +302,7 @@ public:
|
||||
|
||||
wxAuiDefaultDockArt();
|
||||
|
||||
virtual wxAuiDockArt* Clone();
|
||||
int GetMetric(int metricId);
|
||||
void SetMetric(int metricId, int newVal);
|
||||
wxColour GetColour(int id);
|
||||
|
@@ -23,6 +23,13 @@ public:
|
||||
void SetPaneWindow(const wxAuiPaneInfo& pane);
|
||||
wxAuiManager* GetOwnerManager() const;
|
||||
|
||||
/**
|
||||
Returns the embedded wxAuiManager managing this floating pane's contents.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxAuiManager& GetAuiManager();
|
||||
|
||||
protected:
|
||||
virtual void OnMoveStart();
|
||||
virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
|
||||
|
@@ -207,6 +207,19 @@ public:
|
||||
const wxPoint& drop_pos);
|
||||
//@}
|
||||
|
||||
/**
|
||||
Returns true if live resize is always used on the current platform.
|
||||
|
||||
If this function returns true, ::wxAUI_MGR_LIVE_RESIZE flag is ignored
|
||||
and live resize is always used, whether it's specified or not.
|
||||
|
||||
Currently this is the case for wxOSX and wxGTK3 ports, as live resizing
|
||||
is the only implemented method there.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
static bool AlwaysUsesLiveResize();
|
||||
|
||||
/**
|
||||
This function is used by controls to calculate the drop hint rectangle.
|
||||
|
||||
@@ -310,6 +323,20 @@ public:
|
||||
wxAuiPaneInfo& GetPane(const wxString& name);
|
||||
//@}
|
||||
|
||||
/**
|
||||
Returns true if windows are resized live.
|
||||
|
||||
This function combines the check for AlwaysUsesLiveResize() and, for
|
||||
the platforms where live resizing is optional, the check for
|
||||
wxAUI_MGR_LIVE_RESIZE flag.
|
||||
|
||||
Using this accessor allows to verify whether live resizing is being
|
||||
actually used.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool HasLiveResize() const;
|
||||
|
||||
/**
|
||||
HideHint() hides any docking hint that may be visible.
|
||||
*/
|
||||
@@ -333,12 +360,12 @@ public:
|
||||
/**
|
||||
LoadPaneInfo() is similar to LoadPerspective, with the exception that it
|
||||
only loads information about a single pane.
|
||||
|
||||
|
||||
This method writes the serialized data into the passed pane. Pointers to
|
||||
UI elements are not modified.
|
||||
|
||||
@notice This operation also changes the name in the pane information!
|
||||
|
||||
@note This operation also changes the name in the pane information!
|
||||
|
||||
@sa LoadPerspective
|
||||
@sa SavePaneInfo().
|
||||
@sa SavePerspective
|
||||
@@ -347,9 +374,9 @@ public:
|
||||
|
||||
/**
|
||||
Loads a saved perspective.
|
||||
|
||||
|
||||
A perspective is the layout state of an AUI managed window.
|
||||
|
||||
|
||||
All currently existing panes that have an object in "perspective"
|
||||
with the same name ("equivalent") will receive the layout parameters of the object in
|
||||
"perspective". Existing panes that do not have an equivalent in "perspective" remain
|
||||
@@ -358,7 +385,7 @@ public:
|
||||
@param perspective Serialized layout information of a perspective (excl. pointers to UI elements).
|
||||
@param update If update is @true, wxAuiManager::Update() is automatically invoked,
|
||||
thus realizing the specified perspective on screen.
|
||||
|
||||
|
||||
@sa LoadPaneInfo
|
||||
@sa LoadPerspective
|
||||
@sa SavePerspective
|
||||
@@ -384,12 +411,12 @@ public:
|
||||
/**
|
||||
SavePaneInfo() is similar to SavePerspective, with the exception that it only
|
||||
saves information about a single pane.
|
||||
|
||||
|
||||
@param pane Pane whose layout parameters should be serialized.
|
||||
@return The serialized layout parameters of the pane are returned within
|
||||
the string. Information about the pointers to UI elements stored
|
||||
in the pane are not serialized.
|
||||
|
||||
|
||||
@sa LoadPaneInfo
|
||||
@sa LoadPerspective
|
||||
@sa SavePerspective
|
||||
@@ -399,7 +426,7 @@ public:
|
||||
/**
|
||||
Saves the entire user interface layout into an encoded wxString, which
|
||||
can then be stored by the application (probably using wxConfig).
|
||||
|
||||
|
||||
@sa LoadPerspective
|
||||
@sa LoadPaneInfo
|
||||
@sa SavePaneInfo
|
||||
@@ -457,11 +484,12 @@ public:
|
||||
void StartPaneDrag(wxWindow* paneWindow, const wxPoint& offset);
|
||||
|
||||
/**
|
||||
Uninitializes the framework and should be called before a managed frame or
|
||||
window is destroyed. UnInit() is usually called in the managed wxFrame's
|
||||
destructor. It is necessary to call this function before the managed frame
|
||||
or window is destroyed, otherwise the manager cannot remove its custom event
|
||||
handlers from a window.
|
||||
Dissociate the managed window from the manager.
|
||||
|
||||
This function may be called before the managed frame or window is
|
||||
destroyed, but, since wxWidgets 3.1.4, it's unnecessary to call it
|
||||
explicitly, as it will be called automatically when this window is
|
||||
destroyed, as well as when the manager itself is.
|
||||
*/
|
||||
void UnInit();
|
||||
|
||||
@@ -889,6 +917,7 @@ public:
|
||||
|
||||
/**
|
||||
Right() sets the pane dock position to the right side of the frame.
|
||||
This is the same thing as calling Direction(wxAUI_DOCK_RIGHT).
|
||||
*/
|
||||
wxAuiPaneInfo& Right();
|
||||
|
||||
@@ -908,7 +937,7 @@ public:
|
||||
"Safe parts" are all non-UI elements (e.g. all layout determining parameters like the
|
||||
size, position etc.). "Unsafe parts" (pointers to button, frame and window) are not
|
||||
modified by this write operation.
|
||||
|
||||
|
||||
@remark This method is used when loading perspectives.
|
||||
*/
|
||||
void SafeSet(wxAuiPaneInfo source);
|
||||
@@ -932,6 +961,7 @@ public:
|
||||
|
||||
/**
|
||||
Top() sets the pane dock position to the top of the frame.
|
||||
This is the same thing as calling Direction(wxAUI_DOCK_TOP).
|
||||
*/
|
||||
wxAuiPaneInfo& Top();
|
||||
|
||||
@@ -953,7 +983,7 @@ public:
|
||||
*/
|
||||
wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c);
|
||||
|
||||
|
||||
|
||||
/// name of the pane
|
||||
wxString name;
|
||||
|
||||
@@ -961,7 +991,7 @@ public:
|
||||
wxString caption;
|
||||
|
||||
/// icon of the pane, may be invalid
|
||||
wxBitmap icon;
|
||||
wxBitmap icon;
|
||||
|
||||
/// window that is in this pane
|
||||
wxWindow* window;
|
||||
@@ -1002,13 +1032,10 @@ public:
|
||||
/// proportion while docked
|
||||
int dock_proportion;
|
||||
|
||||
/// buttons on the pane
|
||||
wxAuiPaneButtonArray buttons;
|
||||
|
||||
/// current rectangle (populated by wxAUI)
|
||||
wxRect rect;
|
||||
|
||||
bool IsValid() const;
|
||||
bool IsValid() const;
|
||||
};
|
||||
|
||||
|
||||
@@ -1137,7 +1164,7 @@ public:
|
||||
bool IsOk() const;
|
||||
bool IsHorizontal() const;
|
||||
bool IsVertical() const;
|
||||
|
||||
|
||||
wxAuiPaneInfoPtrArray panes; // array of panes
|
||||
wxRect rect; // current rectangle
|
||||
int dock_direction; // dock direction (top, bottom, left, right, center)
|
||||
@@ -1173,16 +1200,8 @@ public:
|
||||
int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL)
|
||||
wxAuiDockInfo* dock; // which dock the item is associated with
|
||||
wxAuiPaneInfo* pane; // which pane the item is associated with
|
||||
wxAuiPaneButton* button; // which pane button the item is associated with
|
||||
int button; // which pane button the item is associated with
|
||||
wxSizer* cont_sizer; // the part's containing sizer
|
||||
wxSizerItem* sizer_item; // the sizer item of the part
|
||||
wxRect rect; // client coord rectangle of the part itself
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxAuiPaneButton
|
||||
{
|
||||
public:
|
||||
int button_id; // id of the button (e.g. buttonClose)
|
||||
};
|
||||
|
@@ -108,7 +108,7 @@ public:
|
||||
wxWindowID winid,
|
||||
const wxString& name);
|
||||
virtual wxToolBar *GetToolBar() const;
|
||||
|
||||
|
||||
// no maximize etc
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual void Restore();
|
||||
|
@@ -13,7 +13,7 @@
|
||||
/** @addtogroup group_funcmacro_misc */
|
||||
//@{
|
||||
|
||||
/**
|
||||
/**
|
||||
Elements of this enum specify the possible behaviours of wxBase64Decode
|
||||
when an invalid character is encountered.
|
||||
*/
|
||||
|
@@ -172,7 +172,7 @@ public:
|
||||
class (either wxNativePixelData for RGB bitmaps or wxAlphaPixelData
|
||||
for bitmaps with an additionally alpha channel).
|
||||
|
||||
Note that many wxBitmap functions take a @e type parameter, which is a
|
||||
Note that many wxBitmap functions take a @e type parameter, which is a
|
||||
value of the ::wxBitmapType enumeration.
|
||||
The validity of those values depends however on the platform where your program
|
||||
is running and from the wxWidgets configuration.
|
||||
@@ -183,9 +183,9 @@ public:
|
||||
- wxX11 supports XPM files, XPM data, XBM data;
|
||||
|
||||
In addition, wxBitmap can load and save all formats that wxImage can; see wxImage
|
||||
for more info. Of course, you must have loaded the wxImage handlers
|
||||
for more info. Of course, you must have loaded the wxImage handlers
|
||||
(see ::wxInitAllImageHandlers() and wxImage::AddHandler).
|
||||
Note that all available wxBitmapHandlers for a given wxWidgets port are
|
||||
Note that all available wxBitmapHandlers for a given wxWidgets port are
|
||||
automatically loaded at startup so you won't need to use wxBitmap::AddHandler.
|
||||
|
||||
More on the difference between wxImage and wxBitmap: wxImage is just a
|
||||
@@ -386,12 +386,12 @@ public:
|
||||
@param handler
|
||||
A new bitmap format handler object. There is usually only one instance
|
||||
of a given handler class in an application session.
|
||||
|
||||
|
||||
Note that unlike wxImage::AddHandler, there's no documented list of
|
||||
the wxBitmapHandlers available in wxWidgets.
|
||||
This is because they are platform-specific and most important, they are
|
||||
This is because they are platform-specific and most important, they are
|
||||
all automatically loaded at startup.
|
||||
|
||||
|
||||
If you want to be sure that wxBitmap can load a certain type of image,
|
||||
you'd better use wxImage::AddHandler.
|
||||
|
||||
@@ -445,7 +445,7 @@ public:
|
||||
@param height
|
||||
The height of the bitmap in pixels, must be strictly positive.
|
||||
@param dc
|
||||
DC from wich the scaling factor is inherited
|
||||
DC from which the scaling factor is inherited
|
||||
|
||||
@return @true if the creation was successful.
|
||||
|
||||
@@ -469,7 +469,7 @@ public:
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale);
|
||||
bool CreateScaled(int width, int height, int depth, double logicalScale);
|
||||
|
||||
/*
|
||||
Creates a bitmap from the given data, which can be of arbitrary type.
|
||||
@@ -665,7 +665,7 @@ public:
|
||||
@endcode
|
||||
in your application startup code.
|
||||
|
||||
However under OS X this function uses native image loading and so
|
||||
However under macOS this function uses native image loading and so
|
||||
doesn't require wxWidgets PNG support.
|
||||
|
||||
@since 2.9.5
|
||||
@@ -734,6 +734,10 @@ public:
|
||||
|
||||
@remarks The bitmap object owns the mask once this has been called.
|
||||
|
||||
@note A mask can be set also for bitmap with an alpha channel but
|
||||
doing so under wxMSW is not recommended because performance of drawing
|
||||
such bitmap is not very good.
|
||||
|
||||
@see GetMask(), wxMask
|
||||
*/
|
||||
virtual void SetMask(wxMask* mask);
|
||||
@@ -777,6 +781,10 @@ wxBitmap wxNullBitmap;
|
||||
When associated with a bitmap and drawn in a device context, the unmasked
|
||||
area of the bitmap will be drawn, and the masked area will not be drawn.
|
||||
|
||||
@note A mask can be associated also with a bitmap with an alpha channel
|
||||
but drawing such bitmaps under wxMSW may be slow so using them should be
|
||||
avoided if drawing performance is an important factor.
|
||||
|
||||
@library{wxcore}
|
||||
@category{gdi}
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
Notice that since wxWidgets 2.9.1 bitmap display is supported by the base
|
||||
wxButton class itself and the only tiny advantage of using this class is
|
||||
that it allows to specify the bitmap in its constructor, unlike wxButton.
|
||||
that it allows specifying the bitmap in its constructor, unlike wxButton.
|
||||
Please see the base class documentation for more information about images
|
||||
support in wxButton.
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
Button position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Button size.
|
||||
If ::wxDefaultSize is specified then the button is sized appropriately
|
||||
Button size.
|
||||
If ::wxDefaultSize is specified then the button is sized appropriately
|
||||
for the bitmap.
|
||||
@param style
|
||||
Window style. See wxBitmapButton.
|
||||
@@ -99,6 +99,24 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
/**
|
||||
Creation function for two-step creation of "Close" button.
|
||||
|
||||
It is usually not necessary to use this function directly as
|
||||
NewCloseButton() is more convenient, but, if required, it can be called
|
||||
on a default-constructed wxBitmapButton object to achieve the same
|
||||
effect.
|
||||
|
||||
@param parent The button parent window, must be non-@NULL.
|
||||
@param winid The identifier for the new button.
|
||||
@param name The name for the new button.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
bool CreateCloseButton(wxWindow* parent,
|
||||
wxWindowID winid,
|
||||
const wxString& name = wxString());
|
||||
|
||||
/**
|
||||
Helper function creating a standard-looking "Close" button.
|
||||
|
||||
@@ -109,10 +127,13 @@ public:
|
||||
|
||||
@param parent The button parent window, must be non-@NULL.
|
||||
@param winid The identifier for the new button.
|
||||
@param name The name for the new button (available since wxWidgets 3.1.5)
|
||||
@return The new button.
|
||||
|
||||
@since 2.9.5
|
||||
*/
|
||||
static wxBitmapButton* NewCloseButton(wxWindow* parent, wxWindowID winid);
|
||||
static wxBitmapButton* NewCloseButton(wxWindow* parent,
|
||||
wxWindowID winid,
|
||||
const wxString& name = wxString());
|
||||
};
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
bits is set if point is over a tab.
|
||||
Notice that wxOSX currently only returns wxBK_HITTEST_ONLABEL or
|
||||
wxBK_HITTEST_NOWHERE and never the other values, so you should only test
|
||||
for these two in the code that should be portable under OS X.
|
||||
for these two in the code that should be portable under macOS.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
@@ -249,7 +249,10 @@ public:
|
||||
The page must have the book control itself as the parent and must not
|
||||
have been added to this control previously.
|
||||
|
||||
The call to this function may generate the page changing events.
|
||||
The call to this function will generate the page changing and page
|
||||
changed events if @a select is true, but not when inserting the very
|
||||
first page (as there is no previous page selection to switch from in
|
||||
this case and so it wouldn't make sense to e.g. veto such event).
|
||||
|
||||
@param page
|
||||
Specifies the new page.
|
||||
@@ -276,7 +279,13 @@ public:
|
||||
|
||||
/**
|
||||
Deletes the specified page, and the associated window.
|
||||
The call to this function generates the page changing events.
|
||||
|
||||
The call to this function generates the page changing events when
|
||||
deleting the currently selected page or a page preceding it in the
|
||||
index order, but it does @e not send any events when deleting the last
|
||||
page: while in this case the selection also changes, it becomes invalid
|
||||
and for compatibility reasons the control never generates events with
|
||||
the invalid selection index.
|
||||
*/
|
||||
virtual bool DeletePage(size_t page);
|
||||
|
||||
@@ -308,6 +317,9 @@ public:
|
||||
|
||||
/**
|
||||
Deletes the specified page, without deleting the associated window.
|
||||
|
||||
See DeletePage() for a note about the events generated by this
|
||||
function.
|
||||
*/
|
||||
virtual bool RemovePage(size_t page);
|
||||
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
/**
|
||||
General constructor.
|
||||
|
||||
This constructor allows to specify all supported attributes by calling
|
||||
This constructor allows specifying all supported attributes by calling
|
||||
the appropriate methods on wxBusyInfoFlags object passed to it as
|
||||
parameter. All of them are optional but usually at least the message
|
||||
should be specified.
|
||||
@@ -111,6 +111,23 @@ public:
|
||||
*/
|
||||
wxBusyInfo(const wxString& msg, wxWindow* parent = NULL);
|
||||
|
||||
/**
|
||||
Update the information text.
|
||||
|
||||
The @a text string may contain markup as described in
|
||||
wxControl::SetLabelMarkup().
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void UpdateText(const wxString& str);
|
||||
|
||||
/**
|
||||
Same as UpdateText() but doesn't interpret the string as containing markup.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void UpdateLabel(const wxString& str);
|
||||
|
||||
/**
|
||||
Hides and closes the window containing the information text.
|
||||
*/
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
A button may have either a single image for all states or different images
|
||||
for the following states (different images are not currently supported
|
||||
under OS X where the normal image is used for all states):
|
||||
under macOS where the normal image is used for all states):
|
||||
@li @b normal: the default state
|
||||
@li @b disabled: bitmap shown when the button is disabled.
|
||||
@li @b pressed: bitmap shown when the button is pushed (e.g. while the user
|
||||
@@ -56,7 +56,7 @@
|
||||
The position of the image inside the button be configured using
|
||||
SetBitmapPosition(). By default the image is on the left of the text.
|
||||
|
||||
Please also notice that GTK+ uses a global setting called @c gtk-button-images
|
||||
Please also notice that GTK+ uses a global setting called @c gtk-button-images
|
||||
to determine if the images should be shown in the buttons
|
||||
at all. If it is off (which is the case in e.g. Gnome 2.28 by default), no
|
||||
images will be shown, consistently with the native behaviour.
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
@ref page_stockitems "this list", a standard label will be used. In
|
||||
other words, if you use a predefined @c wxID_XXX constant, just omit
|
||||
the label completely rather than specifying it. In particular, help
|
||||
buttons (the ones with @a id of @c wxID_HELP) under OS X can't
|
||||
buttons (the ones with @a id of @c wxID_HELP) under macOS can't
|
||||
display any label at all and while wxButton will detect if the standard
|
||||
"Help" label is used and ignore it, using any other label will prevent
|
||||
the button from correctly appearing as a help button and so should be
|
||||
@@ -179,11 +179,15 @@ public:
|
||||
|
||||
|
||||
/**
|
||||
Returns the default size for the buttons. It is advised to make all the dialog
|
||||
buttons of the same size and this function allows to retrieve the (platform and
|
||||
current font dependent size) which should be the best suited for this.
|
||||
Returns the default size for the buttons. It is advised to make all the
|
||||
dialog buttons of the same size and this function allows retrieving the
|
||||
(platform, and current font dependent) size which should be the best
|
||||
suited for this.
|
||||
|
||||
The optional @a win argument is new since wxWidgets 3.1.3 and allows to
|
||||
get a per-monitor DPI specific size.
|
||||
*/
|
||||
static wxSize GetDefaultSize();
|
||||
static wxSize GetDefaultSize(wxWindow* win = NULL);
|
||||
|
||||
/**
|
||||
Returns the string label for the button.
|
||||
|
@@ -244,7 +244,7 @@ enum wxCalendarHitTestResult
|
||||
|
||||
An item without custom attributes is drawn with the default colours and
|
||||
font and without border, but setting custom attributes with SetAttr()
|
||||
allows to modify its appearance. Just create a custom attribute object and
|
||||
allows modifying its appearance. Just create a custom attribute object and
|
||||
set it for the day you want to be displayed specially (note that the
|
||||
control will take ownership of the pointer, i.e. it will delete it itself).
|
||||
A day may be marked as being a holiday, even if it is not recognized as
|
||||
|
@@ -125,7 +125,7 @@ typedef wxUSE_UNICODE_dependent wxUChar;
|
||||
\- @c wchar_t when <tt>wxUSE_UNICODE_WCHAR==1</tt> and <tt>wxUSE_UNICODE==1</tt>
|
||||
|
||||
The @c wxUSE_UNICODE_WCHAR symbol is defined to @c 1 when building on
|
||||
Windows while it's defined to @c 0 when building on Unix, Linux or OS X.
|
||||
Windows while it's defined to @c 0 when building on Unix, Linux or macOS.
|
||||
(Note that @c wxUSE_UNICODE_UTF8 symbol is defined as the opposite of
|
||||
@c wxUSE_UNICODE_WCHAR.)
|
||||
|
||||
|
@@ -91,10 +91,10 @@ public:
|
||||
@param label
|
||||
Text to be displayed next to the checkbox.
|
||||
@param pos
|
||||
Checkbox position.
|
||||
Checkbox position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Checkbox size.
|
||||
Checkbox size.
|
||||
If ::wxDefaultSize is specified then a default size is chosen.
|
||||
@param style
|
||||
Window style. See wxCheckBox.
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
Window position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Window size.
|
||||
Window size.
|
||||
If ::wxDefaultSize is specified then the window is sized appropriately.
|
||||
@param n
|
||||
Number of strings with which to initialise the control.
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
Window position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Window size.
|
||||
Window size.
|
||||
If ::wxDefaultSize is specified then the choice is sized appropriately.
|
||||
@param n
|
||||
Number of strings with which to initialise the choice control.
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
virtual void SetColumns(int n = 1);
|
||||
|
||||
virtual bool IsSorted() const;
|
||||
|
||||
|
||||
virtual unsigned int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Returns the wxChoice associated with the control.
|
||||
*/
|
||||
|
@@ -53,6 +53,13 @@
|
||||
}
|
||||
@endcode
|
||||
|
||||
@note On GTK, the clipboard behavior can vary depending on the configuration of
|
||||
the end-user's machine. In order for the clipboard data to persist after
|
||||
the window closes, a clipboard manager must be installed. Some clipboard
|
||||
managers will automatically flush the clipboard after each new piece of
|
||||
data is added, while others will not. The Flush() function will force
|
||||
the clipboard manager to flush the data.
|
||||
|
||||
@library{wxcore}
|
||||
@category{dnd}
|
||||
|
||||
@@ -96,8 +103,12 @@ public:
|
||||
(possibly eating memory), otherwise the clipboard will be emptied on
|
||||
exit.
|
||||
|
||||
Currently this method is not implemented in X11-based ports, i.e.
|
||||
wxGTK, wxX11 and wxMotif and always returns @false there.
|
||||
Currently this method is implemented in MSW and GTK and always returns @false
|
||||
otherwise.
|
||||
|
||||
@note On GTK, only the non-primary selection can be flushed. Calling this function
|
||||
when the clipboard is using the primary selection will return @false and not
|
||||
make any data available after the program exits.
|
||||
|
||||
@return @false if the operation is unsuccessful for any reason.
|
||||
*/
|
||||
@@ -165,7 +176,7 @@ public:
|
||||
until this function is called again with @false.
|
||||
|
||||
On the other platforms, there is no PRIMARY selection and so all
|
||||
clipboard operations will fail. This allows to implement the standard
|
||||
clipboard operations will fail. This allows implementing the standard
|
||||
X11 handling of the clipboard which consists in copying data to the
|
||||
CLIPBOARD selection only when the user explicitly requests it (i.e. by
|
||||
selecting the "Copy" menu command) but putting the currently selected
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#define wxCLRP_SHOW_ALPHA 0x0010
|
||||
|
||||
wxEventType wxEVT_COLOURPICKER_CHANGED;
|
||||
wxEventType wxEVT_COLOURPICKER_CURRENT_CHANGED;
|
||||
wxEventType wxEVT_COLOURPICKER_DIALOG_CANCELLED;
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,7 +37,7 @@ wxEventType wxEVT_COLOURPICKER_CHANGED;
|
||||
Shows the colour in HTML form (AABBCC) as colour button label
|
||||
(instead of no label at all).
|
||||
@style{wxCLRP_SHOW_ALPHA}
|
||||
Allows to select opacity in the colour-chooser (effective under
|
||||
Allows selecting opacity in the colour-chooser (effective under
|
||||
wxGTK and wxOSX).
|
||||
@endStyleTable
|
||||
|
||||
@@ -44,7 +46,20 @@ wxEventType wxEVT_COLOURPICKER_CHANGED;
|
||||
The user changed the colour selected in the control either using the
|
||||
button or using text control (see @c wxCLRP_USE_TEXTCTRL; note that
|
||||
in this case the event is fired only if the user’s input is valid,
|
||||
i.e. recognizable).
|
||||
i.e. recognizable). When using a popup dialog for changing the
|
||||
colour, this event is sent only when the changes in the dialog are
|
||||
accepted by the user, unlike @c EVT_COLOURPICKER_CURRENT_CHANGED.
|
||||
@event{EVT_COLOURPICKER_CURRENT_CHANGED(id, func)}
|
||||
The user changed the currently selected colour in the dialog
|
||||
associated with the control. This event is sent immediately when the
|
||||
selection changes and you must also handle @c EVT_COLOUR_CANCELLED
|
||||
to revert to the previously selected colour if the selection ends up
|
||||
not being accepted. This event is new since wxWidgets 3.1.3 and
|
||||
currently is only implemented in wxMSW.
|
||||
@event{EVT_COLOURPICKER_DIALOG_CANCELLED(id, func)}
|
||||
The user cancelled the colour dialog associated with the control,
|
||||
i.e. closed it without accepting the selection. This event is new
|
||||
since wxWidgets 3.1.3 and currently is only implemented in wxMSW.
|
||||
@endEventTable
|
||||
|
||||
@library{wxcore}
|
||||
@@ -57,7 +72,7 @@ class wxColourPickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxColourPickerCtrl();
|
||||
|
||||
|
||||
/**
|
||||
Initializes the object and calls Create() with all the parameters.
|
||||
*/
|
||||
@@ -124,6 +139,15 @@ public:
|
||||
@beginEventTable{wxColourPickerEvent}
|
||||
@event{EVT_COLOURPICKER_CHANGED(id, func)}
|
||||
Generated whenever the selected colour changes.
|
||||
@event{EVT_COLOURPICKER_CURRENT_CHANGED(id, func)}
|
||||
Generated whenever the currently selected colour in the dialog shown
|
||||
by the picker changes. This event is new since wxWidgets 3.1.3 and
|
||||
currently is only implemented in wxMSW.
|
||||
@event{EVT_COLOURPICKER_DIALOG_CANCELLED(id, func)}
|
||||
Generated when the user cancels the colour dialog associated with
|
||||
the control, i.e. closes it without accepting the selection. This
|
||||
event is new since wxWidgets 3.1.3 and currently is only implemented
|
||||
in wxMSW.
|
||||
@endEventTable
|
||||
|
||||
@library{wxcore}
|
||||
|
@@ -224,7 +224,7 @@ struct wxCmdLineEntryDesc
|
||||
class wxCmdLineArg
|
||||
{
|
||||
public:
|
||||
virtual ~wxCmdLineArg() {}
|
||||
virtual ~wxCmdLineArg();
|
||||
|
||||
/**
|
||||
Returns the command line argument value as a wxDateTime.
|
||||
@@ -596,8 +596,8 @@ public:
|
||||
/**
|
||||
Enable or disable support for the long options.
|
||||
|
||||
As long options are not (yet) POSIX-compliant, this option allows to
|
||||
disable them.
|
||||
As long options are not (yet) POSIX-compliant, this option allows
|
||||
disabling them.
|
||||
|
||||
@see @ref cmdlineparser_customization and AreLongOptionsEnabled()
|
||||
*/
|
||||
|
@@ -32,7 +32,7 @@
|
||||
class wxCollapsibleHeaderCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
wxCollapsibleHeaderCtrl() { }
|
||||
wxCollapsibleHeaderCtrl();
|
||||
|
||||
/**
|
||||
Constructor fully creating the control.
|
||||
|
@@ -87,7 +87,7 @@ wxEventType wxEVT_COLLAPSIBLEPANE_CHANGED;
|
||||
The default style. It includes wxTAB_TRAVERSAL and wxBORDER_NONE.
|
||||
@style{wxCP_NO_TLW_RESIZE}
|
||||
By default wxCollapsiblePane resizes the top level window containing it
|
||||
when its own size changes. This allows to easily implement dialogs
|
||||
when its own size changes. This allows easily implementing dialogs
|
||||
containing an optionally shown part, for example, and so is the default
|
||||
behaviour but can be inconvenient in some specific cases -- use this
|
||||
flag to disable this automatic parent resizing then.
|
||||
|
@@ -10,11 +10,46 @@
|
||||
|
||||
This class represents the colour chooser dialog.
|
||||
|
||||
Starting from wxWidgets 3.1.3 and currently in the MSW port only, this
|
||||
dialog generates wxEVT_COLOUR_CHANGED events while it is being shown, i.e.
|
||||
from inside its ShowModal() method, that notify the program about the
|
||||
change of the currently selected colour and allow it to e.g. preview the
|
||||
effect of selecting this colour. Note that if you react to this event, you
|
||||
should also correctly revert to the previously selected colour if the
|
||||
dialog is cancelled by the user.
|
||||
|
||||
Example of using this class with dynamic feedback for the selected colour:
|
||||
@code
|
||||
// Some function for redrawing using the given colour. Ideally, it
|
||||
// shouldn't do anything if the colour is the same as the one used
|
||||
// before.
|
||||
void Redraw(const wxColour& colour);
|
||||
|
||||
wxColourData data;
|
||||
data.SetColour(initialColourToUse);
|
||||
wxColourData dlg(this, &data);
|
||||
dlg.Bind(wxEVT_COLOUR_CHANGED, [](wxColourDialogEvent& event) {
|
||||
Redraw(event.GetColour());
|
||||
});
|
||||
if ( dlg.ShowModal() == wxID_OK ) {
|
||||
// Colour did change.
|
||||
} else {
|
||||
// Colour didn't change.
|
||||
}
|
||||
|
||||
// This call is unnecessary under platforms generating
|
||||
// wxEVT_COLOUR_CHANGED if the dialog was accepted and unnecessary
|
||||
// under the platforms not generating this event if it was cancelled,
|
||||
// so we could check for the different cases explicitly to avoid it,
|
||||
// but it's simpler to just always call it.
|
||||
Redraw(data.GetColour());
|
||||
@endcode
|
||||
|
||||
@library{wxcore}
|
||||
@category{cmndlg}
|
||||
|
||||
@see @ref overview_cmndlg_colour, wxColour, wxColourData,
|
||||
wxGetColourFromUser()
|
||||
wxColourDialogEvent, wxGetColourFromUser()
|
||||
*/
|
||||
class wxColourDialog : public wxDialog
|
||||
{
|
||||
@@ -31,7 +66,7 @@ public:
|
||||
|
||||
@see wxColourData
|
||||
*/
|
||||
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
|
||||
wxColourDialog(wxWindow* parent, const wxColourData* data = NULL);
|
||||
|
||||
/**
|
||||
Destructor.
|
||||
@@ -41,7 +76,7 @@ public:
|
||||
/**
|
||||
Same as wxColourDialog().
|
||||
*/
|
||||
bool Create(wxWindow* parent, wxColourData* data = NULL);
|
||||
bool Create(wxWindow* parent, const wxColourData* data = NULL);
|
||||
|
||||
/**
|
||||
Returns the colour data associated with the colour dialog.
|
||||
@@ -55,6 +90,47 @@ public:
|
||||
virtual int ShowModal();
|
||||
};
|
||||
|
||||
/**
|
||||
This event class is used for the events generated by wxColourDialog.
|
||||
|
||||
@beginEventTable{wxColourPickerEvent}
|
||||
@event{EVT_COLOUR_CHANGED(id, func)}
|
||||
Generated whenever the currently selected colour in the dialog
|
||||
changes. This event is currently only implemented in wxMSW.
|
||||
@endEventTable
|
||||
|
||||
@library{wxcore}
|
||||
@category{events}
|
||||
|
||||
@see wxColourDialog
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
class wxColourDialogEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxColourDialogEvent();
|
||||
|
||||
/**
|
||||
The constructor is not normally used by the user code.
|
||||
*/
|
||||
wxColourDialogEvent(wxEventType evtType,
|
||||
wxColourDialog* dialog,
|
||||
const wxColour& colour);
|
||||
|
||||
/**
|
||||
Retrieve the colour the user has just selected.
|
||||
*/
|
||||
wxColour GetColour() const;
|
||||
|
||||
/**
|
||||
Set the colour to be sent with the event.
|
||||
*/
|
||||
void SetColour(const wxColour& colour);
|
||||
};
|
||||
|
||||
|
||||
wxEventType wxEVT_COLOUR_CHANGED;
|
||||
|
||||
|
||||
// ============================================================================
|
||||
|
@@ -27,9 +27,9 @@ const unsigned char wxALPHA_OPAQUE = 0xff;
|
||||
@class wxColour
|
||||
|
||||
A colour is an object representing a combination of Red, Green, and Blue
|
||||
(RGB) intensity values, and is used to determine drawing colours. See the
|
||||
entry for wxColourDatabase for how a pointer to a predefined, named colour
|
||||
may be returned instead of creating a new colour.
|
||||
(RGB) intensity values and an Alpha value, and is used to determine
|
||||
drawing colours. See the entry for wxColourDatabase for how a pointer to a predefined,
|
||||
named colour may be returned instead of creating a new colour.
|
||||
|
||||
Valid RGB values are in the range 0 to 255.
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
A packed RGB value.
|
||||
*/
|
||||
wxColour(unsigned long colRGB);
|
||||
|
||||
|
||||
/**
|
||||
Copy constructor.
|
||||
*/
|
||||
@@ -113,10 +113,14 @@ public:
|
||||
@c wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed by 6
|
||||
hexadecimal digits (e.g. wxColour(255,0,0) == "#FF0000").
|
||||
|
||||
This function never fails and always returns a non-empty string but
|
||||
asserts if the colour has alpha channel (i.e. is non opaque) but
|
||||
@c wxC2S_CSS_SYNTAX (which is the only one supporting alpha) is not
|
||||
specified in flags.
|
||||
This function returns empty string if the colour is not initialized
|
||||
(see IsOk()). Otherwise, the returned string is always non-empty, but
|
||||
the function asserts if the colour has alpha channel (i.e. is non
|
||||
opaque) but @c wxC2S_CSS_SYNTAX (which is the only one supporting
|
||||
alpha) is not specified in @a flags.
|
||||
|
||||
@note For non-solid (i.e. non-RGB) colour this function returns
|
||||
"rgb(??, ?? ??)" or "#??????".
|
||||
|
||||
@since 2.7.0
|
||||
*/
|
||||
@@ -128,7 +132,7 @@ public:
|
||||
|
||||
The arguments @a colRGB and @a colRGBA should be of the form 0x00BBGGRR
|
||||
and 0xAABBGGRR respectively where @c 0xRR, @c 0xGG, @c 0xBB and @c 0xAA
|
||||
are the values of the red, blue, green and alpha components.
|
||||
are the values of the red, green, blue and alpha components.
|
||||
|
||||
Notice the right-to-left order of components!
|
||||
|
||||
@@ -158,6 +162,19 @@ public:
|
||||
wxUint32 GetRGBA() const;
|
||||
//@}
|
||||
|
||||
/**
|
||||
Return the perceived brightness of the colour.
|
||||
|
||||
This value is computed using the simple @code 0.299*R + 0.587*G + 0.114*B @endcode
|
||||
formula with the coefficients taken from the RGB to
|
||||
YIQ conversion formula and @c R, @c G and @c B being the values of the
|
||||
corresponding colour channels normalized to 0..1 range, so that the
|
||||
return value is 0 for black and 1 for white.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
double GetLuminance() const;
|
||||
|
||||
/**
|
||||
Returns a pixel value which is platform-dependent.
|
||||
On Windows, a COLORREF is returned.
|
||||
@@ -183,7 +200,7 @@ public:
|
||||
virtual unsigned char Red() const;
|
||||
|
||||
/**
|
||||
Returns @true if the color can be described using RGB values, ie is solid,
|
||||
Returns @true if the color can be described using RGB values, i.e. is solid,
|
||||
@false if it is a pattern (currently only possible on macOS)
|
||||
*/
|
||||
virtual bool IsSolid() const;
|
||||
@@ -194,8 +211,8 @@ public:
|
||||
string (third overload).
|
||||
|
||||
When using third form, Set() accepts: colour names (those listed in
|
||||
wxColourDatabase), the CSS-like @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax
|
||||
(case insensitive) and the HTML-like syntax: @c "#" followed by 6 hexadecimal
|
||||
wxColourDatabase), the CSS-like @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax
|
||||
(case insensitive) and the HTML-like syntax: @c "#" followed by 6 hexadecimal
|
||||
digits for red, green, blue components.
|
||||
|
||||
Returns @true if the conversion was successful, @false otherwise.
|
||||
@@ -211,12 +228,12 @@ public:
|
||||
|
||||
/**
|
||||
Tests the inequality of two colours by comparing individual red, green, blue
|
||||
colours and alpha values.
|
||||
intensities and alpha values.
|
||||
*/
|
||||
bool operator !=(const wxColour& colour) const;
|
||||
|
||||
/**
|
||||
Assignment operator, using a colour name to be found in the colour database.
|
||||
Assignment operator.
|
||||
|
||||
@see wxColourDatabase
|
||||
*/
|
||||
@@ -224,16 +241,16 @@ public:
|
||||
|
||||
/**
|
||||
Tests the equality of two colours by comparing individual red, green, blue
|
||||
colours and alpha values.
|
||||
intensities and alpha values.
|
||||
*/
|
||||
bool operator ==(const wxColour& colour) const;
|
||||
|
||||
/**
|
||||
Assign 0 or 255 to rgb out parameters.
|
||||
Assigns the same value to @a r, @a g, @a b: 0 if @a on is @c false, 255 otherwise.
|
||||
@since 2.9.0
|
||||
*/
|
||||
static void MakeMono(unsigned char* r, unsigned char* g, unsigned char* b, bool on);
|
||||
|
||||
|
||||
/**
|
||||
Create a disabled (dimmed) colour from (in/out) rgb parameters.
|
||||
@since 2.9.0
|
||||
@@ -254,7 +271,7 @@ public:
|
||||
@since 2.9.0
|
||||
*/
|
||||
static void MakeGrey(unsigned char* r, unsigned char* g, unsigned char* b);
|
||||
|
||||
|
||||
/**
|
||||
Create a grey colour from (in/out) rgb parameters using floating point arithmetic.
|
||||
Defaults to using the standard ITU-T BT.601 when converting to YUV, where every pixel equals
|
||||
@@ -269,12 +286,11 @@ public:
|
||||
@since 2.9.0
|
||||
*/
|
||||
static unsigned char AlphaBlend(unsigned char fg, unsigned char bg, double alpha);
|
||||
|
||||
|
||||
/**
|
||||
ChangeLightness() is a utility function that simply darkens
|
||||
or lightens a color, based on the specified percentage
|
||||
ialpha of 0 would be completely black, 200 completely white
|
||||
an ialpha of 100 returns the same colour
|
||||
Utility function that simply darkens or lightens a color, based on the specified
|
||||
percentage @a ialpha. @a ialpha of 0 would be make the color completely black,
|
||||
200 completely white and 100 would not change the color.
|
||||
@since 2.9.0
|
||||
*/
|
||||
static void ChangeLightness(unsigned char* r, unsigned char* g, unsigned char* b, int ialpha);
|
||||
|
@@ -69,10 +69,10 @@ public:
|
||||
/**
|
||||
Implement to customize matching of value string to an item container
|
||||
entry.
|
||||
|
||||
|
||||
@param item
|
||||
String entered, usually by user or from SetValue() call.
|
||||
|
||||
|
||||
@param trueItem
|
||||
When item matches an entry, but the entry's string representation
|
||||
is not exactly the same (case mismatch, for example), then the
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
Useful in conjunction with LazyCreate().
|
||||
*/
|
||||
bool IsCreated() const;
|
||||
|
||||
|
||||
/**
|
||||
The derived class may implement this to return @true if it wants to
|
||||
delay call to Create() until the popup is shown for the first time. It
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
Window position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Window size.
|
||||
Window size.
|
||||
If ::wxDefaultSize is specified then the window is sized appropriately.
|
||||
@param style
|
||||
Window style. See wxComboCtrl.
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
*/
|
||||
void EnablePopupAnimation(bool enable = true);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Returns true if given key combination should toggle the popup.
|
||||
*/
|
||||
@@ -730,7 +730,7 @@ public:
|
||||
Sets a hint shown in an empty unfocused combo control.
|
||||
|
||||
Notice that hints are known as <em>cue banners</em> under MSW or
|
||||
<em>placeholder strings</em> under OS X.
|
||||
<em>placeholder strings</em> under macOS.
|
||||
|
||||
@see wxTextEntry::SetHint()
|
||||
|
||||
|
@@ -38,12 +38,15 @@
|
||||
allows the user to choose from the list of options but doesn't allow
|
||||
to enter a value not present in the list.
|
||||
@style{wxCB_SORT}
|
||||
Sorts the entries in the list alphabetically. Notice that this style
|
||||
is not currently implemented in wxOSX.
|
||||
Sorts the entries in the list alphabetically.
|
||||
@style{wxTE_PROCESS_ENTER}
|
||||
The control will generate the event @c wxEVT_TEXT_ENTER
|
||||
(otherwise pressing Enter key is either processed internally by the
|
||||
control or used for navigation between dialog controls).
|
||||
The control will generate the event @c wxEVT_TEXT_ENTER that can be
|
||||
handled by the program. Otherwise, i.e. either if this style not
|
||||
specified at all, or it is used, but there is no event handler for
|
||||
this event or the event handler called wxEvent::Skip() to avoid
|
||||
overriding the default handling, pressing Enter key is either
|
||||
processed internally by the control or used to activate the default
|
||||
button of the dialog, if any.
|
||||
@endStyleTable
|
||||
|
||||
@beginEventEmissionTable{wxCommandEvent}
|
||||
@@ -101,7 +104,7 @@ public:
|
||||
Window position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Window size.
|
||||
Window size.
|
||||
If ::wxDefaultSize is specified then the window is sized appropriately.
|
||||
@param n
|
||||
Number of strings with which to initialise the control.
|
||||
|
@@ -27,9 +27,9 @@ enum
|
||||
However, usually you don't even need to know the precise nature of the
|
||||
class you're working with but you would just use the wxConfigBase methods.
|
||||
This allows you to write the same code regardless of whether you're working
|
||||
with the registry under Windows or text-based config files under Unix.
|
||||
To make writing the portable code even easier, wxWidgets provides a typedef
|
||||
wxConfig which is mapped onto the native wxConfigBase implementation on the
|
||||
with the registry under Windows or text-based config files under Unix.
|
||||
To make writing the portable code even easier, wxWidgets provides a typedef
|
||||
wxConfig which is mapped onto the native wxConfigBase implementation on the
|
||||
given platform: i.e. wxRegConfig under Windows and wxFileConfig otherwise.
|
||||
|
||||
See @ref overview_config for a description of all features of this class.
|
||||
@@ -253,7 +253,7 @@ enum
|
||||
|
||||
@library{wxbase}
|
||||
@category{cfg}
|
||||
|
||||
|
||||
@see wxConfigPathChanger
|
||||
*/
|
||||
class wxConfigBase : public wxObject
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
Set current path: if the first character is '/', it is the absolute
|
||||
path, otherwise it is a relative path. '..' is supported. If @a strPath
|
||||
doesn't exist, it is created.
|
||||
|
||||
|
||||
@see wxConfigPathChanger
|
||||
*/
|
||||
virtual void SetPath(const wxString& strPath) = 0;
|
||||
@@ -889,12 +889,12 @@ public:
|
||||
@class wxConfigPathChanger
|
||||
|
||||
A handy little class which changes the current path in a wxConfig object and restores it in dtor.
|
||||
Declaring a local variable of this type, it's possible to work in a specific directory
|
||||
Declaring a local variable of this type, it's possible to work in a specific directory
|
||||
and ensure that the path is automatically restored when the function returns.
|
||||
|
||||
For example:
|
||||
@code
|
||||
// this function loads somes settings from the given wxConfig object;
|
||||
// this function loads some settings from the given wxConfig object;
|
||||
// the path selected inside it is left unchanged
|
||||
bool LoadMySettings(wxConfigBase* cfg)
|
||||
{
|
||||
@@ -902,13 +902,13 @@ public:
|
||||
wxString str;
|
||||
if ( !config->Read("SomeString", &str) ) {
|
||||
wxLogError("Couldn't read SomeString!");
|
||||
return false;
|
||||
return false;
|
||||
// NOTE: without wxConfigPathChanger it would be easy to forget to
|
||||
// set the old path back into the wxConfig object before this return!
|
||||
}
|
||||
|
||||
|
||||
// do something useful with SomeString...
|
||||
|
||||
|
||||
return true; // again: wxConfigPathChanger dtor will restore the original wxConfig path
|
||||
}
|
||||
@endcode
|
||||
@@ -923,21 +923,21 @@ public:
|
||||
/**
|
||||
Changes the path of the given wxConfigBase object so that the key @a strEntry is accessible
|
||||
(for read or write).
|
||||
|
||||
In other words, the ctor uses wxConfigBase::SetPath() with everything which precedes the
|
||||
|
||||
In other words, the ctor uses wxConfigBase::SetPath() with everything which precedes the
|
||||
last slash of @a strEntry, so that:
|
||||
@code
|
||||
wxConfigPathChanger(wxConfigBase::Get(), "/MyProgram/SomeKeyName");
|
||||
@endcode
|
||||
@endcode
|
||||
has the same effect of:
|
||||
@code
|
||||
wxConfigPathChanger(wxConfigBase::Get(), "/MyProgram/");
|
||||
@endcode
|
||||
@endcode
|
||||
*/
|
||||
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
|
||||
|
||||
/**
|
||||
Restores the path selected, inside the wxConfig object passed to the ctor, to the path which was
|
||||
Restores the path selected, inside the wxConfig object passed to the ctor, to the path which was
|
||||
selected when the wxConfigPathChanger ctor was called.
|
||||
*/
|
||||
~wxConfigPathChanger();
|
||||
@@ -949,9 +949,9 @@ public:
|
||||
const wxString& Name() const;
|
||||
|
||||
/**
|
||||
This method must be called if the original path inside the wxConfig object
|
||||
(i.e. the current path at the moment of creation of this wxConfigPathChanger object)
|
||||
could have been deleted, thus preventing wxConfigPathChanger from restoring the not
|
||||
This method must be called if the original path inside the wxConfig object
|
||||
(i.e. the current path at the moment of creation of this wxConfigPathChanger object)
|
||||
could have been deleted, thus preventing wxConfigPathChanger from restoring the not
|
||||
existing (any more) path.
|
||||
|
||||
If the original path doesn't exist any more, the path will be restored to
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
@param style
|
||||
Control style. For generic window styles, please see wxWindow.
|
||||
@param validator
|
||||
Control validator.
|
||||
Control validator.
|
||||
@param name
|
||||
Control name.
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
Default constructor to allow 2-phase creation.
|
||||
*/
|
||||
wxControl();
|
||||
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
@@ -140,6 +140,27 @@ public:
|
||||
*/
|
||||
wxSize GetSizeFromTextSize(const wxSize& tsize) const;
|
||||
|
||||
/**
|
||||
Determine the minimum size needed by the control to display the given text.
|
||||
|
||||
The helper function that uses combination of GetSizeFromTextSize() and
|
||||
GetTextExtent() which used together pretty often:
|
||||
@code
|
||||
wxSize GetSizeFromText(const wxString& text) const
|
||||
{
|
||||
return GetSizeFromTextSize(GetTextExtent(text).GetWidth());
|
||||
}
|
||||
@endcode
|
||||
|
||||
@param text The given text.
|
||||
@return The size that the control should have to leave the area of the
|
||||
specified text. May return wxDefaultSize if this method is not
|
||||
implemented for this particular control under the current platform.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
wxSize GetSizeFromText(const wxString& text) const;
|
||||
|
||||
/**
|
||||
Sets the control's label.
|
||||
|
||||
@@ -332,7 +353,7 @@ public:
|
||||
|
||||
|
||||
public: // static functions
|
||||
|
||||
|
||||
/**
|
||||
Returns the given @a label string without mnemonics ("&" characters).
|
||||
*/
|
||||
@@ -340,7 +361,7 @@ public: // static functions
|
||||
|
||||
/**
|
||||
Returns the given @a str string without mnemonics ("&" characters).
|
||||
|
||||
|
||||
@note This function is identical to GetLabelText() and is provided
|
||||
mostly for symmetry with EscapeMnemonics().
|
||||
*/
|
||||
|
@@ -146,6 +146,22 @@ public:
|
||||
*/
|
||||
wxBOM GetBOM() const;
|
||||
|
||||
/**
|
||||
Return the detected encoding
|
||||
|
||||
Returns @c wxFONTENCODING_MAX if called before the first use.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxBOM GetEncoding() const;
|
||||
|
||||
/**
|
||||
Check if the fall-back encoding is used.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
bool IsUsingFallbackEncoding() const;
|
||||
|
||||
/**
|
||||
Return a pointer to the characters that makes up this BOM.
|
||||
|
||||
|
@@ -182,7 +182,7 @@ public:
|
||||
so that this button is only added to a dialog for non-Windows platforms
|
||||
(use wxDIALOG_EX_CONTEXTHELP on Windows).
|
||||
|
||||
Note that on OS X, the cursor does not change when in context-sensitive
|
||||
Note that on macOS, the cursor does not change when in context-sensitive
|
||||
help mode.
|
||||
|
||||
@library{wxcore}
|
||||
@@ -257,8 +257,8 @@ public:
|
||||
Button position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Button size.
|
||||
If ::wxDefaultSize is specified then the button is sized appropriately
|
||||
Button size.
|
||||
If ::wxDefaultSize is specified then the button is sized appropriately
|
||||
for the question mark bitmap.
|
||||
@param style
|
||||
Window style.
|
||||
|
@@ -113,10 +113,6 @@ public:
|
||||
|
||||
@return The position of the current selection.
|
||||
|
||||
@remarks This method can be used with single selection list boxes only,
|
||||
you should use wxListBox::GetSelections() for the list
|
||||
boxes with wxLB_MULTIPLE style.
|
||||
|
||||
@see SetSelection(), GetStringSelection()
|
||||
*/
|
||||
virtual int GetSelection() const = 0;
|
||||
@@ -354,6 +350,12 @@ public:
|
||||
failure in debug builds) to remove an item with the index negative or
|
||||
greater or equal than the number of items in the control.
|
||||
|
||||
If there is a currently selected item below the item being deleted,
|
||||
i.e. if GetSelection() returns a valid index greater than or equal to
|
||||
@a n, the selection is invalidated when this function is called.
|
||||
However if the selected item appears before the item being deleted, the
|
||||
selection is preserved unchanged.
|
||||
|
||||
@param n
|
||||
The zero-based item index.
|
||||
|
||||
|
@@ -138,12 +138,12 @@ public:
|
||||
(to load a cursor from a .ico icon file) and @c wxBITMAP_TYPE_ANI
|
||||
(to load a cursor from a .ani icon file).
|
||||
- under MacOS, it defaults to @c wxBITMAP_TYPE_MACCURSOR_RESOURCE;
|
||||
when specifying a string resource name, first the color cursors 'crsr'
|
||||
and then the black/white cursors 'CURS' in the resource chain are scanned
|
||||
through. Note that resource forks are deprecated on OS X so this
|
||||
when specifying a string resource name, first the color cursors 'crsr'
|
||||
and then the black/white cursors 'CURS' in the resource chain are scanned
|
||||
through. Note that resource forks are deprecated on macOS so this
|
||||
is only available for legacy reasons and should not be used in
|
||||
new code.
|
||||
- under GTK, it defaults to @c wxBITMAP_TYPE_XPM.
|
||||
- under GTK, it defaults to @c wxBITMAP_TYPE_XPM.
|
||||
See the wxCursor(const wxImage& image) ctor for more info.
|
||||
- under X11, it defaults to @c wxBITMAP_TYPE_XPM.
|
||||
- under Motif, it defaults to @c wxBITMAP_TYPE_XBM.
|
||||
|
@@ -753,15 +753,9 @@ public:
|
||||
wxFileDataObject is a specialization of wxDataObject for file names. The
|
||||
program works with it just as if it were a list of absolute file names, but
|
||||
internally it uses the same format as Explorer and other compatible
|
||||
programs under Windows or GNOME/KDE filemanager under Unix which makes it
|
||||
programs under Windows or GNOME/KDE file manager under Unix which makes it
|
||||
possible to receive files from them using this class.
|
||||
|
||||
@warning Under all non-Windows platforms this class is currently
|
||||
"input-only", i.e. you can receive the files from another
|
||||
application, but copying (or dragging) file(s) from a wxWidgets
|
||||
application is not currently supported. PS: GTK2 should work as
|
||||
well.
|
||||
|
||||
@library{wxcore}
|
||||
@category{dnd}
|
||||
|
||||
@@ -791,7 +785,7 @@ public:
|
||||
@class wxHTMLDataObject
|
||||
|
||||
wxHTMLDataObject is used for working with HTML-formatted text.
|
||||
|
||||
|
||||
@library{wxcore}
|
||||
@category{dnd}
|
||||
|
||||
@@ -809,7 +803,7 @@ public:
|
||||
Returns the HTML string.
|
||||
*/
|
||||
virtual wxString GetHTML() const;
|
||||
|
||||
|
||||
/**
|
||||
Sets the HTML string.
|
||||
*/
|
||||
|
@@ -52,6 +52,10 @@
|
||||
- wxDataViewModel::ItemsDeleted,
|
||||
- wxDataViewModel::ItemsChanged.
|
||||
|
||||
Note that Cleared() can be called for all changes involving many, or all,
|
||||
of the model items and not only for deleting all of them (i.e. clearing the
|
||||
model).
|
||||
|
||||
This class maintains a list of wxDataViewModelNotifier which link this class
|
||||
to the specific implementations on the supported platforms so that e.g. calling
|
||||
wxDataViewModel::ValueChanged on this model will just call
|
||||
@@ -69,22 +73,22 @@
|
||||
associating the model with a control like this:
|
||||
|
||||
@code
|
||||
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, wxID_ANY );
|
||||
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl(this, wxID_ANY);
|
||||
wxDataViewModel *musicModel = new MyMusicModel;
|
||||
m_musicCtrl->AssociateModel( musicModel );
|
||||
|
||||
musicCtrl->AssociateModel(musicModel);
|
||||
musicModel->DecRef(); // avoid memory leak !!
|
||||
|
||||
// add columns now
|
||||
@endcode
|
||||
|
||||
A potentially better way to avoid memory leaks is to use wxObjectDataPtr
|
||||
|
||||
|
||||
@code
|
||||
wxObjectDataPtr<MyMusicModel> musicModel;
|
||||
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl(this, wxID_ANY);
|
||||
wxObjectDataPtr<wxDataViewModel> musicModel(new MyMusicModel);
|
||||
|
||||
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, wxID_ANY );
|
||||
musicModel = new MyMusicModel;
|
||||
m_musicCtrl->AssociateModel( musicModel.get() );
|
||||
musicCtrl->AssociateModel(musicModel.get());
|
||||
|
||||
// add columns now
|
||||
@endcode
|
||||
@@ -129,8 +133,16 @@ public:
|
||||
unsigned int col);
|
||||
|
||||
/**
|
||||
Called to inform the model that all data has been cleared.
|
||||
The control will reread the data from the model again.
|
||||
Called to inform the model that all of its data has been changed.
|
||||
|
||||
This method should be called if so many of the model items have
|
||||
changed, that the control should just reread all of them, repopulating
|
||||
itself entirely.
|
||||
|
||||
Note that, contrary to the name of the method, it doesn't necessarily
|
||||
indicate that model has become empty -- although this is the right
|
||||
method to call, rather than ItemsDeleted(), if it was indeed cleared,
|
||||
which explains the origin of its name.
|
||||
*/
|
||||
bool Cleared();
|
||||
|
||||
@@ -292,14 +304,18 @@ public:
|
||||
|
||||
All normal items have values in all columns but the container items
|
||||
only show their label in the first column (@a col == 0) by default (but
|
||||
see HasContainerColumns()). So this function always returns true for
|
||||
see HasContainerColumns()). So this function by default returns true for
|
||||
the first column while for the other ones it returns true only if the
|
||||
item is not a container or HasContainerColumns() was overridden to
|
||||
return true for it.
|
||||
|
||||
Since wxWidgets 3.1.4, this method is virtual and can be overridden to
|
||||
explicitly specify for which columns a given item has, and doesn't
|
||||
have, values.
|
||||
|
||||
@since 2.9.1
|
||||
*/
|
||||
bool HasValue(const wxDataViewItem& item, unsigned col) const;
|
||||
virtual bool HasValue(const wxDataViewItem& item, unsigned col) const;
|
||||
|
||||
/**
|
||||
Override this to indicate of @a item is a container, i.e.\ if
|
||||
@@ -382,7 +398,7 @@ public:
|
||||
*/
|
||||
bool ValueChanged(const wxDataViewItem& item, unsigned int col);
|
||||
|
||||
|
||||
|
||||
virtual bool IsListModel() const;
|
||||
virtual bool IsVirtualListModel() const;
|
||||
|
||||
@@ -527,7 +543,7 @@ public:
|
||||
have other reason to use a virtual control.
|
||||
|
||||
@see wxDataViewListModel for the API.
|
||||
|
||||
|
||||
@library{wxcore}
|
||||
@category{dvc}
|
||||
*/
|
||||
@@ -597,9 +613,9 @@ public:
|
||||
wxDataViewVirtualListModel is a specialized data model which lets you address
|
||||
an item by its position (row) rather than its wxDataViewItem and as such offers
|
||||
the exact same interface as wxDataViewIndexListModel.
|
||||
The important difference is that under platforms other than OS X, using this
|
||||
The important difference is that under platforms other than macOS, using this
|
||||
model will result in a truly virtual control able to handle millions of items
|
||||
as the control doesn't store any item (a feature not supported by OS X).
|
||||
as the control doesn't store any item (a feature not supported by macOS).
|
||||
|
||||
@see wxDataViewListModel for the API.
|
||||
|
||||
@@ -701,10 +717,9 @@ public:
|
||||
/**
|
||||
Call this to set the background colour to use.
|
||||
|
||||
Currently this attribute is only supported in the generic version of
|
||||
wxDataViewCtrl and ignored by the native GTK+ and OS X implementations.
|
||||
|
||||
@since 2.9.4
|
||||
@since 2.9.4 - Generic
|
||||
@since 3.1.1 - wxGTK
|
||||
@since 3.1.4 - wxOSX
|
||||
*/
|
||||
void SetBackgroundColour(const wxColour& colour);
|
||||
|
||||
@@ -718,7 +733,7 @@ public:
|
||||
text.
|
||||
|
||||
Currently this attribute is only supported in the generic version of
|
||||
wxDataViewCtrl and GTK and ignored by the native OS X implementations.
|
||||
wxDataViewCtrl and GTK and ignored by the native macOS implementations.
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
@@ -966,14 +981,17 @@ wxEventType wxEVT_DATAVIEW_ITEM_DROP;
|
||||
Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_CLICK event.
|
||||
@event{EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK event.
|
||||
Notice that currently this event is not generated in the native OS X
|
||||
Notice that currently this event is not generated in the native macOS
|
||||
versions of the control.
|
||||
@event{EVT_DATAVIEW_COLUMN_SORTED(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_COLUMN_SORTED event.
|
||||
@event{EVT_DATAVIEW_COLUMN_REORDERED(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_COLUMN_REORDERED event.
|
||||
@event{EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event.
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event which is generated
|
||||
when the user starts dragging a valid item. This event must be
|
||||
processed and wxDataViewEvent::SetDataObject() must be called to
|
||||
actually start dragging the item.
|
||||
@event{EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE event.
|
||||
@event{EVT_DATAVIEW_ITEM_DROP(id, func)}
|
||||
@@ -1384,6 +1402,16 @@ public:
|
||||
*/
|
||||
void ExpandAncestors( const wxDataViewItem & item );
|
||||
|
||||
/**
|
||||
Expand all all children of the given item recursively.
|
||||
|
||||
This is the same as calling Expand() on the @a item itself and then
|
||||
calling it for all of its children, grandchildren etc recursively.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
void ExpandChildren( const wxDataViewItem & item );
|
||||
|
||||
/**
|
||||
Returns pointer to the column. @a pos refers to the position in the
|
||||
control which may change after reordering columns by the user.
|
||||
@@ -1415,8 +1443,8 @@ public:
|
||||
style as in the case of single selection it returns the same thing as
|
||||
GetSelection().
|
||||
|
||||
Notice that under all platforms except OS X the currently focused
|
||||
item may be selected or not but under OS X the current item is always
|
||||
Notice that under all platforms except macOS the currently focused
|
||||
item may be selected or not but under macOS the current item is always
|
||||
selected.
|
||||
|
||||
@see SetCurrentItem(), GetCurrentColumn()
|
||||
@@ -1621,7 +1649,7 @@ public:
|
||||
In single selection mode, calling this method is the same as calling
|
||||
Select() and is thus not very useful. In multiple selection mode this
|
||||
method only moves the current item however without changing the
|
||||
selection except under OS X where the current item is always selected,
|
||||
selection except under macOS where the current item is always selected,
|
||||
so calling SetCurrentItem() selects @a item if it hadn't been selected
|
||||
before.
|
||||
|
||||
@@ -1634,7 +1662,7 @@ public:
|
||||
/**
|
||||
Set custom colours and/or font to use for the header.
|
||||
|
||||
This method allows to customize the display of the control header (it
|
||||
This method allows customizing the display of the control header (it
|
||||
does nothing if @c wxDV_NO_HEADER style is used).
|
||||
|
||||
Currently it is only implemented in the generic version and just
|
||||
@@ -1657,6 +1685,9 @@ public:
|
||||
|
||||
/**
|
||||
Sets the selection to the array of wxDataViewItems.
|
||||
|
||||
Note that if @a sel contains any invalid items, they are simply
|
||||
ignored.
|
||||
*/
|
||||
virtual void SetSelections(const wxDataViewItemArray& sel);
|
||||
|
||||
@@ -1677,7 +1708,7 @@ public:
|
||||
This function can only be used when all rows have the same height, i.e.
|
||||
when wxDV_VARIABLE_LINE_HEIGHT flag is not used.
|
||||
|
||||
Currently this is implemented in the generic and native GTK and OS X
|
||||
Currently this is implemented in the generic and native GTK and macOS
|
||||
(since 3.1.1) versions.
|
||||
|
||||
Also notice that this method can only be used to increase the row
|
||||
@@ -2012,7 +2043,7 @@ public:
|
||||
The default value of @c wxDVR_DEFAULT_ALIGNMENT indicates that the content
|
||||
should have the same alignment as the column header.
|
||||
|
||||
The method is not implemented under OS X and the renderer always aligns
|
||||
The method is not implemented under macOS and the renderer always aligns
|
||||
its contents as the column header on that platform. The other platforms
|
||||
support both vertical and horizontal alignment.
|
||||
*/
|
||||
@@ -2064,7 +2095,7 @@ public:
|
||||
*/
|
||||
virtual bool Validate(wxVariant& value);
|
||||
|
||||
|
||||
|
||||
virtual bool HasEditorCtrl() const;
|
||||
virtual wxWindow* CreateEditorCtrl(wxWindow * parent,
|
||||
wxRect labelRect,
|
||||
@@ -2208,7 +2239,7 @@ public:
|
||||
class wxDataViewCheckIconTextRenderer : public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
static wxString GetDefaultType() { return wxS("wxDataViewCheckIconText"); }
|
||||
static wxString GetDefaultType();
|
||||
|
||||
/**
|
||||
Create a new renderer.
|
||||
@@ -2501,10 +2532,6 @@ public:
|
||||
corresponding event. Is @NULL otherwise (for keyboard activation).
|
||||
Mouse coordinates are adjusted to be relative to the cell.
|
||||
|
||||
@note Currently support for this method is not implemented in the
|
||||
native macOS version of the control, i.e. it will be never called
|
||||
there.
|
||||
|
||||
@since 2.9.3
|
||||
|
||||
@note Do not confuse this method with item activation in wxDataViewCtrl
|
||||
@@ -2551,6 +2578,10 @@ public:
|
||||
}
|
||||
@endcode
|
||||
|
||||
@note Currently support for this method is not implemented in the
|
||||
native macOS version of the control, i.e. it will be never called
|
||||
there.
|
||||
|
||||
@see ActivateCell()
|
||||
*/
|
||||
virtual wxWindow* CreateEditorCtrl(wxWindow* parent,
|
||||
@@ -2703,6 +2734,12 @@ enum wxDataViewColumnFlags
|
||||
|
||||
An instance of wxDataViewRenderer is used by this class to render its data.
|
||||
|
||||
@note In wxGTK, setting the width of the column doesn't happen immediately
|
||||
when SetWidth() is called, but only slightly later and GetWidth() will
|
||||
return the old width (0 initially) until this happens. If the column
|
||||
widths are set before wxDataViewCtrl is initially shown, they will only
|
||||
be effectively set when it becomes visible.
|
||||
|
||||
@library{wxcore}
|
||||
@category{dvc}
|
||||
*/
|
||||
@@ -3280,7 +3317,7 @@ public:
|
||||
Returns true if item is a container.
|
||||
*/
|
||||
bool IsContainer( const wxDataViewItem& item );
|
||||
|
||||
|
||||
/**
|
||||
Calls the same method from wxDataViewTreeStore but uses
|
||||
an index position in the image list instead of a wxIcon.
|
||||
@@ -3710,7 +3747,10 @@ public:
|
||||
Currently this event is not generated when using the native GTK+
|
||||
version of the control.
|
||||
@event{EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event.
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event which is generated
|
||||
when the user starts dragging a valid item. This event must be
|
||||
processed and wxDataViewEvent::SetDataObject() must be called to
|
||||
actually start dragging the item.
|
||||
@event{EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, func)}
|
||||
Process a @c wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE event.
|
||||
@event{EVT_DATAVIEW_ITEM_DROP(id, func)}
|
||||
@@ -3795,7 +3835,7 @@ public:
|
||||
|
||||
Currently support for setting this field and for vetoing the change is
|
||||
only available in the generic version of wxDataViewCtrl, i.e. under MSW
|
||||
but not GTK nor OS X.
|
||||
but not GTK nor macOS.
|
||||
|
||||
@since 2.9.3
|
||||
*/
|
||||
@@ -3823,6 +3863,12 @@ public:
|
||||
|
||||
/**
|
||||
Set wxDataObject for data transfer within a drag operation.
|
||||
|
||||
This method must be used inside a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
|
||||
handler to associate the data object to be dragged with the item.
|
||||
|
||||
Note that the control takes ownership of the data object, i.e. @a obj
|
||||
must be heap-allocated and will be deleted by wxDataViewCtrl itself.
|
||||
*/
|
||||
void SetDataObject( wxDataObject *obj );
|
||||
|
||||
@@ -3844,13 +3890,13 @@ public:
|
||||
/**
|
||||
Specify the kind of the drag operation to perform.
|
||||
|
||||
This method can be used inside a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
|
||||
This method can be used inside a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
|
||||
handler in order to configure the drag operation. Valid values are
|
||||
::wxDrag_CopyOnly (default), ::wxDrag_AllowMove (allow the data to be
|
||||
moved) and ::wxDrag_DefaultMove.
|
||||
|
||||
Currently it is only honoured by the generic version of wxDataViewCtrl
|
||||
(used e.g. under MSW) and not supported by the native GTK and OS X
|
||||
(used e.g. under MSW) and not supported by the native GTK and macOS
|
||||
versions.
|
||||
|
||||
@see GetDropEffect()
|
||||
@@ -3870,7 +3916,7 @@ public:
|
||||
|
||||
Currently this is only available when using the generic version of
|
||||
wxDataViewCtrl (used e.g. under MSW) and always returns ::wxDragNone in
|
||||
the GTK and OS X native versions.
|
||||
the GTK and macOS native versions.
|
||||
|
||||
@since 2.9.4
|
||||
*/
|
||||
@@ -3886,6 +3932,19 @@ public:
|
||||
*/
|
||||
int GetCacheTo() const;
|
||||
|
||||
/**
|
||||
Returns the index of the child item at which an item currently being
|
||||
dragged would be dropped.
|
||||
|
||||
This function can be used from wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE
|
||||
handlers to determine the exact position of the item being dropped.
|
||||
|
||||
Note that it currently always returns wxNOT_FOUND when using native GTK
|
||||
implementation of this control.
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
int GetProposedDropIndex() const;
|
||||
|
||||
/**
|
||||
Returns the item affected by the event.
|
||||
|
@@ -70,15 +70,15 @@ enum
|
||||
|
||||
@beginEventEmissionTable{wxDateEvent}
|
||||
@event{EVT_DATE_CHANGED(id, func)}
|
||||
This event fires when the user changes the current selection in the
|
||||
control.
|
||||
Process a wxEVT_DATE_CHANGED event, which fires when the user
|
||||
changes the current selection in the control.
|
||||
@endEventTable
|
||||
|
||||
@library{wxcore}
|
||||
@category{pickers}
|
||||
@appearance{datepickerctrl}
|
||||
|
||||
@see wxCalendarCtrl, wxDateEvent
|
||||
@see wxTimePickerCtrl, wxCalendarCtrl, wxDateEvent
|
||||
*/
|
||||
class wxDatePickerCtrl : public wxControl
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
Default constructor.
|
||||
*/
|
||||
wxDatePickerCtrl();
|
||||
|
||||
|
||||
/**
|
||||
Initializes the object and calls Create() with all the parameters.
|
||||
*/
|
||||
@@ -168,6 +168,22 @@ public:
|
||||
*/
|
||||
virtual wxDateTime GetValue() const;
|
||||
|
||||
/**
|
||||
Set the text to show when there is no valid value.
|
||||
|
||||
For the controls with @c wxDP_ALLOWNONE style, set the string displayed
|
||||
when the control doesn't have any valid value. Currently this is only
|
||||
actually used under MSW, where it can be used to override the previous
|
||||
value which is still displayed by the control in this case, and ignored
|
||||
elsewhere.
|
||||
|
||||
Notably, @a text can be empty to completely hide the date if no valid
|
||||
date is specified.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
void SetNullText(const wxString& text);
|
||||
|
||||
/**
|
||||
Sets the valid range for the date selection. If @a dt1 is valid, it
|
||||
becomes the earliest date (inclusive) accepted by the control. If
|
||||
|
@@ -164,7 +164,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
Date calculations often depend on the country and wxDateTime allows to set
|
||||
Date calculations often depend on the country and wxDateTime allows setting
|
||||
the country whose conventions should be used using SetCountry(). It takes
|
||||
one of the following values as parameter.
|
||||
*/
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
|
||||
This struct is analogous to standard C <code>struct tm</code> and uses
|
||||
the same, not always immediately obvious, conventions for its members:
|
||||
notably its mon and mday fields count from 0 while yday counts from 1.
|
||||
notably its mon and yday fields count from 0 while mday counts from 1.
|
||||
*/
|
||||
struct Tm
|
||||
{
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
Copy constructor.
|
||||
*/
|
||||
wxDateTime(const wxDateTime& date);
|
||||
|
||||
|
||||
/**
|
||||
Same as Set().
|
||||
*/
|
||||
@@ -387,7 +387,7 @@ public:
|
||||
@a wxDateTime::Tm structure.
|
||||
*/
|
||||
wxDateTime& Set(const Tm& tm);
|
||||
|
||||
|
||||
/**
|
||||
Sets the date from the so-called Julian Day Number.
|
||||
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
|
||||
Here are the trivial accessors. Other functions, which might have to
|
||||
perform some more complicated calculations to find the answer are under
|
||||
the "Date Arithmetics" section.
|
||||
the "Date Arithmetic" section.
|
||||
*/
|
||||
//@{
|
||||
|
||||
@@ -738,10 +738,10 @@ public:
|
||||
|
||||
|
||||
/**
|
||||
@name Date Arithmetics
|
||||
@name Date Arithmetic
|
||||
|
||||
These functions carry out
|
||||
@ref overview_datetime_arithmetics "arithmetics" on the wxDateTime
|
||||
@ref overview_datetime_arithmetics "arithmetic" on the wxDateTime
|
||||
objects. As explained in the overview, either wxTimeSpan or wxDateSpan
|
||||
may be added to wxDateTime, hence all functions are overloaded to
|
||||
accept both arguments.
|
||||
@@ -795,7 +795,7 @@ public:
|
||||
/**
|
||||
Returns the difference between this object and @a dt as a wxDateSpan.
|
||||
|
||||
This method allows to find the number of entire years, months, weeks and
|
||||
This method allows finding the number of entire years, months, weeks and
|
||||
days between @a dt and this date.
|
||||
|
||||
@since 2.9.5
|
||||
@@ -1161,11 +1161,15 @@ public:
|
||||
@a n may be either positive (counting from the beginning of the month)
|
||||
or negative (counting from the end of it).
|
||||
|
||||
For example, SetToWeekDay(2, wxDateTime::Wed) will set the date to the
|
||||
For example, SetToWeekDay(wxDateTime::Wed, 2) will set the date to the
|
||||
second Wednesday in the current month and
|
||||
SetToWeekDay(-1, wxDateTime::Sun) will set the date to the last Sunday
|
||||
SetToWeekDay(wxDateTime::Sun, -1) will set the date to the last Sunday
|
||||
in the current month.
|
||||
|
||||
Note that leaving the month or year parameters as their default values
|
||||
will result in the current month or year being substituted, overwriting
|
||||
any previous values in the wxDateTime object.
|
||||
|
||||
@return @true if the date was modified successfully, @false otherwise
|
||||
meaning that the specified date doesn't exist.
|
||||
*/
|
||||
@@ -1523,7 +1527,7 @@ public:
|
||||
static bool IsWestEuropeanCountry(Country country = Country_Default);
|
||||
|
||||
/**
|
||||
Returns the object corresponding to the current time.
|
||||
Returns the object corresponding to the current time in local time zone.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1568,11 +1572,11 @@ public:
|
||||
static wxDateTime Today();
|
||||
|
||||
/**
|
||||
Returns the object corresponding to the current UTC time including the
|
||||
Returns the object corresponding to the current time including the
|
||||
milliseconds.
|
||||
|
||||
Notice that unlike Now(), this method creates a wxDateTime object
|
||||
corresponding to UTC, not local, time.
|
||||
Like Now(), this method creates the wxDateTime object corresponding to
|
||||
the current moment in local time.
|
||||
|
||||
@see Now(), wxGetUTCTimeMillis()
|
||||
*/
|
||||
|
@@ -14,6 +14,15 @@
|
||||
and the corresponding @e dst destination pixel gets combined together to produce
|
||||
the final pixel. E.g. @c wxCLEAR and @c wxSET completely ignore the source
|
||||
and the destination pixel and always put zeroes or ones in the final surface.
|
||||
|
||||
Note that not all modes are supported under all platforms. Notably wxGTK3
|
||||
and wxMac only support the following modes:
|
||||
- wxCOPY
|
||||
- wxOR
|
||||
- wxNO_OP
|
||||
- wxCLEAR
|
||||
- wxXOR
|
||||
and, in particular, do @em not support the commonly used @c wxINVERT.
|
||||
*/
|
||||
enum wxRasterOperationMode
|
||||
{
|
||||
@@ -146,7 +155,7 @@ struct wxFontMetrics
|
||||
stated. Logical units are arbitrary units mapped to device units using
|
||||
the current mapping mode (see wxDC::SetMapMode).
|
||||
|
||||
This mechanism allows to reuse the same code which prints on e.g. a window
|
||||
This mechanism allows reusing the same code which prints on e.g. a window
|
||||
on the screen to print on e.g. a paper.
|
||||
|
||||
|
||||
@@ -155,7 +164,7 @@ struct wxFontMetrics
|
||||
In general wxDC methods don't support alpha transparency and the alpha
|
||||
component of wxColour is simply ignored and you need to use wxGraphicsContext
|
||||
for full transparency support. There are, however, a few exceptions: first,
|
||||
under OS X and GTK+ 3 colours with alpha channel are supported in all the normal
|
||||
under macOS and GTK+ 3 colours with alpha channel are supported in all the normal
|
||||
wxDC-derived classes as they use wxGraphicsContext internally. Second,
|
||||
under all platforms wxSVGFileDC also fully supports alpha channel. In both
|
||||
of these cases the instances of wxPen or wxBrush that are built from
|
||||
@@ -164,7 +173,7 @@ struct wxFontMetrics
|
||||
|
||||
@section dc_transform_support Support for Transformation Matrix
|
||||
|
||||
On some platforms (currently under MSW, GTK+ 3, OS X) wxDC has support for
|
||||
On some platforms (currently under MSW, GTK+ 3, macOS) wxDC has support for
|
||||
applying an arbitrary affine transformation matrix to its coordinate system
|
||||
(since 3.1.1 this feature is also supported by wxGCDC in all ports).
|
||||
Call CanUseTransformMatrix() to check if this support is available and then
|
||||
@@ -197,55 +206,151 @@ public:
|
||||
/**
|
||||
Convert @e device X coordinate to logical coordinate, using the current
|
||||
mapping mode, user scale factor, device origin and axis orientation.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord DeviceToLogicalX(wxCoord x) const;
|
||||
|
||||
/**
|
||||
Convert @e device X coordinate to relative logical coordinate, using the
|
||||
current mapping mode and user scale factor but ignoring the
|
||||
axis orientation. Use this for converting a width, for example.
|
||||
axis orientation. Use this for converting a horizontal distance like
|
||||
for example a width.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord DeviceToLogicalXRel(wxCoord x) const;
|
||||
|
||||
/**
|
||||
Converts @e device Y coordinate to logical coordinate, using the current
|
||||
mapping mode, user scale factor, device origin and axis orientation.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord DeviceToLogicalY(wxCoord y) const;
|
||||
|
||||
/**
|
||||
Convert @e device Y coordinate to relative logical coordinate, using the
|
||||
current mapping mode and user scale factor but ignoring the
|
||||
axis orientation. Use this for converting a height, for example.
|
||||
axis orientation. Use this for converting a vertical distance like
|
||||
for example a height.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord DeviceToLogicalYRel(wxCoord y) const;
|
||||
|
||||
/**
|
||||
Converts logical X coordinate to device coordinate, using the current
|
||||
mapping mode, user scale factor, device origin and axis orientation.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord LogicalToDeviceX(wxCoord x) const;
|
||||
|
||||
/**
|
||||
Converts logical X coordinate to relative device coordinate, using the
|
||||
current mapping mode and user scale factor but ignoring the
|
||||
axis orientation. Use this for converting a width, for example.
|
||||
axis orientation. Use this for converting a horizontal distance like
|
||||
for example a width.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord LogicalToDeviceXRel(wxCoord x) const;
|
||||
|
||||
/**
|
||||
Converts logical Y coordinate to device coordinate, using the current
|
||||
mapping mode, user scale factor, device origin and axis orientation.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord LogicalToDeviceY(wxCoord y) const;
|
||||
|
||||
/**
|
||||
Converts logical Y coordinate to relative device coordinate, using the
|
||||
current mapping mode and user scale factor but ignoring the
|
||||
axis orientation. Use this for converting a height, for example.
|
||||
axis orientation. Use this for converting a vertical distance like
|
||||
for example a height.
|
||||
|
||||
@note Affine transformation applied to the coordinate system
|
||||
with SetTransformMatrix() is not taken into account.
|
||||
*/
|
||||
wxCoord LogicalToDeviceYRel(wxCoord y) const;
|
||||
|
||||
/**
|
||||
Converts device (@a x, @a y) coordinates to logical coordinates
|
||||
taking into account all applied transformations like the current
|
||||
mapping mode, scale factors, device origin, axes orientation,
|
||||
affine transformation.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxPoint DeviceToLogical(wxCoord x, wxCoord y) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxPoint DeviceToLogical(const wxPoint& pt) const;
|
||||
|
||||
/**
|
||||
Converts device @a x, @a y coordinates to relative logical coordinates
|
||||
taking into account all applied transformations like the current
|
||||
mapping mode, scale factors, affine transformation.
|
||||
Use this for converting distances like e.g. width and height.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxSize DeviceToLogicalRel(int x, int y) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxSize DeviceToLogicalRel(const wxSize& dim) const;
|
||||
|
||||
/**
|
||||
Converts logical (@a x, @a y) coordinates to device coordinates
|
||||
taking into account all applied transformations like the current
|
||||
mapping mode, scale factors, device origin, axes orientation,
|
||||
affine transformation.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxPoint LogicalToDevice(wxCoord x, wxCoord y) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxPoint LogicalToDevice(const wxPoint& pt) const;
|
||||
|
||||
/**
|
||||
Converts logical @a x, @a y coordinates to relative device coordinates
|
||||
taking into account all applied transformations like the current
|
||||
mapping mode, scale factors, affine transformation.
|
||||
Use this for converting distances like e.g. width and height.
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxSize LogicalToDeviceRel(int x, int y) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
wxSize LogicalToDeviceRel(const wxSize& dim) const;
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
@@ -257,6 +362,13 @@ public:
|
||||
|
||||
/**
|
||||
Clears the device context using the current background brush.
|
||||
|
||||
Note that SetBackground() method must be used to set the brush used by
|
||||
Clear(), the brush used for filling the shapes set by SetBrush() is
|
||||
ignored by it.
|
||||
|
||||
If no background brush was set, solid white brush is used to clear the
|
||||
device context.
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
@@ -289,7 +401,7 @@ public:
|
||||
|
||||
/**
|
||||
Draw a bitmap on the device context at the specified point. If
|
||||
@a transparent is @true and the bitmap has a transparency mask, the
|
||||
@a useMask is @true and the bitmap has a transparency mask, the
|
||||
bitmap will be drawn transparently.
|
||||
|
||||
When drawing a mono-bitmap, the current text foreground colour will be
|
||||
@@ -550,7 +662,7 @@ public:
|
||||
void DrawRectangle(const wxRect& rect);
|
||||
|
||||
/**
|
||||
Draws the text rotated by @a angle degrees
|
||||
Draws the text rotated by @a angle degrees
|
||||
(positive angles are counterclockwise; the full angle is 360 degrees).
|
||||
|
||||
Notice that, as with DrawText(), the @a text can contain multiple lines
|
||||
@@ -853,7 +965,7 @@ public:
|
||||
/**
|
||||
Returns the various font characteristics.
|
||||
|
||||
This method allows to retrieve some of the font characteristics not
|
||||
This method allows retrieving some of the font characteristics not
|
||||
returned by GetTextExtent(), notably internal leading and average
|
||||
character width.
|
||||
|
||||
@@ -876,6 +988,12 @@ public:
|
||||
used for the text extent calculation, otherwise the currently selected
|
||||
font is used.
|
||||
|
||||
If @a string is empty, its horizontal extent is 0 but, for convenience
|
||||
when using this function for allocating enough space for a possibly
|
||||
multi-line string, its vertical extent is the same as the height of an
|
||||
empty line of text. Please note that this behaviour differs from that
|
||||
of GetTextExtent().
|
||||
|
||||
@note This function works with both single-line and multi-line strings.
|
||||
|
||||
@beginWxPerlOnly
|
||||
@@ -938,6 +1056,8 @@ public:
|
||||
used for the text extent calculation. Otherwise the currently selected
|
||||
font is.
|
||||
|
||||
If @a string is empty, its extent is 0 in both directions, as expected.
|
||||
|
||||
@note This function only works with single-line strings.
|
||||
|
||||
@beginWxPerlOnly
|
||||
@@ -973,17 +1093,17 @@ public:
|
||||
//@{
|
||||
|
||||
/**
|
||||
Returns the current background mode: @c wxPENSTYLE_SOLID or @c wxPENSTYLE_TRANSPARENT.
|
||||
Returns the current background mode: @c wxBRUSHSTYLE_SOLID or @c wxBRUSHSTYLE_TRANSPARENT.
|
||||
|
||||
@see SetBackgroundMode()
|
||||
*/
|
||||
int GetBackgroundMode() const;
|
||||
|
||||
/**
|
||||
Gets the current font.
|
||||
|
||||
Notice that even although each device context object has some default font
|
||||
after creation, this method would return a ::wxNullFont initially and only
|
||||
Gets the current font.
|
||||
|
||||
Notice that even although each device context object has some default font
|
||||
after creation, this method would return a ::wxNullFont initially and only
|
||||
after calling SetFont() a valid font is returned.
|
||||
*/
|
||||
const wxFont& GetFont() const;
|
||||
@@ -1013,18 +1133,23 @@ public:
|
||||
const wxColour& GetTextForeground() const;
|
||||
|
||||
/**
|
||||
@a mode may be one of @c wxPENSTYLE_SOLID and @c wxPENSTYLE_TRANSPARENT.
|
||||
|
||||
This setting determines whether text will be drawn with a background
|
||||
Change the current background mode.
|
||||
|
||||
This setting determines whether text will be drawn with a background
|
||||
colour or not.
|
||||
|
||||
Default is @c wxBRUSHSTYLE_TRANSPARENT, i.e. text background is not
|
||||
drawn.
|
||||
|
||||
@param mode one of @c wxBRUSHSTYLE_SOLID and @c wxBRUSHSTYLE_TRANSPARENT.
|
||||
*/
|
||||
void SetBackgroundMode(int mode);
|
||||
|
||||
/**
|
||||
Sets the current font for the DC.
|
||||
Sets the current font for the DC.
|
||||
|
||||
If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
|
||||
the current font is selected out of the device context (leaving wxDC without
|
||||
If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
|
||||
the current font is selected out of the device context (leaving wxDC without
|
||||
any valid font), allowing the current font to be destroyed safely.
|
||||
|
||||
@see wxFont
|
||||
@@ -1045,9 +1170,9 @@ public:
|
||||
void SetTextForeground(const wxColour& colour);
|
||||
|
||||
/**
|
||||
Sets the current layout direction for the device context.
|
||||
|
||||
@param dir
|
||||
Sets the current layout direction for the device context.
|
||||
|
||||
@param dir
|
||||
May be either @c wxLayout_Default, @c wxLayout_LeftToRight or
|
||||
@c wxLayout_RightToLeft.
|
||||
|
||||
@@ -1213,7 +1338,7 @@ public:
|
||||
/**
|
||||
Copy from a source DC to this DC possibly changing the scale.
|
||||
|
||||
Unlike Blit(), this method allows to specify different source and
|
||||
Unlike Blit(), this method allows specifying different source and
|
||||
destination region sizes, meaning that it can stretch or shrink it
|
||||
while copying. The same can be achieved by changing the scale of the
|
||||
source or target DC but calling this method is simpler and can also be
|
||||
@@ -1333,8 +1458,8 @@ public:
|
||||
/**
|
||||
Sets the current brush for the DC.
|
||||
|
||||
If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
|
||||
the current brush is selected out of the device context (leaving wxDC without
|
||||
If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
|
||||
the current brush is selected out of the device context (leaving wxDC without
|
||||
any valid brush), allowing the current brush to be destroyed safely.
|
||||
|
||||
@see wxBrush, wxMemoryDC (for the interpretation of colours when
|
||||
@@ -1343,10 +1468,10 @@ public:
|
||||
void SetBrush(const wxBrush& brush);
|
||||
|
||||
/**
|
||||
Sets the current pen for the DC.
|
||||
Sets the current pen for the DC.
|
||||
|
||||
If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
|
||||
the current pen is selected out of the device context (leaving wxDC without any
|
||||
If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
|
||||
the current pen is selected out of the device context (leaving wxDC without any
|
||||
valid pen), allowing the current pen to be destroyed safely.
|
||||
|
||||
@see wxMemoryDC for the interpretation of colours when drawing into a
|
||||
@@ -1400,8 +1525,10 @@ public:
|
||||
wxMappingMode GetMapMode() const;
|
||||
|
||||
/**
|
||||
Gets in @a colour the colour at the specified location. Not available
|
||||
for wxPostScriptDC or wxMetafileDC.
|
||||
Gets in @a colour the colour at the specified location.
|
||||
|
||||
This method isn't available for wxPostScriptDC or wxMetafileDC nor for
|
||||
any DC in wxOSX port and simply returns @false there.
|
||||
|
||||
@note Setting a pixel can be done using DrawPoint().
|
||||
|
||||
@@ -1495,6 +1622,14 @@ public:
|
||||
|
||||
/**
|
||||
Sets the current logical function for the device context.
|
||||
|
||||
@note This function is not fully supported in all ports, due to the
|
||||
limitations of the underlying drawing model. Notably, @c wxINVERT which
|
||||
was commonly used for drawing rubber bands or other moving outlines in
|
||||
the past, is not, and will not, be supported by wxGTK3 and wxMac. The
|
||||
suggested alternative is to draw temporarily objects normally and
|
||||
refresh the (affected part of the) window to remove them later.
|
||||
|
||||
It determines how a @e source pixel (from a pen or brush colour, or source
|
||||
device context if using Blit()) combines with a @e destination pixel in
|
||||
the current device context.
|
||||
@@ -1504,8 +1639,7 @@ public:
|
||||
|
||||
The default is @c wxCOPY, which simply draws with the current colour.
|
||||
The others combine the current colour and the background using a logical
|
||||
operation. @c wxINVERT is commonly used for drawing rubber bands or moving
|
||||
outlines, since drawing twice reverts to the original colour.
|
||||
operation.
|
||||
*/
|
||||
void SetLogicalFunction(wxRasterOperationMode function);
|
||||
|
||||
@@ -1592,7 +1726,7 @@ public:
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@name query capabilities
|
||||
*/
|
||||
@@ -1607,7 +1741,7 @@ public:
|
||||
Does the DC support calculating the size required to draw text?
|
||||
*/
|
||||
bool CanGetTextExtent() const;
|
||||
|
||||
|
||||
//@}
|
||||
|
||||
/**
|
||||
@@ -1615,17 +1749,17 @@ public:
|
||||
context, if this wxDC has something that could be thought of in that
|
||||
way. (Not all of them do.)
|
||||
|
||||
For example, on Windows the return value is an HDC, on OS X it is a
|
||||
For example, on Windows the return value is an HDC, on macOS it is a
|
||||
CGContextRef and on wxGTK it will be a GdkDrawable. If the DC is a
|
||||
wxGCDC then the return value will be the value returned from
|
||||
wxGraphicsContext::GetNativeContext. A value of NULL is returned if
|
||||
the DC does not have anything that fits the handle concept.
|
||||
|
||||
|
||||
@since 2.9.5
|
||||
*/
|
||||
void* GetHandle() const;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
If supported by the platform and the type of DC, fetch the contents of the DC, or a subset of it, as a bitmap.
|
||||
*/
|
||||
@@ -1662,6 +1796,21 @@ public:
|
||||
void GetLogicalOrigin(wxCoord *x, wxCoord *y) const;
|
||||
wxPoint GetLogicalOrigin() const;
|
||||
//@}
|
||||
|
||||
/**
|
||||
If supported by the platform and the @a wxDC implementation, this method
|
||||
will return the @a wxGraphicsContext associated with the DC. Otherwise
|
||||
@NULL is returned.
|
||||
*/
|
||||
virtual wxGraphicsContext* GetGraphicsContext() const;
|
||||
|
||||
/**
|
||||
Associate a wxGraphicsContext with the DC. Ignored if not supported by
|
||||
the specific @a wxDC implementation. It is unlikely that this will need to
|
||||
be used in application code.
|
||||
*/
|
||||
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1799,7 +1948,7 @@ public:
|
||||
@category{gdi}
|
||||
|
||||
@see wxDC::SetTextForeground(), wxDCFontChanger, wxDCPenChanger, wxDCBrushChanger,
|
||||
wxDCClipper
|
||||
wxDCClipper, wxDCTextBgColourChanger, wxDCBgModeChanger
|
||||
*/
|
||||
class wxDCTextColourChanger
|
||||
{
|
||||
@@ -1842,6 +1991,118 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxDCTextBgColourChanger
|
||||
|
||||
wxDCTextBgColourChanger is a small helper class for setting a background
|
||||
text colour on a wxDC and unsetting it automatically in the destructor,
|
||||
restoring the previous one.
|
||||
|
||||
@library{wxcore}
|
||||
@category{gdi}
|
||||
|
||||
@see wxDC::SetTextBackground(), wxDCFontChanger, wxDCPenChanger, wxDCBrushChanger,
|
||||
wxDCClipper, wxDCTextColourChanger, wxDCBgModeChanger
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
class wxDCTextBgColourChanger
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Trivial constructor not changing anything.
|
||||
|
||||
This constructor is useful if you don't know beforehand if the colour
|
||||
needs to be changed or not. It simply creates the object which won't do
|
||||
anything in its destructor unless Set() is called -- in which case it
|
||||
would reset the previous colour.
|
||||
*/
|
||||
wxDCTextBgColourChanger(wxDC& dc);
|
||||
|
||||
/**
|
||||
Sets @a col on the given @a dc, storing the old one.
|
||||
|
||||
@param dc
|
||||
The DC where the colour must be temporary set.
|
||||
@param col
|
||||
The text background colour to set.
|
||||
*/
|
||||
wxDCTextBgColourChanger(wxDC& dc, const wxColour& col);
|
||||
|
||||
/**
|
||||
Set the background colour to use.
|
||||
|
||||
This method is meant to be called once only and only on the objects
|
||||
created with the constructor overload not taking wxColour argument and
|
||||
has the same effect as the other constructor, i.e. sets the background colour to
|
||||
the given @a col and ensures that the old value is restored when this
|
||||
object is destroyed.
|
||||
*/
|
||||
void Set(const wxColour& col);
|
||||
|
||||
/**
|
||||
Restores the background colour originally selected in the DC passed to the ctor.
|
||||
*/
|
||||
~wxDCTextBgColourChanger();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxDCTextBgModeChanger
|
||||
|
||||
wxDCTextBgModeChanger is a small helper class for setting a background
|
||||
text mode on a wxDC and unsetting it automatically in the destructor,
|
||||
restoring the previous one.
|
||||
|
||||
@library{wxcore}
|
||||
@category{gdi}
|
||||
|
||||
@see wxDC::SetBackgroundMode(), wxDCFontChanger, wxDCPenChanger, wxDCBrushChanger,
|
||||
wxDCClipper, wxDCTextColourChanger, wxDCTextBgColourChanger
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
class wxDCBgModeChanger
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Trivial constructor not changing anything.
|
||||
|
||||
This constructor is useful if you don't know beforehand if the background mode
|
||||
needs to be changed or not. It simply creates the object which won't do
|
||||
anything in its destructor unless Set() is called -- in which case it
|
||||
would reset the previous mode.
|
||||
*/
|
||||
wxDCBgModeChanger(wxDC& dc);
|
||||
|
||||
/**
|
||||
Sets @a mode on the given @a dc, storing the old one.
|
||||
|
||||
@param dc
|
||||
The DC where the mode must be temporary set.
|
||||
@param mode
|
||||
The background mode to set, one of @c wxBRUSHSTYLE_SOLID or @c
|
||||
wxBRUSHSTYLE_TRANSPARENT.
|
||||
*/
|
||||
wxDCBgModeChanger(wxDC& dc, int mode);
|
||||
|
||||
/**
|
||||
Set the text background mode to use.
|
||||
|
||||
This method is meant to be called once only and only on the objects
|
||||
created with the constructor overload not taking mode argument and
|
||||
has the same effect as the other constructor, i.e. sets the background mode to
|
||||
the given @a one, and ensures that the old value is restored when this
|
||||
object is destroyed.
|
||||
*/
|
||||
void Set(int mode);
|
||||
|
||||
/**
|
||||
Restores the text background mode originally selected in the DC passed to the ctor.
|
||||
*/
|
||||
~wxDCBgModeChanger();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxDCFontChanger
|
||||
|
@@ -36,11 +36,11 @@
|
||||
Otherwise, wxBufferedDC can be used in the same way as any other device
|
||||
context.
|
||||
|
||||
There is another possible use for wxBufferedDC is to use it to maintain a
|
||||
Another possible use for wxBufferedDC is to use it to maintain a
|
||||
backing store for the window contents. In this case, the associated @e DC
|
||||
may be @NULL but a valid backing store bitmap should be specified.
|
||||
|
||||
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
|
||||
Finally, please note that GTK+ 2.0 as well as macOS provide double buffering
|
||||
themselves natively. You can either use wxWindow::IsDoubleBuffered() to
|
||||
determine whether you need to use buffering or not, or use
|
||||
wxAutoBufferedPaintDC to avoid needless double buffering on the systems
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
/**
|
||||
Blits the buffer to the dc, and detaches the dc from the buffer (so it
|
||||
can be effectively used once only).
|
||||
|
||||
|
||||
Usually only called in the destructor or by the destructor of derived
|
||||
classes if the BufferedDC must blit before the derived class (which may
|
||||
own the dc it's blitting to) is destroyed.
|
||||
|
@@ -18,12 +18,6 @@
|
||||
automatically sets the clipping area to the damaged area of the window.
|
||||
Attempts to draw outside this area do not appear.
|
||||
|
||||
To draw on a window from outside your EVT_PAINT() handler, construct a
|
||||
wxClientDC object.
|
||||
|
||||
To draw on the whole window including decorations, construct a wxWindowDC
|
||||
object (Windows only).
|
||||
|
||||
A wxPaintDC object is initialized to use the same font and colours as the
|
||||
window it is associated with.
|
||||
|
||||
@@ -46,16 +40,36 @@ public:
|
||||
/**
|
||||
@class wxClientDC
|
||||
|
||||
A wxClientDC must be constructed if an application wishes to paint on the
|
||||
client area of a window from outside an EVT_PAINT() handler. This should
|
||||
normally be constructed as a temporary stack object; don't store a
|
||||
wxClientDC object.
|
||||
wxClientDC is primarily useful for obtaining information about the window
|
||||
from outside EVT_PAINT() handler.
|
||||
|
||||
To draw on a window from within an EVT_PAINT() handler, construct a
|
||||
wxPaintDC object instead.
|
||||
Typical use of this class is to obtain the extent of some text string in
|
||||
order to allocate enough size for a window, e.g.
|
||||
@code
|
||||
// Create the initially empty label with the size big enough to show
|
||||
// the given string.
|
||||
wxClientDC dc(this);
|
||||
wxStaticText* text = new wxStaticText
|
||||
(
|
||||
this, wxID_ANY, "",
|
||||
wxPoint(),
|
||||
dc.GetTextExtent("String of max length"),
|
||||
wxST_NO_AUTORESIZE
|
||||
);
|
||||
}
|
||||
@endcode
|
||||
|
||||
To draw on the whole window including decorations, construct a wxWindowDC
|
||||
object (Windows only).
|
||||
@note While wxClientDC may also be used for drawing on the client area of a
|
||||
window from outside an EVT_PAINT() handler in some ports, this does @em not
|
||||
work on all platforms (neither wxOSX nor wxGTK with GTK 3 Wayland backend
|
||||
support this, so drawing using wxClientDC simply doesn't have any effect
|
||||
there) and the only portable way of drawing is via wxPaintDC. To redraw a
|
||||
small part of the window, use wxWindow::RefreshRect() to invalidate just
|
||||
this part and check wxWindow::GetUpdateRegion() in the paint event handler
|
||||
to redraw this part only.
|
||||
|
||||
wxClientDC objects should normally be constructed as temporary stack
|
||||
objects, i.e. don't store a wxClientDC object.
|
||||
|
||||
A wxClientDC object is initialized to use the same font and colours as the
|
||||
window it is associated with.
|
||||
|
@@ -10,9 +10,27 @@
|
||||
|
||||
wxGCDC is a device context that draws on a wxGraphicsContext.
|
||||
|
||||
@remarks
|
||||
If Direct2D is a renderer of underlying graphics context, only wxFont objects
|
||||
representing TrueType fonts can be used in the font-related functions.
|
||||
wxGCDC does its best to implement wxDC API, but the following features are
|
||||
not (fully) implemented because wxGraphicsContext doesn't support them:
|
||||
|
||||
- GetPixel() method is not implemented and always returns @false because
|
||||
modern graphics layers don't support retrieving the contents of the drawn
|
||||
pixels.
|
||||
|
||||
- FloodFill() method is not, and can't be, implemented, as its
|
||||
functionality relies on reading the pixels from wxGraphicsContext too.
|
||||
|
||||
- SetLogicalFunction() method only works with @c wxCOPY, @c wxOR,
|
||||
@c wxNO_OP, @c wxCLEAR and @c wxXOR functions, attempts to use any other
|
||||
function (including @c wxINVERT) don't do anything.
|
||||
|
||||
- Similarly, ::wxRasterOperationMode parameter of Blit() and StretchBlit()
|
||||
can only be one of the supported logical functions listed above, using
|
||||
any other function will result in an assertion failure and not drawing
|
||||
anything.
|
||||
|
||||
- For Direct2D-based wxGraphicsContext, only true-type fonts can be used
|
||||
in the font-related functions.
|
||||
|
||||
@library{wxcore}
|
||||
@category{dc}
|
||||
@@ -44,6 +62,17 @@ public:
|
||||
Note that this object takes ownership of @a context and will delete it
|
||||
when it is destroyed or when SetGraphicsContext() is called with a
|
||||
different context object.
|
||||
|
||||
Also notice that @a context will continue using the same font, pen and
|
||||
brush as before until SetFont(), SetPen() or SetBrush() is explicitly
|
||||
called to change them. This means that the code can use this
|
||||
wxDC-derived object to work using pens and brushes with alpha component,
|
||||
for example (which normally isn't supported by wxDC API), but it also
|
||||
means that the return values of GetFont(), GetPen() and GetBrush() won't
|
||||
really correspond to the actually used objects because they simply can't
|
||||
represent them anyhow. If you wish to avoid such discrepancy, you need
|
||||
to call the setter methods to bring wxDC and wxGraphicsContext font, pen
|
||||
and brush in sync with each other.
|
||||
*/
|
||||
wxGCDC(wxGraphicsContext* context);
|
||||
|
||||
@@ -60,7 +89,7 @@ public:
|
||||
|
||||
wxGCDC();
|
||||
virtual ~wxGCDC();
|
||||
|
||||
|
||||
/**
|
||||
Retrieves associated wxGraphicsContext
|
||||
*/
|
||||
@@ -71,6 +100,11 @@ public:
|
||||
|
||||
Note that this object takes ownership of @a context and will delete it when
|
||||
it is destroyed or when SetGraphicsContext() is called again.
|
||||
|
||||
Also, unlike the constructor taking wxGraphicsContext, this method will
|
||||
reapply the current font, pen and brush, so that this object continues
|
||||
to use them, if they had been changed before (which is never the case
|
||||
when constructing wxGCDC directly from wxGraphicsContext).
|
||||
*/
|
||||
void SetGraphicsContext(wxGraphicsContext* context);
|
||||
|
||||
|
@@ -109,5 +109,12 @@ public:
|
||||
safely.
|
||||
*/
|
||||
void SelectObjectAsSource(const wxBitmap& bitmap);
|
||||
|
||||
/**
|
||||
Get the selected bitmap.
|
||||
*/
|
||||
const wxBitmap& GetSelectedBitmap() const;
|
||||
wxBitmap& GetSelectedBitmap();
|
||||
|
||||
};
|
||||
|
||||
|
@@ -5,6 +5,23 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
SVG shape rendering mode.
|
||||
|
||||
These options represent the values defined in the SVG specification:
|
||||
https://svgwg.org/svg2-draft/painting.html#ShapeRenderingProperty
|
||||
*/
|
||||
enum wxSVGShapeRenderingMode
|
||||
{
|
||||
wxSVG_SHAPE_RENDERING_AUTO = 0,
|
||||
wxSVG_SHAPE_RENDERING_OPTIMIZE_SPEED,
|
||||
wxSVG_SHAPE_RENDERING_CRISP_EDGES,
|
||||
wxSVG_SHAPE_RENDERING_GEOMETRIC_PRECISION,
|
||||
|
||||
wxSVG_SHAPE_RENDERING_OPTIMISE_SPEED = wxSVG_SHAPE_RENDERING_OPTIMIZE_SPEED
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxSVGFileDC
|
||||
|
||||
@@ -28,8 +45,9 @@
|
||||
as the SVG file, however it is possible to change this behaviour by
|
||||
replacing the built in bitmap handler using wxSVGFileDC::SetBitmapHandler().
|
||||
|
||||
A more substantial SVG library (for reading and writing) is available at
|
||||
the wxArt2D website <http://wxart2d.sourceforge.net/>.
|
||||
More substantial SVG libraries (for reading and writing) are available at
|
||||
<a href="http://wxart2d.sourceforge.net/" target="_blank">wxArt2D</a> and
|
||||
<a href="http://wxsvg.sourceforge.net/" target="_blank">wxSVG</a>.
|
||||
|
||||
@library{wxcore}
|
||||
@category{dc}
|
||||
@@ -39,28 +57,13 @@ class wxSVGFileDC : public wxDC
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Initializes a wxSVGFileDC with the given @a f filename with the given
|
||||
@a Width and @a Height at @a dpi resolution, and an optional @a title.
|
||||
Initializes a wxSVGFileDC with the given @a filename, @a width and
|
||||
@a height at @a dpi resolution, and an optional @a title.
|
||||
The title provides a readable name for the SVG document.
|
||||
*/
|
||||
wxSVGFileDC(const wxString& filename, int width = 320, int height = 240,
|
||||
double dpi = 72, const wxString& title = wxString());
|
||||
|
||||
/**
|
||||
Destructor.
|
||||
*/
|
||||
virtual ~wxSVGFileDC();
|
||||
|
||||
/**
|
||||
Does nothing.
|
||||
*/
|
||||
void EndDoc();
|
||||
|
||||
/**
|
||||
Does nothing.
|
||||
*/
|
||||
void EndPage();
|
||||
|
||||
/**
|
||||
Draws a rectangle the size of the SVG using the wxDC::SetBackground() brush.
|
||||
*/
|
||||
@@ -89,10 +92,15 @@ public:
|
||||
void SetBitmapHandler(wxSVGBitmapHandler* handler);
|
||||
|
||||
/**
|
||||
Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is
|
||||
available. Trying to set one of the other values will fail.
|
||||
Set the shape rendering mode of the generated SVG.
|
||||
All subsequent drawing calls will have this rendering mode set in the
|
||||
SVG file.
|
||||
|
||||
The default mode is wxSVG_SHAPE_RENDERING_AUTO.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void SetLogicalFunction(wxRasterOperationMode function);
|
||||
void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
|
||||
|
||||
/**
|
||||
Sets the clipping region for this device context to the intersection of
|
||||
@@ -105,24 +113,6 @@ public:
|
||||
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
|
||||
wxCoord height);
|
||||
|
||||
/**
|
||||
This is an overloaded member function, provided for convenience. It differs from the
|
||||
above function only in what argument(s) it accepts.
|
||||
*/
|
||||
void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
|
||||
|
||||
/**
|
||||
This is an overloaded member function, provided for convenience. It differs from the
|
||||
above function only in what argument(s) it accepts.
|
||||
*/
|
||||
void SetClippingRegion(const wxRect& rect);
|
||||
|
||||
/**
|
||||
This function is not implemented in this DC class.
|
||||
It could be implemented in future if a GetPoints() function were made available on wxRegion.
|
||||
*/
|
||||
void SetClippingRegion(const wxRegion& region);
|
||||
|
||||
/**
|
||||
Destroys the current clipping region so that none of the DC is clipped.
|
||||
Since intersections arising from sequential calls to SetClippingRegion are represented
|
||||
@@ -133,15 +123,20 @@ public:
|
||||
|
||||
//@{
|
||||
/**
|
||||
Functions not implemented in this DC class.
|
||||
Function not implemented in this DC class.
|
||||
*/
|
||||
void CrossHair(wxCoord x, wxCoord y);
|
||||
bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
|
||||
wxFloodFillStyle style = wxFLOOD_SURFACE);
|
||||
void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const;
|
||||
bool GetPixel(wxCoord x, wxCoord y, wxColour* colour) const;
|
||||
void SetPalette(const wxPalette& palette);
|
||||
int GetDepth() const;
|
||||
void SetLogicalFunction(wxRasterOperationMode function);
|
||||
wxRasterOperationMode GetLogicalFunction() const;
|
||||
bool StartDoc(const wxString& message);
|
||||
void EndDoc();
|
||||
void StartPage();
|
||||
void EndPage();
|
||||
//@}
|
||||
};
|
||||
|
||||
@@ -203,9 +198,17 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
Handler saving a bitmap to an external file and linking to it from the SVG.
|
||||
Handler saving bitmaps to external PNG files and linking to it from the
|
||||
SVG.
|
||||
|
||||
This handler is used by default by wxSVGFileDC.
|
||||
This handler is used by default by wxSVGFileDC. PNG files are created in
|
||||
the same folder as the SVG file and are named using the SVG filename
|
||||
appended with ``_image#.png``.
|
||||
|
||||
When using wxSVGFileDC::SetBitmapHandler() to set this handler with the
|
||||
default constructor, the PNG files are created in the runtime location of
|
||||
the application. The save location can be customized by using the
|
||||
wxSVGBitmapFileHandler(const wxFileName&) constructor.
|
||||
|
||||
@see wxSVGFileDC::SetBitmapHandler().
|
||||
|
||||
@@ -217,6 +220,17 @@ public:
|
||||
class wxSVGBitmapFileHandler : public wxSVGBitmapHandler
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Create a wxSVGBitmapFileHandler and specify the location where the file
|
||||
will be saved.
|
||||
|
||||
@param path The path of the save location. If @a path contains a
|
||||
filename, the autogenerated filename will be appended to this name.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
wxSVGBitmapFileHandler(const wxFileName& path);
|
||||
|
||||
virtual bool ProcessBitmap(const wxBitmap& bitmap,
|
||||
wxCoord x, wxCoord y,
|
||||
wxOutputStream& stream) const;
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
way (e.g. automatically uploaded to a remote server) but if the user is
|
||||
asked to manually upload or send the report, it may be more convenient
|
||||
to generate it in e.g. the users home directory and this function
|
||||
allows to do this.
|
||||
allows doing this.
|
||||
|
||||
Notice that it should be called before wxDebugReport::Process() or it
|
||||
has no effect.
|
||||
@@ -90,8 +90,8 @@ public:
|
||||
/**
|
||||
Set the base name of the generated debug report file.
|
||||
|
||||
This function is similar to SetCompressedFileDirectory() but allows to
|
||||
change the base name of the file. Notice that the file extension will
|
||||
This function is similar to SetCompressedFileDirectory() but allows
|
||||
changing the base name of the file. Notice that the file extension will
|
||||
always be @c .zip.
|
||||
|
||||
By default, a unique name constructed from wxApp::GetAppName(), the
|
||||
@@ -221,8 +221,8 @@ public:
|
||||
is copied to a file in the debug report directory with the same name.
|
||||
Otherwise the file will be searched in the temporary directory returned
|
||||
by GetDirectory().
|
||||
|
||||
The argument @a description only exists to be displayed to the user in
|
||||
|
||||
The argument @a description only exists to be displayed to the user in
|
||||
the report summary shown by wxDebugReportPreview.
|
||||
|
||||
@see GetDirectory(), AddText()
|
||||
|
@@ -292,7 +292,7 @@ enum wxBorder
|
||||
|
||||
/* wxCommandEvents and the objects of the derived classes are forwarded to the */
|
||||
/* parent window and so on recursively by default. Using this flag for the */
|
||||
/* given window allows to block this propagation at this window, i.e. prevent */
|
||||
/* given window allows blocking this propagation at this window, i.e. preventing */
|
||||
/* the events from being propagated further upwards. The dialogs have this */
|
||||
/* flag on by default. */
|
||||
#define wxWS_EX_BLOCK_EVENTS 0x00000002
|
||||
@@ -379,9 +379,8 @@ enum wxBorder
|
||||
|
||||
/*
|
||||
* wxRadioBox style flags
|
||||
* These styles are not used in any port.
|
||||
*/
|
||||
/* should we number the items from left to right or from top to bottom in a 2d */
|
||||
/* radiobox? */
|
||||
#define wxRA_LEFTTORIGHT 0x0001
|
||||
#define wxRA_TOPTOBOTTOM 0x0002
|
||||
|
||||
@@ -537,7 +536,7 @@ enum wxBackgroundStyle
|
||||
with this style.
|
||||
*/
|
||||
wxBG_STYLE_PAINT,
|
||||
|
||||
|
||||
/* this style is deprecated and doesn't do anything, don't use */
|
||||
wxBG_STYLE_COLOUR,
|
||||
|
||||
@@ -908,7 +907,7 @@ enum wxKeyCode
|
||||
WXK_CONTROL_X,
|
||||
WXK_CONTROL_Y,
|
||||
WXK_CONTROL_Z,
|
||||
|
||||
|
||||
WXK_BACK = 8, //!< Backspace.
|
||||
WXK_TAB = 9,
|
||||
WXK_RETURN = 13,
|
||||
@@ -932,13 +931,13 @@ enum wxKeyCode
|
||||
WXK_CLEAR,
|
||||
WXK_SHIFT,
|
||||
WXK_ALT,
|
||||
/** Note that under OS X, to improve compatibility with other
|
||||
/** Note that under macOS, to improve compatibility with other
|
||||
* systems, 'WXK_CONTROL' represents the 'Command' key. Use this
|
||||
* constant to work with keyboard shortcuts. See 'WXK_RAW_CONTROL'
|
||||
* to get the state of the actual 'Control' key.
|
||||
*/
|
||||
WXK_CONTROL,
|
||||
/** Under OS X, where the 'Command' key is mapped to 'Control'
|
||||
/** Under macOS, where the 'Command' key is mapped to 'Control'
|
||||
* to improve compatibility with other systems, WXK_RAW_CONTROL may
|
||||
* be used to obtain the state of the actual 'Control' key
|
||||
* ('WXK_CONTROL' would obtain the status of the 'Command' key).
|
||||
@@ -1035,8 +1034,8 @@ enum wxKeyCode
|
||||
WXK_WINDOWS_LEFT,
|
||||
WXK_WINDOWS_RIGHT,
|
||||
WXK_WINDOWS_MENU ,
|
||||
|
||||
/** This special key code was used to represent the key used for keyboard shortcuts. Under OS X,
|
||||
|
||||
/** This special key code was used to represent the key used for keyboard shortcuts. Under macOS,
|
||||
* this key maps to the 'Command' (aka logo or 'Apple') key, whereas on Linux/Windows/others
|
||||
* this is the Control key, with the new semantic of WXK_CONTROL, WXK_COMMAND is not needed anymore
|
||||
*/
|
||||
@@ -1090,17 +1089,17 @@ enum wxKeyModifier
|
||||
{
|
||||
wxMOD_NONE = 0x0000,
|
||||
wxMOD_ALT = 0x0001,
|
||||
/** Ctlr Key, corresponds to Command key on OS X */
|
||||
/** Ctlr Key, corresponds to Command key on macOS */
|
||||
wxMOD_CONTROL = 0x0002,
|
||||
wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL,
|
||||
wxMOD_SHIFT = 0x0004,
|
||||
wxMOD_META = 0x0008,
|
||||
wxMOD_WIN = wxMOD_META,
|
||||
|
||||
/** used to describe the true Ctrl Key under OS X,
|
||||
|
||||
/** used to describe the true Ctrl Key under macOS,
|
||||
identic to @c wxMOD_CONTROL on other platforms */
|
||||
wxMOD_RAW_CONTROL,
|
||||
|
||||
|
||||
/** deprecated, identic to @c wxMOD_CONTROL on all platforms */
|
||||
wxMOD_CMD = wxMOD_CONTROL,
|
||||
wxMOD_ALL = 0xffff
|
||||
@@ -1578,7 +1577,7 @@ typedef double wxDouble;
|
||||
|
||||
@header{wx/defs.h}
|
||||
*/
|
||||
template <typename T> wxDELETE(T*& ptr);
|
||||
template <typename T> void wxDELETE(T*& ptr);
|
||||
|
||||
/**
|
||||
A function which deletes and nulls the pointer.
|
||||
@@ -1598,7 +1597,7 @@ template <typename T> wxDELETE(T*& ptr);
|
||||
|
||||
@header{wx/defs.h}
|
||||
*/
|
||||
template <typename T> wxDELETEA(T*& array);
|
||||
template <typename T> void wxDELETEA(T*& array);
|
||||
|
||||
/**
|
||||
Generate deprecation warning with the given message when a function is
|
||||
@@ -1624,6 +1623,7 @@ template <typename T> wxDELETEA(T*& array);
|
||||
|
||||
@header{wx/defs.h}
|
||||
*/
|
||||
#define wxDEPRECATED_MSG(msg)
|
||||
|
||||
/**
|
||||
This macro can be used around a function declaration to generate warnings
|
||||
@@ -1796,7 +1796,7 @@ template <typename T> wxDELETEA(T*& array);
|
||||
wxASSERT( x == 4 && y == 3 );
|
||||
@endcode
|
||||
*/
|
||||
template <typename T> wxSwap(T& first, T& second);
|
||||
template <typename T> void wxSwap(T& first, T& second);
|
||||
|
||||
/**
|
||||
This macro is the same as the standard C99 @c va_copy for the compilers
|
||||
|
@@ -126,7 +126,7 @@ enum wxDialogLayoutAdaptationMode
|
||||
calling SetExtraStyle() before Create is called (two-step
|
||||
construction).
|
||||
@style{wxDIALOG_EX_METAL}
|
||||
On OS X, frames with this style will be shown with a metallic
|
||||
On macOS, frames with this style will be shown with a metallic
|
||||
look. This is an extra style.
|
||||
@endStyleTable
|
||||
|
||||
@@ -140,8 +140,7 @@ enum wxDialogLayoutAdaptationMode
|
||||
The dialog is being closed by the user or programmatically (see wxWindow::Close).
|
||||
The user may generate this event clicking the close button
|
||||
(typically the 'X' on the top-right of the title bar) if it's present
|
||||
(see the @c wxCLOSE_BOX style) or by clicking a button with the
|
||||
@c wxID_CANCEL or @c wxID_OK ids.
|
||||
(see the @c wxCLOSE_BOX style).
|
||||
@event{EVT_INIT_DIALOG(func)}
|
||||
Process a @c wxEVT_INIT_DIALOG event. See wxInitDialogEvent.
|
||||
@endEventTable
|
||||
@@ -299,6 +298,7 @@ public:
|
||||
broken either after a new line or wrapped, at word boundary, if their
|
||||
width would become bigger than the specified maximal width.
|
||||
|
||||
@param message The text to be displayed.
|
||||
@param widthMax Specifies the text's maximum width (this argument is
|
||||
available since version 3.1.1, previous versions always behaved as if
|
||||
the maximal width of -1 was specified).
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
otherwise the box is hidden. If @false and the dialog is modal,
|
||||
control is returned to the calling program.
|
||||
*/
|
||||
virtual bool Show(bool show = 1);
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
/**
|
||||
Shows an application-modal dialog.
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
EndModal().
|
||||
|
||||
Notice that it is possible to call ShowModal() for a dialog which had
|
||||
been previously shown with Show(), this allows to make an existing
|
||||
been previously shown with Show(), this allows making an existing
|
||||
modeless dialog modal. However ShowModal() can't be called twice
|
||||
without intervening EndModal() calls.
|
||||
|
||||
|
@@ -162,7 +162,7 @@ public:
|
||||
/**
|
||||
Sometimes the built-in logic for determining the online status may
|
||||
fail, so, in general, the user should be allowed to override it. This
|
||||
function allows to forcefully set the online status - whatever our
|
||||
function allows forcefully setting the online status - whatever our
|
||||
internal algorithm may think about it.
|
||||
|
||||
@see IsOnline()
|
||||
|
@@ -137,7 +137,7 @@ enum wxDirFlags
|
||||
@class wxDir
|
||||
|
||||
wxDir is a portable equivalent of Unix open/read/closedir functions which
|
||||
allow enumerating of the files in a directory. wxDir allows to enumerate
|
||||
allow enumerating of the files in a directory. wxDir allows enumerating
|
||||
files as well as directories.
|
||||
|
||||
wxDir also provides a flexible way to enumerate files recursively using
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
would be unchanged and should include ::wxDIR_DIRS flag to recurse into
|
||||
subdirectories (both flags are included in the value by default).
|
||||
See ::wxDirFlags for the list of the possible flags.
|
||||
|
||||
|
||||
@return Returns the total number of files found while traversing
|
||||
the directory @a dirname (i.e. the number of entries appended
|
||||
to the @a files array).
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
|
||||
/**
|
||||
Returns @true if the directory contains any subdirectories (if a non
|
||||
empty @a filespec is given, only check for directories matching it).
|
||||
empty @a dirspec is given, only check for directories matching it).
|
||||
The hidden subdirectories are taken into account as well.
|
||||
*/
|
||||
bool HasSubDirs(const wxString& dirspec = wxEmptyString) const;
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
|
||||
/**
|
||||
Creates a directory.
|
||||
|
||||
|
||||
This is just an alias for wxFileName::Mkdir(); refer to that function
|
||||
for more info.
|
||||
*/
|
||||
@@ -339,12 +339,12 @@ public:
|
||||
|
||||
/**
|
||||
Removes a directory.
|
||||
|
||||
|
||||
This is just an alias for wxFileName::Rmdir(); refer to that function
|
||||
for more info.
|
||||
*/
|
||||
static bool Remove(const wxString &dir, int flags = 0);
|
||||
|
||||
|
||||
/**
|
||||
Enumerate all files and directories under the given directory.
|
||||
|
||||
|
@@ -52,7 +52,7 @@ enum
|
||||
@library{wxcore}
|
||||
@category{ctrl}
|
||||
@appearance{genericdirctrl}
|
||||
|
||||
|
||||
@beginEventEmissionTable
|
||||
@event{EVT_DIRCTRL_SELECTIONCHANGED(id, func)}
|
||||
Selected directory has changed.
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
virtual ~wxDirFilterListCtrl() {}
|
||||
virtual ~wxDirFilterListCtrl();
|
||||
|
||||
void Init();
|
||||
|
||||
|
@@ -5,8 +5,12 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#define wxDD_CHANGE_DIR 0x0100
|
||||
#define wxDD_DIR_MUST_EXIST 0x0200
|
||||
#define wxDD_MULTIPLE 0x0400
|
||||
#define wxDD_SHOW_HIDDEN 0x0001
|
||||
|
||||
#define wxDD_NEW_DIR_BUTTON 0 // deprecated, on by default now,
|
||||
|
||||
#define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
||||
@@ -43,6 +47,13 @@ const char wxDirDialogNameStr[] = "wxDirCtrl";
|
||||
@style{wxDD_CHANGE_DIR}
|
||||
Change the current working directory to the directory chosen by the
|
||||
user.
|
||||
@note This flag cannot be used with the @c wxDD_MULTIPLE style.
|
||||
@style{wxDD_MULTIPLE}
|
||||
Allow the user to select multiple directories.
|
||||
This flag is only available since wxWidgets 3.1.4
|
||||
@style{wxDD_SHOW_HIDDEN}
|
||||
Show hidden and system folders.
|
||||
This flag is only available since wxWidgets 3.1.4
|
||||
@endStyleTable
|
||||
|
||||
Notice that @c wxRESIZE_BORDER has special side effect under Windows
|
||||
@@ -60,6 +71,11 @@ const char wxDirDialogNameStr[] = "wxDirCtrl";
|
||||
@endcode
|
||||
instead of just using @c wxDD_DIR_MUST_EXIST style alone.
|
||||
|
||||
@remarks MacOS 10.11+ does not display a title bar on the dialog. Use SetMessage()
|
||||
to change the string displayed to the user at the top of the dialog after creation.
|
||||
The SetTitle() method is provided for compatibility with pre-10.11 MacOS versions
|
||||
that do still support displaying the title bar.
|
||||
|
||||
@library{wxcore}
|
||||
@category{cmndlg}
|
||||
|
||||
@@ -106,9 +122,22 @@ public:
|
||||
|
||||
/**
|
||||
Returns the default or user-selected path.
|
||||
|
||||
@note This function can't be used with dialogs which have the @c wxDD_MULTIPLE style,
|
||||
use GetPaths() instead.
|
||||
*/
|
||||
virtual wxString GetPath() const;
|
||||
|
||||
/**
|
||||
Fills the array @a paths with the full paths of the chosen directories.
|
||||
|
||||
@note This function should only be used with the dialogs which have @c wxDD_MULTIPLE style,
|
||||
use GetPath() for the others.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
virtual void GetPaths(wxArrayString& paths) const;
|
||||
|
||||
/**
|
||||
Sets the message that will be displayed on the dialog.
|
||||
*/
|
||||
|
@@ -16,6 +16,12 @@
|
||||
class wxDisplay
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Default constructor creating wxDisplay object representing the primary
|
||||
display.
|
||||
*/
|
||||
wxDisplay();
|
||||
|
||||
/**
|
||||
Constructor, setting up a wxDisplay instance with the specified
|
||||
display.
|
||||
@@ -24,7 +30,7 @@ public:
|
||||
The index of the display to use. This must be non-negative and
|
||||
lower than the value returned by GetCount().
|
||||
*/
|
||||
wxDisplay(unsigned int index = 0);
|
||||
explicit wxDisplay(unsigned int index);
|
||||
|
||||
/**
|
||||
Constructor creating the display object associated with the given
|
||||
@@ -137,6 +143,46 @@ public:
|
||||
*/
|
||||
wxSize GetPPI() const;
|
||||
|
||||
/**
|
||||
Returns scaling factor used by this display.
|
||||
|
||||
The scaling factor is the ratio between GetPPI() and GetStdPPI()
|
||||
(it is implicitly assumed that this ratio is the same for both
|
||||
horizontal and vertical components).
|
||||
|
||||
@see wxWindow::GetContentScaleFactor(), wxWindow::GetDPIScaleFactor()
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
double GetScaleFactor() const;
|
||||
|
||||
/**
|
||||
Returns default display resolution for the current platform in pixels
|
||||
per inch.
|
||||
|
||||
This function mostly used internally, use GetPPI() to get the actual
|
||||
display resolution.
|
||||
|
||||
Currently the standard PPI is the same in both horizontal and vertical
|
||||
directions on all platforms and its value is 96 everywhere except under
|
||||
Apple devices (those running macOS, iOS, watchOS etc), where it is 72.
|
||||
|
||||
@see GetStdPPI()
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
static int GetStdPPIValue();
|
||||
|
||||
/**
|
||||
Returns default display resolution for the current platform as wxSize.
|
||||
|
||||
This function is equivalent to constructing wxSize object with both
|
||||
components set to GetStdPPIValue().
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
static wxSize GetStdPPI();
|
||||
|
||||
/**
|
||||
Returns @true if the display is the primary display. The primary
|
||||
display is the one whose index is 0.
|
||||
|
@@ -146,7 +146,7 @@ public:
|
||||
/**
|
||||
Sets the default action for drag and drop. Use wxDragMove or
|
||||
wxDragCopy to set default action to move or copy and use wxDragNone
|
||||
(default) to set default action specified by initialization of draging
|
||||
(default) to set default action specified by initialization of dragging
|
||||
(see wxDropSource::DoDragDrop())
|
||||
*/
|
||||
void SetDefaultAction(wxDragResult action);
|
||||
|
@@ -922,6 +922,8 @@ public:
|
||||
/**
|
||||
Closes the view by calling OnClose(). If @a deleteWindow is @true, this
|
||||
function should delete the window associated with the view.
|
||||
|
||||
@return @true if the view was closed
|
||||
*/
|
||||
virtual bool Close(bool deleteWindow = true);
|
||||
|
||||
@@ -971,6 +973,9 @@ public:
|
||||
example, if your views all share the same window, you need to
|
||||
disassociate the window from the view and perhaps clear the window. If
|
||||
@a deleteWindow is @true, delete the frame associated with the view.
|
||||
|
||||
Returning @false from this function prevents the view, and possibly the
|
||||
document, from being closed.
|
||||
*/
|
||||
virtual bool OnClose(bool deleteWindow);
|
||||
|
||||
@@ -1295,6 +1300,8 @@ public:
|
||||
Closes the document, by calling OnSaveModified() and then (if this
|
||||
returned @true) OnCloseDocument(). This does not normally delete the
|
||||
document object, use DeleteAllViews() to do this implicitly.
|
||||
|
||||
@return @true if the document was closed
|
||||
*/
|
||||
virtual bool Close();
|
||||
|
||||
@@ -1463,6 +1470,12 @@ public:
|
||||
Notice that previous wxWidgets versions used to call this function also
|
||||
from OnNewDocument(), rather counter-intuitively. This is no longer the
|
||||
case since wxWidgets 2.9.0.
|
||||
|
||||
Returning @false from this function prevents the document from closing.
|
||||
The default implementation does this if the document is modified and
|
||||
the user didn't confirm discarding the modifications to it.
|
||||
|
||||
Return @true to allow the document to be closed.
|
||||
*/
|
||||
virtual bool OnCloseDocument();
|
||||
|
||||
|
@@ -123,7 +123,7 @@ public:
|
||||
is included.
|
||||
|
||||
For example, on Windows @c ".dll" is returned, and either @c ".dylib"
|
||||
or @c ".bundle" on OS X.
|
||||
or @c ".bundle" on macOS.
|
||||
*/
|
||||
static wxString GetDllExt(wxDynamicLibraryCategory cat = wxDL_LIBRARY);
|
||||
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
Window position.
|
||||
If ::wxDefaultPosition is specified then a default position is chosen.
|
||||
@param size
|
||||
Window size.
|
||||
Window size.
|
||||
If ::wxDefaultSize is specified then the window is sized appropriately.
|
||||
@param style
|
||||
Window style. See wxEditableListBox.
|
||||
|
@@ -279,7 +279,7 @@ protected:
|
||||
/**
|
||||
@class wxEventBlocker
|
||||
|
||||
This class is a special event handler which allows to discard
|
||||
This class is a special event handler which allows discarding
|
||||
any event (or a set of event types) directed to a specific window.
|
||||
|
||||
Example:
|
||||
@@ -713,7 +713,7 @@ public:
|
||||
usage, it has no advantages compared to Bind().
|
||||
|
||||
This is an alternative to the use of static event tables. It is more
|
||||
flexible as it allows to connect events generated by some object to an
|
||||
flexible as it allows connecting events generated by some object to an
|
||||
event handler defined in a different object of a different class (which
|
||||
is impossible to do directly with the event tables -- the events can be
|
||||
only handled in another object if they are propagated upwards to it).
|
||||
@@ -758,7 +758,7 @@ public:
|
||||
@beginWxPerlOnly
|
||||
In wxPerl this function takes 4 arguments: @a id, @a lastid,
|
||||
@a type, @a method; if @a method is undef, the handler is
|
||||
disconnected.}
|
||||
disconnected.
|
||||
@endWxPerlOnly
|
||||
|
||||
@see Bind<>()
|
||||
@@ -1574,7 +1574,7 @@ public:
|
||||
Under GTK, the raw key code is the @c keyval field of the corresponding
|
||||
GDK event.
|
||||
|
||||
Under OS X, the raw key code is the @c keyCode field of the
|
||||
Under macOS, the raw key code is the @c keyCode field of the
|
||||
corresponding NSEvent.
|
||||
|
||||
@note Currently the raw key codes are not supported by all ports, use
|
||||
@@ -1594,7 +1594,7 @@ public:
|
||||
Under GTK, the raw flags contain the @c hardware_keycode field of the
|
||||
corresponding GDK event.
|
||||
|
||||
Under OS X, the raw flags contain the modifiers state.
|
||||
Under macOS, the raw flags contain the modifiers state.
|
||||
|
||||
@note Currently the raw key flags are not supported by all ports, use
|
||||
@ifdef_ wxHAS_RAW_KEY_CODES to determine if this feature is available.
|
||||
@@ -1867,7 +1867,7 @@ public:
|
||||
int GetPosition() const;
|
||||
|
||||
void SetOrientation(int orient);
|
||||
void SetPosition(int pos);
|
||||
void SetPosition(int pos);
|
||||
};
|
||||
|
||||
|
||||
@@ -2215,9 +2215,14 @@ class wxPaintEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Constructor.
|
||||
Constructor for exclusive use of wxWidgets itself.
|
||||
|
||||
Note that the objects of this class can @em not be created from
|
||||
application code, they're only created by the library itself. If you
|
||||
need a window to be repainted, use wxWindow::Refresh() instead of
|
||||
trying to manually create an event of this class.
|
||||
*/
|
||||
wxPaintEvent(int id = 0);
|
||||
explicit wxPaintEvent(wxWindow* window);
|
||||
};
|
||||
|
||||
|
||||
@@ -2369,6 +2374,26 @@ public:
|
||||
*/
|
||||
bool GetEnabled() const;
|
||||
|
||||
/**
|
||||
Returns @true if the UI element can be checked.
|
||||
|
||||
For the event handlers that can be used for multiple items, not all of
|
||||
which can be checked, this method can be useful to determine whether
|
||||
to call Check() on the event object or not, i.e. the main use case for
|
||||
this method is:
|
||||
@code
|
||||
void MyWindow::OnUpdateUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
....
|
||||
if ( event.IsCheckable() )
|
||||
event.Check(...some condition...);
|
||||
}
|
||||
@endcode
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
bool IsCheckable() const;
|
||||
|
||||
/**
|
||||
Static function returning a value specifying how wxWidgets will send update
|
||||
events: to all windows, or only to those which specify that they will process
|
||||
@@ -2477,8 +2502,8 @@ public:
|
||||
@c wxEVT_TEXT_CUT and @c wxEVT_TEXT_PASTE.
|
||||
|
||||
If any of these events is processed (without being skipped) by an event
|
||||
handler, the corresponding operation doesn't take place which allows to
|
||||
prevent the text from being copied from or pasted to a control. It is also
|
||||
handler, the corresponding operation doesn't take place which allows
|
||||
preventing the text from being copied from or pasted to a control. It is also
|
||||
possible to examine the clipboard contents in the PASTE event handler and
|
||||
transform it in some way before inserting in a control -- for example,
|
||||
changing its case or removing invalid characters.
|
||||
@@ -2779,7 +2804,7 @@ public:
|
||||
(or zoom in), a negative value means we should shrink (or zoom out).
|
||||
|
||||
This method is only valid to call for @c wxEVT_MAGNIFY events which are
|
||||
currently only generated under OS X.
|
||||
currently only generated under macOS.
|
||||
|
||||
@see Magnify()
|
||||
|
||||
@@ -2795,6 +2820,22 @@ public:
|
||||
*/
|
||||
int GetWheelDelta() const;
|
||||
|
||||
/**
|
||||
On Mac, has the user selected "Natural" scrolling in their System
|
||||
Preferences? Currently false on all other OS's.
|
||||
|
||||
"Natural" scrolling means that content scrolling happens in the
|
||||
opposite direction, and if you are indeed scrolling content then
|
||||
you don't need to use this function because macOS has already
|
||||
inverted the scroll direction.
|
||||
But there can be special situations where you want the mouse wheel
|
||||
action to work always in the same direction and in that case you
|
||||
will need this function.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
bool IsWheelInverted() const;
|
||||
|
||||
/**
|
||||
Get wheel rotation, positive or negative indicates direction of rotation.
|
||||
|
||||
@@ -2856,7 +2897,7 @@ public:
|
||||
/**
|
||||
Returns @true if the event is a magnify (i.e.\ pinch to zoom) event.
|
||||
|
||||
Such events are currently generated only under OS X.
|
||||
Such events are currently generated only under macOS.
|
||||
|
||||
@see GetMagnification()
|
||||
|
||||
@@ -3023,7 +3064,7 @@ public:
|
||||
bool GetActive() const;
|
||||
|
||||
/**
|
||||
Allows to check if the window was activated by clicking it with the
|
||||
Allows checking if the window was activated by clicking it with the
|
||||
mouse or in some other way.
|
||||
|
||||
This method is currently only implemented in wxMSW and returns @c
|
||||
@@ -3275,7 +3316,25 @@ public:
|
||||
wxMouseCaptureLostEvent(wxWindowID windowId = 0);
|
||||
};
|
||||
|
||||
/**
|
||||
@class wxDisplayChangedEvent
|
||||
|
||||
A display changed event is sent to top-level windows when the display resolution has changed.
|
||||
|
||||
This event is currently emitted under Windows only.
|
||||
|
||||
@beginEventTable{wxDisplayChangedEvent}
|
||||
@event{EVT_DISPLAY_CHANGED(func)}
|
||||
Process a @c wxEVT_DISPLAY_CHANGED event.
|
||||
@endEventTable
|
||||
|
||||
@onlyfor{wxmsw}
|
||||
|
||||
@library{wxcore}
|
||||
@category{events}
|
||||
|
||||
@see wxDisplay
|
||||
*/
|
||||
|
||||
class wxDisplayChangedEvent : public wxEvent
|
||||
{
|
||||
@@ -3284,6 +3343,58 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxDPIChangedEvent
|
||||
|
||||
Event sent when the display scale factor or pixel density (measured in
|
||||
dots-per-inch, or DPI) of the monitor a window is on changes.
|
||||
|
||||
The event is sent to each wxTopLevelWindow affected by the change, and all
|
||||
its children recursively (post-order traversal). For example, this event is
|
||||
sent to the window when it is moved, by the user, from a display using some
|
||||
DPI value to another display using a different DPI value. It also sent to
|
||||
all program windows on the given display if its DPI changes due to a change
|
||||
in the system settings.
|
||||
|
||||
Currently this event is generated by wxMSW port if only and only if the
|
||||
MSW application runs under Windows 10 Creators Update (v1703) or later and
|
||||
is marked as being "per-monitor DPI aware", i.e. contains a @c dpiAwareness
|
||||
tag with the value "PerMonitorV2" in its manifest (see Microsoft
|
||||
<a href="https://docs.microsoft.com/en-us/windows/desktop/sbscs/application-manifests">"Application Manifests" documentation</a>
|
||||
for more details).
|
||||
|
||||
@note Per-monitor DPI support is an experimental feature that is still in
|
||||
development. It might not work correctly for some controls.
|
||||
|
||||
@beginEventTable{wxDPIChangedEvent}
|
||||
@event{EVT_DPI_CHANGED(func)}
|
||||
Process a @c wxEVT_DPI_CHANGED event.
|
||||
@endEventTable
|
||||
|
||||
@since 3.1.3
|
||||
|
||||
@library{wxcore}
|
||||
@category{events}
|
||||
|
||||
@see @ref overview_events
|
||||
*/
|
||||
class wxDPIChangedEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Returns the old DPI.
|
||||
*/
|
||||
wxSize GetOldDPI() const;
|
||||
|
||||
/**
|
||||
Returns the new DPI.
|
||||
*/
|
||||
wxSize GetNewDPI() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxPaletteChangedEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
@@ -3298,7 +3409,7 @@ class wxQueryNewPaletteEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
wxQueryNewPaletteEvent(wxWindowID winid = 0);
|
||||
|
||||
|
||||
void SetPaletteRealized(bool realized);
|
||||
bool GetPaletteRealized();
|
||||
};
|
||||
@@ -3571,7 +3682,7 @@ public:
|
||||
event does not happen).
|
||||
|
||||
In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished
|
||||
independently of the way it had started. Please see the widgets sample ("Slider" page)
|
||||
independently of the way it had started. Please see the @ref page_samples_widgets ("Slider" page)
|
||||
to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.
|
||||
|
||||
@remarks
|
||||
@@ -3653,9 +3764,9 @@ public:
|
||||
*/
|
||||
int GetPosition() const;
|
||||
|
||||
|
||||
|
||||
void SetOrientation(int orient);
|
||||
void SetPosition(int pos);
|
||||
void SetPosition(int pos);
|
||||
};
|
||||
|
||||
|
||||
@@ -4179,7 +4290,7 @@ public:
|
||||
|
||||
/**
|
||||
Sets the flags for this event.
|
||||
The @a flags can be a combination of the
|
||||
The @a flags can be a combination of the
|
||||
wxNavigationKeyEvent::wxNavigationKeyEventFlags values.
|
||||
*/
|
||||
void SetFlags(long flags);
|
||||
@@ -4411,12 +4522,16 @@ public:
|
||||
wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0, wxMenu* menu = NULL);
|
||||
|
||||
/**
|
||||
Returns the menu which is being opened or closed.
|
||||
Returns the menu which is being opened or closed, or the menu containing
|
||||
the highlighted item.
|
||||
|
||||
This method can only be used with the @c OPEN and @c CLOSE events.
|
||||
Note that the returned value can be @NULL if the menu being opened
|
||||
doesn't have a corresponding wxMenu, e.g. this happens when opening the
|
||||
system menu in wxMSW port.
|
||||
|
||||
The returned value is never @NULL in the ports implementing this
|
||||
function, which currently includes all the major ones.
|
||||
@remarks Since 3.1.3 this function can be used with @c OPEN, @c CLOSE
|
||||
and @c HIGHLIGHT events. Before 3.1.3, this method can only be used
|
||||
with the @c OPEN and @c CLOSE events.
|
||||
*/
|
||||
wxMenu* GetMenu() const;
|
||||
|
||||
@@ -4445,8 +4560,6 @@ public:
|
||||
Notice that the event is not triggered when the application is iconized
|
||||
(minimized) or restored under wxMSW.
|
||||
|
||||
@onlyfor{wxmsw,wxgtk}
|
||||
|
||||
@beginEventTable{wxShowEvent}
|
||||
@event{EVT_SHOW(func)}
|
||||
Process a @c wxEVT_SHOW event.
|
||||
@@ -4527,9 +4640,11 @@ public:
|
||||
/**
|
||||
@class wxMoveEvent
|
||||
|
||||
A move event holds information about wxTopLevelWindow move change events.
|
||||
A move event holds information about window position change.
|
||||
|
||||
These events are currently only generated by wxMSW port.
|
||||
These events are currently generated for top level (see wxTopLevelWindow)
|
||||
windows in all ports, but are not generated for the child windows in
|
||||
wxGTK.
|
||||
|
||||
@beginEventTable{wxMoveEvent}
|
||||
@event{EVT_MOVE(func)}
|
||||
@@ -4565,7 +4680,7 @@ public:
|
||||
|
||||
wxRect GetRect() const;
|
||||
void SetRect(const wxRect& rect);
|
||||
void SetPosition(const wxPoint& pos);
|
||||
void SetPosition(const wxPoint& pos);
|
||||
};
|
||||
|
||||
|
||||
@@ -4589,7 +4704,7 @@ public:
|
||||
@b Important : Sizers ( see @ref overview_sizer ) rely on size events to function
|
||||
correctly. Therefore, in a sizer-based layout, do not forget to call Skip on all
|
||||
size events you catch (and don't catch size events at all when you don't need to).
|
||||
|
||||
|
||||
@beginEventTable{wxSizeEvent}
|
||||
@event{EVT_SIZE(func)}
|
||||
Process a @c wxEVT_SIZE event.
|
||||
@@ -4737,8 +4852,7 @@ wxEventType wxNewEventType();
|
||||
|
||||
@see wxDECLARE_EVENT(), @ref overview_events_custom
|
||||
*/
|
||||
#define wxDEFINE_EVENT(name, cls) \
|
||||
const wxEventTypeTag< cls > name(wxNewEventType())
|
||||
#define wxDEFINE_EVENT(name, cls)
|
||||
|
||||
/**
|
||||
Declares a custom event type.
|
||||
@@ -4758,8 +4872,7 @@ wxEventType wxNewEventType();
|
||||
wxDECLARE_EVENT(MY_CUSTOM_EVENT, MyCustomEvent);
|
||||
@endcode
|
||||
*/
|
||||
#define wxDECLARE_EVENT(name, cls) \
|
||||
wxDECLARE_EXPORTED_EVENT(wxEMPTY_PARAMETER_VALUE, name, cls)
|
||||
#define wxDECLARE_EVENT(name, cls)
|
||||
|
||||
/**
|
||||
Variant of wxDECLARE_EVENT() used for event types defined inside a shared
|
||||
@@ -4767,11 +4880,10 @@ wxEventType wxNewEventType();
|
||||
|
||||
This is mostly used by wxWidgets internally, e.g.
|
||||
@code
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent)
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent);
|
||||
@endcode
|
||||
*/
|
||||
#define wxDECLARE_EXPORTED_EVENT( expdecl, name, cls ) \
|
||||
extern const expdecl wxEventTypeTag< cls > name;
|
||||
#define wxDECLARE_EXPORTED_EVENT( expdecl, name, cls )
|
||||
|
||||
/**
|
||||
Helper macro for definition of custom event table macros.
|
||||
@@ -4785,7 +4897,7 @@ wxEventType wxNewEventType();
|
||||
|
||||
@see @ref overview_events_custom_ownclass
|
||||
*/
|
||||
#define wxEVENT_HANDLER_CAST(functype, func) (&func)
|
||||
#define wxEVENT_HANDLER_CAST(functype, func)
|
||||
|
||||
/**
|
||||
This macro is used to define event table macros for handling custom
|
||||
@@ -4819,8 +4931,7 @@ wxEventType wxNewEventType();
|
||||
@param fn
|
||||
The event handler method.
|
||||
*/
|
||||
#define wx__DECLARE_EVT1(evt, id, fn) \
|
||||
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
|
||||
#define wx__DECLARE_EVT1(evt, id, fn)
|
||||
|
||||
/**
|
||||
Generalized version of the wx__DECLARE_EVT1() macro taking a range of
|
||||
@@ -4828,16 +4939,14 @@ wxEventType wxNewEventType();
|
||||
Argument @a id1 is the first identifier of the range, @a id2 is the
|
||||
second identifier of the range.
|
||||
*/
|
||||
#define wx__DECLARE_EVT2(evt, id1, id2, fn) \
|
||||
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
|
||||
#define wx__DECLARE_EVT2(evt, id1, id2, fn)
|
||||
|
||||
/**
|
||||
Simplified version of the wx__DECLARE_EVT1() macro, to be used when the
|
||||
event type must be handled regardless of the ID associated with the
|
||||
specific event instances.
|
||||
*/
|
||||
#define wx__DECLARE_EVT0(evt, fn) \
|
||||
wx__DECLARE_EVT1(evt, wxID_ANY, fn)
|
||||
#define wx__DECLARE_EVT0(evt, fn)
|
||||
|
||||
/**
|
||||
Use this macro inside a class declaration to declare a @e static event table
|
||||
@@ -4846,7 +4955,7 @@ wxEventType wxNewEventType();
|
||||
In the implementation file you'll need to use the wxBEGIN_EVENT_TABLE()
|
||||
and the wxEND_EVENT_TABLE() macros, plus some additional @c EVT_xxx macro
|
||||
to capture events.
|
||||
|
||||
|
||||
Note that this macro requires a final semicolon.
|
||||
|
||||
@see @ref overview_events_eventtables
|
||||
@@ -5005,6 +5114,7 @@ wxEventType wxEVT_MENU_HIGHLIGHT;
|
||||
wxEventType wxEVT_CONTEXT_MENU;
|
||||
wxEventType wxEVT_SYS_COLOUR_CHANGED;
|
||||
wxEventType wxEVT_DISPLAY_CHANGED;
|
||||
wxEventType wxEVT_DPI_CHANGED;
|
||||
wxEventType wxEVT_QUERY_NEW_PALETTE;
|
||||
wxEventType wxEVT_PALETTE_CHANGED;
|
||||
wxEventType wxEVT_JOY_BUTTON_DOWN;
|
||||
|
@@ -13,8 +13,8 @@
|
||||
|
||||
This is a very simple class which just provides FilterEvent() virtual
|
||||
method to be called by wxEvtHandler before starting process of any event.
|
||||
Thus, inheriting from this class and overriding FilterEvent() allows to
|
||||
capture and possibly handle or ignore all the events happening in the
|
||||
Thus, inheriting from this class and overriding FilterEvent() allows
|
||||
capturing and possibly handling or ignoring all the events happening in the
|
||||
program. Of course, having event filters adds additional overhead to every
|
||||
event processing and so should not be used lightly and your FilterEvent()
|
||||
code should try to return as quickly as possible, especially for the events
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
An example of using this class:
|
||||
@code
|
||||
// This class allows to determine the last time the user has worked with
|
||||
// This class allows determining the last time the user has worked with
|
||||
// this application:
|
||||
class LastActivityTimeDetector : public wxEventFilter
|
||||
{
|
||||
@@ -72,8 +72,8 @@
|
||||
filter during its creation so you may also override FilterEvent() method in
|
||||
your wxApp-derived class and, in fact, this is often the most convenient
|
||||
way to do it. However creating a new class deriving directly from
|
||||
wxEventFilter allows to isolate the event filtering code in its own
|
||||
separate class and also to have several independent filters, if necessary.
|
||||
wxEventFilter allows isolating the event filtering code in its own
|
||||
separate class and also having several independent filters, if necessary.
|
||||
|
||||
@category{events}
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
/**
|
||||
Override this method to implement event pre-processing.
|
||||
|
||||
This method allows to filter all the events processed by the program,
|
||||
This method allows filtering all the events processed by the program,
|
||||
so you should try to return quickly from it to avoid slowing down the
|
||||
program to a crawl.
|
||||
|
||||
|
@@ -189,7 +189,7 @@ public:
|
||||
/**
|
||||
Makes sure that idle events are sent again.
|
||||
*/
|
||||
virtual void WakeUpIdle();
|
||||
void WakeUpIdle();
|
||||
|
||||
/**
|
||||
This virtual function is called when the application becomes idle and
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
@class wxGUIEventLoop
|
||||
|
||||
A generic implementation of the GUI event loop.
|
||||
|
||||
|
||||
@library{wxbase}
|
||||
@category{appmanagement}
|
||||
*/
|
||||
|
@@ -1,11 +1,151 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ffile.h
|
||||
// Purpose: interface of wxFFile
|
||||
// Purpose: interface of wxTempFFile, wxFFile
|
||||
// Author: wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/**
|
||||
@class wxTempFFile
|
||||
|
||||
wxTempFFile provides a relatively safe way to replace the contents of the
|
||||
existing file. The name is explained by the fact that it may be also used as
|
||||
just a temporary file if you don't replace the old file contents.
|
||||
|
||||
Usually, when a program replaces the contents of some file it first opens it for
|
||||
writing, thus losing all of the old data and then starts recreating it.
|
||||
This approach is not very safe because during the regeneration of the file bad
|
||||
things may happen: the program may find that there is an internal error preventing
|
||||
it from completing file generation, the user may interrupt it (especially if file
|
||||
generation takes long time) and, finally, any other external interrupts (power
|
||||
supply failure or a disk error) will leave you without either the original file
|
||||
or the new one.
|
||||
|
||||
wxTempFFile addresses this problem by creating a temporary file which is meant to
|
||||
replace the original file - but only after it is fully written. So, if the user
|
||||
interrupts the program during the file generation, the old file won't be lost.
|
||||
Also, if the program discovers itself that it doesn't want to replace the old
|
||||
file there is no problem - in fact, wxTempFFile will @b not replace the old
|
||||
file by default, you should explicitly call wxTempFFile::Commit() to do it.
|
||||
Calling wxTempFFile::Discard() explicitly discards any modifications: it
|
||||
closes and deletes the temporary file and leaves the original file unchanged.
|
||||
If you call neither Commit() nor Discard(), the destructor will
|
||||
call Discard() automatically.
|
||||
|
||||
To summarize: if you want to replace another file, create an instance of
|
||||
wxTempFFile passing the name of the file to be replaced to the constructor.
|
||||
(You may also use default constructor and pass the file name to wxTempFFile::Open.)
|
||||
Then you can write to wxTempFFile using wxFFile-like functions and later call
|
||||
wxTempFFile::Commit() to replace the old file (and close this one) or call
|
||||
wxTempFFile::Discard() to cancel the modifications.
|
||||
|
||||
@since 3.1.4
|
||||
|
||||
@library{wxbase}
|
||||
@category{file}
|
||||
*/
|
||||
class wxTempFFile
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Default constructor doesn't do anything.
|
||||
|
||||
Call Open() later.
|
||||
*/
|
||||
wxTempFFile();
|
||||
|
||||
/**
|
||||
Associates wxTempFFile with the file to be replaced and opens it.
|
||||
|
||||
@warning
|
||||
You should use IsOpened() to verify that the constructor succeeded.
|
||||
*/
|
||||
explicit wxTempFFile(const wxString& strName);
|
||||
|
||||
/**
|
||||
Destructor calls Discard() if temporary file is still open.
|
||||
*/
|
||||
~wxTempFFile();
|
||||
|
||||
/**
|
||||
Validate changes: deletes the old file of name m_strName and renames the new
|
||||
file to the old name. Returns @true if both actions succeeded.
|
||||
|
||||
If @false is returned it may unfortunately mean two quite different things:
|
||||
either that the old file couldn't be deleted or that the new file
|
||||
couldn't be renamed to the old name.
|
||||
*/
|
||||
bool Commit();
|
||||
|
||||
/**
|
||||
Discard changes: the old file contents are not changed, the temporary
|
||||
file is deleted.
|
||||
*/
|
||||
void Discard();
|
||||
|
||||
/**
|
||||
Flush the data written to the file to disk.
|
||||
|
||||
This simply calls wxFFile::Flush() for the underlying file and may be
|
||||
necessary with file systems such as XFS and Ext4 under Linux. Calling
|
||||
this function may however have serious performance implications and
|
||||
also is not necessary with many other file systems so it is not done by
|
||||
default -- but you can call it before calling Commit() to absolutely
|
||||
ensure that the data was indeed written to the disk correctly.
|
||||
*/
|
||||
bool Flush();
|
||||
|
||||
/**
|
||||
Returns @true if the file was successfully opened.
|
||||
*/
|
||||
bool IsOpened() const;
|
||||
|
||||
/**
|
||||
Returns the length of the file.
|
||||
|
||||
Returns ::wxInvalidOffset if the length couldn't be determined.
|
||||
|
||||
Please also note that there is @e no guarantee that reading that many
|
||||
bytes from the file will always succeed. While this is true for regular
|
||||
files (unless the file size has been changed by another process in
|
||||
between Length() and Read() calls), some special files, such as most
|
||||
files under @c /sys or @c /proc directories under Linux, don't actually
|
||||
contain as much data as their size indicates.
|
||||
*/
|
||||
wxFileOffset Length() const;
|
||||
|
||||
/**
|
||||
Open the temporary file, returns @true on success, @false if an error
|
||||
occurred.
|
||||
@a strName is the name of file to be replaced. The temporary file is always
|
||||
created in the directory where @a strName is. In particular, if @a strName
|
||||
doesn't include the path, it is created in the current directory and the
|
||||
program should have write access to it for the function to succeed.
|
||||
*/
|
||||
bool Open(const wxString& strName);
|
||||
|
||||
/**
|
||||
Seeks to the specified position and returns @true on success.
|
||||
*/
|
||||
bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
|
||||
|
||||
/**
|
||||
Returns the current position.
|
||||
*/
|
||||
wxFileOffset Tell() const;
|
||||
|
||||
/**
|
||||
Writes the contents of the string to the file, returns @true on success.
|
||||
|
||||
The second argument is only meaningful in Unicode build of wxWidgets when
|
||||
@a conv is used to convert @a str to multibyte representation.
|
||||
*/
|
||||
bool Write(const wxString& str, const wxMBConv& conv = wxMBConvUTF8());
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxFFile
|
||||
|
||||
|
@@ -46,13 +46,20 @@
|
||||
class wxTempFile
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Default constructor doesn't do anything.
|
||||
|
||||
Call Open() later.
|
||||
*/
|
||||
wxTempFile();
|
||||
|
||||
/**
|
||||
Associates wxTempFile with the file to be replaced and opens it.
|
||||
|
||||
@warning
|
||||
You should use IsOpened() to verify that the constructor succeeded.
|
||||
*/
|
||||
wxTempFile(const wxString& strName);
|
||||
explicit wxTempFile(const wxString& strName);
|
||||
|
||||
/**
|
||||
Destructor calls Discard() if temporary file is still open.
|
||||
@@ -450,7 +457,7 @@ public:
|
||||
to write data with embedded @c NULs to the file you should use the other
|
||||
Write() overload.
|
||||
*/
|
||||
bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8);
|
||||
bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto());
|
||||
|
||||
/**
|
||||
Returns the file descriptor associated with the file.
|
||||
|
@@ -96,7 +96,30 @@ public:
|
||||
virtual bool Save(wxOutputStream& os, const wxMBConv& conv = wxConvAuto());
|
||||
|
||||
/**
|
||||
Allows to set the mode to be used for the config file creation. For example, to
|
||||
Enables saving data to the disk file when this object is destroyed.
|
||||
|
||||
This is the default behaviour and this function doesn't need to be
|
||||
called explicitly unless DisableAutoSave() had been previously called.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void EnableAutoSave();
|
||||
|
||||
/**
|
||||
Prevent this object from saving data to the disk file when it is
|
||||
destroyed.
|
||||
|
||||
By default, changes to this object are only saved permanently when
|
||||
Flush() is explicitly called or when it is destroyed. If this method is
|
||||
called, Flush() won't be called automatically from the destructor,
|
||||
meaning that any non-explicitly-flushed changes will be lost.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void DisableAutoSave();
|
||||
|
||||
/**
|
||||
Allows setting the mode to be used for the config file creation. For example, to
|
||||
create a config file which is not readable by other users (useful if it stores
|
||||
some sensitive information, such as passwords), you could use @c SetUmask(0077).
|
||||
|
||||
@@ -105,7 +128,7 @@ public:
|
||||
@see wxCHANGE_UMASK()
|
||||
*/
|
||||
void SetUmask(int mode);
|
||||
|
||||
|
||||
// implement inherited pure virtual functions
|
||||
virtual void SetPath(const wxString& strPath);
|
||||
virtual const wxString& GetPath() const;
|
||||
|
@@ -14,7 +14,8 @@ enum
|
||||
wxFD_FILE_MUST_EXIST = 0x0010,
|
||||
wxFD_CHANGE_DIR = 0x0080,
|
||||
wxFD_PREVIEW = 0x0100,
|
||||
wxFD_MULTIPLE = 0x0200
|
||||
wxFD_MULTIPLE = 0x0200,
|
||||
wxFD_SHOW_HIDDEN = 0x0400
|
||||
};
|
||||
|
||||
#define wxFD_DEFAULT_STYLE wxFD_OPEN
|
||||
@@ -48,14 +49,14 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
return;
|
||||
//else: proceed asking to the user the new file to open
|
||||
}
|
||||
|
||||
wxFileDialog
|
||||
|
||||
wxFileDialog
|
||||
openFileDialog(this, _("Open XYZ file"), "", "",
|
||||
"XYZ files (*.xyz)|*.xyz", wxFD_OPEN|wxFD_FILE_MUST_EXIST);
|
||||
|
||||
if (openFileDialog.ShowModal() == wxID_CANCEL)
|
||||
return; // the user changed idea...
|
||||
|
||||
|
||||
// proceed loading the file chosen by the user;
|
||||
// this can be done with e.g. wxWidgets input streams:
|
||||
wxFileInputStream input_stream(openFileDialog.GetPath());
|
||||
@@ -64,22 +65,22 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
wxLogError("Cannot open file '%s'.", openFileDialog.GetPath());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
...
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
The typical usage for the save file dialog is instead somewhat simpler:
|
||||
@code
|
||||
void MyFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxFileDialog
|
||||
wxFileDialog
|
||||
saveFileDialog(this, _("Save XYZ file"), "", "",
|
||||
"XYZ files (*.xyz)|*.xyz", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
|
||||
|
||||
if (saveFileDialog.ShowModal() == wxID_CANCEL)
|
||||
return; // the user changed idea...
|
||||
|
||||
|
||||
// save the current contents in the file;
|
||||
// this can be done with e.g. wxWidgets output streams:
|
||||
wxFileOutputStream output_stream(saveFileDialog.GetPath());
|
||||
@@ -88,7 +89,7 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
wxLogError("Cannot save current contents in file '%s'.", saveFileDialog.GetPath());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
...
|
||||
}
|
||||
@endcode
|
||||
@@ -107,6 +108,18 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
descriptive test; "BMP files (*.bmp)|*.bmp" is displayed as "*.bmp", and both
|
||||
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" and "Image files|*.bmp;*.gif"
|
||||
are errors.
|
||||
On Mac macOS in the open file dialog the filter choice box is not shown by default.
|
||||
Instead all given wildcards are appplied at the same time: So in the above
|
||||
example all bmp, gif and png files are displayed. To enforce the
|
||||
display of the filter choice set the corresponding wxSystemOptions before calling
|
||||
the file open dialog:
|
||||
@code
|
||||
wxSystemOptions::SetOption(wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES, 1)
|
||||
@endcode
|
||||
But in contrast to Windows and Unix, where the file type choice filters only
|
||||
the selected files, on Mac macOS even in this case the dialog shows all files
|
||||
matching all file types. The files which does not match the currently selected
|
||||
file type are greyed out and are not selectable.
|
||||
|
||||
@beginStyleTable
|
||||
@style{wxFD_DEFAULT_STYLE}
|
||||
@@ -120,27 +133,31 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
@style{wxFD_OVERWRITE_PROMPT}
|
||||
For save dialog only: prompt for a confirmation if a file will be
|
||||
overwritten.
|
||||
This style is always enabled on wxOSX and cannot be disabled.
|
||||
@style{wxFD_NO_FOLLOW}
|
||||
Directs the dialog to return the path and file name of the selected
|
||||
shortcut file, not its target as it does by default. Currently this
|
||||
flag is only implemented in wxMSW and the non-dereferenced link path
|
||||
flag is only implemented in wxMSW and wxOSX (where it prevents
|
||||
aliases from being resolved). The non-dereferenced link path
|
||||
is always returned, even without this flag, under Unix and so using
|
||||
it there doesn't do anything. This flag was added in wxWidgets
|
||||
3.1.0.
|
||||
@style{wxFD_FILE_MUST_EXIST}
|
||||
For open dialog only: the user may only select files that actually
|
||||
exist. Notice that under OS X the file dialog with @c wxFD_OPEN
|
||||
exist. Notice that under macOS the file dialog with @c wxFD_OPEN
|
||||
style always behaves as if this style was specified, because it is
|
||||
impossible to choose a file that doesn't exist from a standard OS X
|
||||
impossible to choose a file that doesn't exist from a standard macOS
|
||||
file dialog.
|
||||
@style{wxFD_MULTIPLE}
|
||||
For open dialog only: allows selecting multiple files.
|
||||
@style{wxFD_CHANGE_DIR}
|
||||
Change the current working directory (when the dialog is dismissed)
|
||||
Change the current working directory (when the dialog is dismissed)
|
||||
to the directory where the file(s) chosen by the user are.
|
||||
@style{wxFD_PREVIEW}
|
||||
Show the preview of the selected files (currently only supported by
|
||||
wxGTK).
|
||||
@style{wxFD_SHOW_HIDDEN}
|
||||
Show hidden files. This flag was added in wxWidgets 3.1.3
|
||||
@endStyleTable
|
||||
|
||||
@library{wxcore}
|
||||
@@ -210,6 +227,29 @@ public:
|
||||
*/
|
||||
virtual wxString GetCurrentlySelectedFilename() const;
|
||||
|
||||
/**
|
||||
Returns the file type filter index currently selected in dialog.
|
||||
|
||||
Notice that this file type filter is not necessarily going to be the
|
||||
one finally accepted by the user, so calling this function mostly makes
|
||||
sense from an update UI event handler of a custom file dialog extra
|
||||
control to update its state depending on the currently selected file
|
||||
type filter.
|
||||
|
||||
Currently this function is fully implemented only under MSW and
|
||||
always returns @c wxNOT_FOUND elsewhere.
|
||||
|
||||
@since 3.1.3
|
||||
|
||||
@return The 0-based index of the currently selected file type filter or
|
||||
wxNOT_FOUND if nothing is selected.
|
||||
|
||||
@see SetExtraControlCreator()
|
||||
@see GetFilterIndex()
|
||||
@see SetFilterIndex()
|
||||
*/
|
||||
virtual int GetCurrentlySelectedFilterIndex () const;
|
||||
|
||||
/**
|
||||
Returns the default directory.
|
||||
*/
|
||||
@@ -225,6 +265,9 @@ public:
|
||||
|
||||
/**
|
||||
Returns the default filename.
|
||||
|
||||
@note This function can't be used with dialogs which have the @c wxFD_MULTIPLE style,
|
||||
use GetFilenames() instead.
|
||||
*/
|
||||
virtual wxString GetFilename() const;
|
||||
|
||||
@@ -259,6 +302,9 @@ public:
|
||||
|
||||
/**
|
||||
Returns the full path (directory and filename) of the selected file.
|
||||
|
||||
@note This function can't be used with dialogs which have the @c wxFD_MULTIPLE style,
|
||||
use GetPaths() instead.
|
||||
*/
|
||||
virtual wxString GetPath() const;
|
||||
|
||||
@@ -302,7 +348,7 @@ public:
|
||||
|
||||
/**
|
||||
Sets the default filename.
|
||||
|
||||
|
||||
In wxGTK this will have little effect unless a default directory has previously been set.
|
||||
*/
|
||||
virtual void SetFilename(const wxString& setfilename);
|
||||
@@ -399,7 +445,9 @@ wxString wxFileSelector(const wxString& message,
|
||||
int y = wxDefaultCoord);
|
||||
|
||||
/**
|
||||
An extended version of wxFileSelector
|
||||
An extended version of wxFileSelector()
|
||||
|
||||
@header{wx/filedlg.h}
|
||||
*/
|
||||
wxString wxFileSelectorEx(const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& default_path = wxEmptyString,
|
||||
@@ -412,7 +460,11 @@ wxString wxFileSelectorEx(const wxString& message = wxFileSelectorPromptStr,
|
||||
int y = wxDefaultCoord);
|
||||
|
||||
/**
|
||||
Ask for filename to load
|
||||
Shows a file dialog asking the user for a file name for opening a file.
|
||||
|
||||
@see wxFileSelector(), wxFileDialog
|
||||
|
||||
@header{wx/filedlg.h}
|
||||
*/
|
||||
wxString wxLoadFileSelector(const wxString& what,
|
||||
const wxString& extension,
|
||||
@@ -420,7 +472,11 @@ wxString wxLoadFileSelector(const wxString& what,
|
||||
wxWindow *parent = NULL);
|
||||
|
||||
/**
|
||||
Ask for filename to save
|
||||
Shows a file dialog asking the user for a file name for saving a file.
|
||||
|
||||
@see wxFileSelector(), wxFileDialog
|
||||
|
||||
@header{wx/filedlg.h}
|
||||
*/
|
||||
wxString wxSaveFileSelector(const wxString& what,
|
||||
const wxString& extension,
|
||||
|
@@ -193,7 +193,7 @@ wxULongLong wxInvalidSize;
|
||||
invalid state and wxFileName::IsOk() returns false for it.
|
||||
|
||||
File names can be case-sensitive or not, the function wxFileName::IsCaseSensitive()
|
||||
allows to determine this. The rules for determining whether the file name is
|
||||
allows determining this. The rules for determining whether the file name is
|
||||
absolute or relative also depend on the file name format and the only portable way
|
||||
to answer this question is to use wxFileName::IsAbsolute() or wxFileName::IsRelative()
|
||||
method.
|
||||
@@ -517,7 +517,7 @@ public:
|
||||
|
||||
By default, all operations in this class work on the target of a
|
||||
symbolic link (symlink) if the path of the file is actually a symlink.
|
||||
Using this method allows to turn off this "symlink following" behaviour
|
||||
Using this method allows turning off this "symlink following" behaviour
|
||||
and apply the operations to this path itself, even if it is a symlink.
|
||||
|
||||
The following methods are currently affected by this option:
|
||||
@@ -1246,6 +1246,25 @@ public:
|
||||
*/
|
||||
bool SetPermissions(int permissions);
|
||||
|
||||
/**
|
||||
Converts URL into a well-formed filename.
|
||||
The URL must use the @c file protocol.
|
||||
If the URL does not use @c file protocol
|
||||
wxFileName object may not be good or may not exist
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
static wxFileName URLToFileName(const wxString& url);
|
||||
|
||||
/**
|
||||
Converts wxFileName into an URL.
|
||||
|
||||
@see URLToFileName(), wxFileName
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
static wxString FileNameToURL(const wxFileName& filename);
|
||||
|
||||
/**
|
||||
Sets the file creation and last access/modification times (any of the pointers
|
||||
may be @NULL).
|
||||
|
@@ -83,7 +83,7 @@ class wxFilePickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxFilePickerCtrl();
|
||||
|
||||
|
||||
/**
|
||||
Initializes the object and calls Create() with
|
||||
all the parameters.
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
automatically synchronized with button's value. Use functions
|
||||
defined in wxPickerBase to modify the text control.
|
||||
@style{wxDIRP_DIR_MUST_EXIST}
|
||||
Creates a picker which allows to select only existing directories in
|
||||
Creates a picker which allows selecting only existing directories in
|
||||
the popup wxDirDialog. Notice that, as with @c wxFLP_FILE_MUST_EXIST,
|
||||
it is still possible to enter a non-existent directory even when
|
||||
this file is specified if @c wxDIRP_USE_TEXTCTRL style is also used.
|
||||
@@ -237,7 +237,7 @@ class wxDirPickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxDirPickerCtrl();
|
||||
|
||||
|
||||
/**
|
||||
Initializes the object and calls Create() with
|
||||
all the parameters.
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
Remove a filesystem handler from the list of handlers.
|
||||
*/
|
||||
static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler);
|
||||
|
||||
|
||||
/**
|
||||
Sets the current location. @a location parameter passed to OpenFile() is
|
||||
relative to this path.
|
||||
@@ -493,7 +493,7 @@ public:
|
||||
|
||||
Use wxStreamBase::IsOk() to verify if the constructor succeeded.
|
||||
*/
|
||||
wxFileInputStream(const wxString& filename, int flags = 0);
|
||||
wxFSInputStream(const wxString& filename, int flags = 0);
|
||||
|
||||
/**
|
||||
Returns @true if the stream is initialized and ready.
|
||||
|
@@ -11,7 +11,7 @@
|
||||
the generic properties of the font without hardcoding in the sources a specific
|
||||
face name.
|
||||
|
||||
wxFontFamily thus allows to group the font face names of fonts with similar
|
||||
wxFontFamily thus allows grouping the font face names of fonts with similar
|
||||
properties. Most wxWidgets ports use lists of fonts for each font family
|
||||
inspired by the data taken from http://www.codestyle.org/css/font-family.
|
||||
*/
|
||||
@@ -291,7 +291,7 @@ enum wxFontEncoding
|
||||
@class wxFontInfo
|
||||
|
||||
This class is a helper used for wxFont creation using named parameter
|
||||
idiom: it allows to specify various wxFont attributes using the chained
|
||||
idiom: it allows specifying various wxFont attributes using the chained
|
||||
calls to its clearly named methods instead of passing them in the fixed
|
||||
order to wxFont constructors.
|
||||
|
||||
@@ -322,16 +322,12 @@ public:
|
||||
/**
|
||||
Constructor setting the font size in points to use.
|
||||
|
||||
The canonical type of @a pointSize argument is @c float, however any
|
||||
other integer type, as well as @c double, is also accepted for
|
||||
compatibility.
|
||||
|
||||
Notice that until wxWidgets 3.1.2, the type could only be @c int.
|
||||
Note that until wxWidgets 3.1.2 fractional point sizes were not
|
||||
supported, and the type of @a pointSize was @c int.
|
||||
|
||||
@see wxFont::SetPointSize()
|
||||
*/
|
||||
template <typename T>
|
||||
explicit wxFontInfo(T pointSize);
|
||||
explicit wxFontInfo(double pointSize);
|
||||
|
||||
/**
|
||||
Constructor setting the font size in pixels to use.
|
||||
@@ -743,7 +739,7 @@ public:
|
||||
This method can be used to allow this application to use the font from
|
||||
the given file even if it is not globally installed on the system.
|
||||
|
||||
Under OS X this method actually doesn't do anything other than check
|
||||
Under macOS this method actually doesn't do anything other than check
|
||||
for the existence of the file in the "Fonts" subdirectory of the
|
||||
application bundle "Resources" directory. You are responsible for
|
||||
actually making the font file available in this directory and setting
|
||||
@@ -786,7 +782,7 @@ public:
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
virtual float GetFractionalPointSize() const;
|
||||
virtual double GetFractionalPointSize() const;
|
||||
|
||||
/**
|
||||
Gets the pixel size.
|
||||
@@ -1139,7 +1135,7 @@ public:
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
virtual void SetFractionalPointSize(float pointSize);
|
||||
virtual void SetFractionalPointSize(double pointSize);
|
||||
|
||||
/**
|
||||
Sets the pixel size.
|
||||
@@ -1169,7 +1165,7 @@ public:
|
||||
/**
|
||||
Sets the font size using a predefined symbolic size name.
|
||||
|
||||
This function allows to change font size to be (very) large or small
|
||||
This function allows changing font size to be (very) large or small
|
||||
compared to the standard font size.
|
||||
|
||||
@see SetSymbolicSizeRelativeTo().
|
||||
|
@@ -64,6 +64,23 @@ public:
|
||||
*/
|
||||
bool GetEnableEffects() const;
|
||||
|
||||
/**
|
||||
Returns the state of the flags restricting the selection.
|
||||
|
||||
Note that currently these flags are only effectively used in wxMSW.
|
||||
|
||||
@returns
|
||||
- @c wxFONTRESTRICT_NONE If no restriction applies, or a combination of
|
||||
the following flags:
|
||||
- @c wxFONTRESTRICT_SCALABLE To show only scalable fonts - no raster fonts.
|
||||
- @c wxFONTRESTRICT_FIXEDPITCH To show only monospaced fonts.
|
||||
|
||||
The default value is @c wxFONTRESTRICT_NONE.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
int GetRestrictSelection() const;
|
||||
|
||||
/**
|
||||
Gets the font that will be initially used by the font dialog. This
|
||||
should have previously been set by the application.
|
||||
@@ -77,6 +94,24 @@ public:
|
||||
*/
|
||||
bool GetShowHelp() const;
|
||||
|
||||
/**
|
||||
Restricts the selection to a subset of the available fonts.
|
||||
|
||||
Note that currently these flags are only effectively used in wxMSW and
|
||||
are ignored in the other ports.
|
||||
|
||||
Possible values are:
|
||||
|
||||
- @c wxFONTRESTRICT_NONE No restriction, show all fonts in the dialog.
|
||||
- @c wxFONTRESTRICT_SCALABLE To show only scalable fonts - no raster fonts.
|
||||
- @c wxFONTRESTRICT_FIXEDPITCH To show only monospaced fonts.
|
||||
|
||||
The default value is @c wxFONTRESTRICT_NONE.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
void RestrictSelection(int flags);
|
||||
|
||||
/**
|
||||
Under Windows, determines whether symbol fonts can be selected. Has no
|
||||
effect on other platforms.
|
||||
|
@@ -59,7 +59,7 @@ class wxFontPickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxFontPickerCtrl();
|
||||
|
||||
|
||||
/**
|
||||
Initializes the object and calls Create() with
|
||||
all the parameters.
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
/**
|
||||
@class wxNativeFontInfo
|
||||
|
||||
|
||||
wxNativeFontInfo is platform-specific font representation: this class
|
||||
should be considered as an opaque font description only used by the native
|
||||
functions, the user code can only get the objects of this type from
|
||||
|
@@ -119,7 +119,7 @@
|
||||
frames having this style (the dialogs don't have a minimize or a
|
||||
maximize box by default)
|
||||
@style{wxFRAME_EX_METAL}
|
||||
On OS X, frames with this style will be shown with a metallic
|
||||
On macOS, frames with this style will be shown with a metallic
|
||||
look. This is an extra style.
|
||||
@endExtraStyleTable
|
||||
|
||||
|
@@ -10,14 +10,14 @@
|
||||
/**
|
||||
@class wxFileSystemWatcher
|
||||
|
||||
The wxFileSystemWatcher class allows to receive notifications of file
|
||||
The wxFileSystemWatcher class allows receiving notifications of file
|
||||
system changes.
|
||||
|
||||
@note Implementation limitations: this class is currently implemented for
|
||||
MSW, OS X and GTK ports but doesn't detect all changes correctly
|
||||
MSW, macOS and GTK ports but doesn't detect all changes correctly
|
||||
everywhere: under MSW accessing the file is not detected (only
|
||||
modifying it is) and under OS X neither accessing nor modifying is
|
||||
detected (only creating and deleting files is). Moreover, OS X
|
||||
modifying it is) and under macOS neither accessing nor modifying is
|
||||
detected (only creating and deleting files is). Moreover, macOS
|
||||
version doesn't currently collapse pairs of create/delete events in a
|
||||
rename event, unlike the other ones.
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
Additionally a file mask can be specified to include only files
|
||||
matching that particular mask.
|
||||
|
||||
This method is implemented efficiently on MSW and OS X >= 10.7, but
|
||||
This method is implemented efficiently on MSW and macOS, but
|
||||
should be used with care on other platforms for directories with lots
|
||||
of children (e.g. the root directory) as it calls Add() for each
|
||||
subdirectory, potentially creating a lot of watches and taking a long
|
||||
@@ -250,7 +250,7 @@ enum wxFSWFlags
|
||||
Notice that under MSW this event is sometimes -- although not always --
|
||||
followed by a ::wxFSW_EVENT_MODIFY for the new file.
|
||||
|
||||
Under OS X this event is only detected when watching entire trees. When
|
||||
Under macOS this event is only detected when watching entire trees. When
|
||||
watching directories, separate ::wxFSW_EVENT_CREATE and
|
||||
::wxFSW_EVENT_DELETE events are detected instead.
|
||||
*/
|
||||
@@ -262,7 +262,7 @@ enum wxFSWFlags
|
||||
Depending on the program doing the file modification, multiple such
|
||||
events can be reported for a single logical file update.
|
||||
|
||||
Under OS X this event is only detected when watching entire trees.
|
||||
Under macOS this event is only detected when watching entire trees.
|
||||
*/
|
||||
wxFSW_EVENT_MODIFY = 0x08,
|
||||
|
||||
@@ -276,8 +276,8 @@ enum wxFSWFlags
|
||||
/**
|
||||
The item's metadata was changed, e.g.\ its permissions or timestamps.
|
||||
|
||||
This event is currently only detected under Linux and OS X.
|
||||
Under OS X this event is only detected when watching entire trees.
|
||||
This event is currently only detected under Linux and macOS.
|
||||
Under macOS this event is only detected when watching entire trees.
|
||||
|
||||
@since 2.9.5
|
||||
*/
|
||||
@@ -289,8 +289,8 @@ enum wxFSWFlags
|
||||
wxFSW_EVENT_UNMOUNT cannot be set; unmount events are produced automatically. This flag
|
||||
is therefore not included in wxFSW_EVENT_ALL.
|
||||
|
||||
This event is currently only detected under Linux and OS X.
|
||||
Under OS X this event is only detected when watching entire trees.
|
||||
This event is currently only detected under Linux and macOS.
|
||||
Under macOS this event is only detected when watching entire trees.
|
||||
|
||||
@since 2.9.5
|
||||
*/
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#define wxGA_HORIZONTAL wxHORIZONTAL
|
||||
#define wxGA_VERTICAL wxVERTICAL
|
||||
|
||||
// Available since Windows 7 only. With this style, the value of guage will
|
||||
// Available since Windows 7 only. With this style, the value of gauge will
|
||||
// reflect on the taskbar button.
|
||||
#define wxGA_PROGRESS 0x0010
|
||||
// Win32 only, is default (and only) on some other platforms
|
||||
@@ -52,13 +52,12 @@
|
||||
Display the current value in percents in the gauge itself. This
|
||||
style is only supported in wxQt and ignored under the other
|
||||
platforms.
|
||||
@since 3.1.0
|
||||
|
||||
This flag is only available in wxWidgets 3.1.0 and later.
|
||||
@style{wxGA_PROGRESS}
|
||||
Reflect the value of gauge in the application taskbar button under
|
||||
Windows 7 and later and the dock icon under OS X, ignored under
|
||||
Windows 7 and later and the dock icon under macOS, ignored under
|
||||
the other platforms.
|
||||
@since 3.1.0
|
||||
This flag is only available in wxWidgets 3.1.0 and later.
|
||||
|
||||
@endStyleTable
|
||||
|
||||
|
@@ -82,7 +82,7 @@ public:
|
||||
//@{
|
||||
/**
|
||||
Adds the given item to the given position.
|
||||
|
||||
|
||||
@return A valid pointer if the item was successfully placed at the
|
||||
given position, or @NULL if something was already there.
|
||||
*/
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
Called when the managed size of the sizer is needed or when layout
|
||||
needs done.
|
||||
*/
|
||||
void RecalcSizes();
|
||||
virtual void RepositionChildren(const wxSize& minSize);
|
||||
|
||||
/**
|
||||
Set the size used for cells in the grid with no item.
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
*/
|
||||
bool SetSpan(const wxGBSpan& span);
|
||||
|
||||
|
||||
|
||||
wxGridBagSizer* GetGBSizer() const;
|
||||
void SetGBSizer(wxGridBagSizer* sizer);
|
||||
};
|
||||
|
@@ -248,13 +248,24 @@ public:
|
||||
|
||||
|
||||
/**
|
||||
@class wxRect
|
||||
Represents a rectangle with integer coordinates.
|
||||
|
||||
A class for manipulating rectangles.
|
||||
@c x and @c y members specify the coordinates of the rectangle top-left
|
||||
corner and @c width and @c height specify its width and height
|
||||
respectively. The usual C++ semi-open interval convention is used: point
|
||||
@c p lies inside the rectangle if and only if both conditions below are
|
||||
satisfied:
|
||||
@code
|
||||
x <= p.x < x + width
|
||||
y <= p.y < y + height
|
||||
@endcode
|
||||
|
||||
Note that the x, y coordinates and the width and height stored inside a wxRect
|
||||
object may be negative and that wxRect functions do not perform any check against
|
||||
negative values.
|
||||
In other words, the rectangle left and right boundaries are at @c x and @c
|
||||
x+width-1 and its top and bottom boundaries are at @c y and @c y+height-1
|
||||
respectively.
|
||||
|
||||
Note that the x and y coordinates may be negative, but width and height are
|
||||
always strictly positive for non-empty rectangles.
|
||||
|
||||
@library{wxcore}
|
||||
@category{data}
|
||||
@@ -275,6 +286,9 @@ public:
|
||||
wxRect(int x, int y, int width, int height);
|
||||
/**
|
||||
Creates a wxRect object from top-left and bottom-right points.
|
||||
|
||||
The width of the rectangle will be @c bottomRight.x-topLeft.x+1 and the
|
||||
height will be @c bottomRight.y-topLeft.y+1.
|
||||
*/
|
||||
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
|
||||
/**
|
||||
@@ -557,7 +571,7 @@ public:
|
||||
*/
|
||||
void SetBottomLeft(const wxPoint &p);
|
||||
|
||||
|
||||
|
||||
//@{
|
||||
/**
|
||||
Modifies the rectangle to contain the bounding box of this rectangle
|
||||
@@ -1117,7 +1131,7 @@ const wxSize wxDefaultSize;
|
||||
@endcode
|
||||
to be able to use @c wxBITMAP_PNG(mybitmap) in the code.
|
||||
|
||||
Under OS X the file with the specified name and "png" extension must be
|
||||
Under macOS the file with the specified name and "png" extension must be
|
||||
present in the "Resources" subdirectory of the application bundle.
|
||||
|
||||
Under the other platforms, this is equivalent to wxBITMAP_PNG_FROM_DATA()
|
||||
@@ -1161,7 +1175,7 @@ const wxSize wxDefaultSize;
|
||||
|
||||
You can use wxBITMAP_PNG() to load the PNG bitmaps from resources on the
|
||||
platforms that support this and only fall back to loading them from data
|
||||
under the other ones (i.e. not Windows and not OS X).
|
||||
under the other ones (i.e. not Windows and not macOS).
|
||||
|
||||
@header{wx/gdicmn.h}
|
||||
|
||||
@@ -1220,7 +1234,7 @@ void wxSetCursor(const wxCursor& cursor);
|
||||
/**
|
||||
Returns the dimensions of the work area on the display.
|
||||
|
||||
This is the same as wxGetClientDisplayRect() but allows to retrieve the
|
||||
This is the same as wxGetClientDisplayRect() but allows retrieving the
|
||||
individual components instead of the entire rectangle.
|
||||
|
||||
Any of the output pointers can be @NULL if the corresponding value is not
|
||||
|
@@ -22,7 +22,7 @@
|
||||
To instantiate an object from your wxGenericAboutDialog-based class, you
|
||||
can use either the default constructor followed by a call to Create(), or
|
||||
directly using the alternate constructor. In either case, you have to
|
||||
prepare a wxAboutDialogInfo containing standard informations to display in
|
||||
prepare a wxAboutDialogInfo containing standard information to display in
|
||||
an about-box.
|
||||
|
||||
Example of usage, MyAboutDlg being a class derived from wxGenericAboutDialog:
|
||||
@@ -34,7 +34,7 @@
|
||||
aboutInfo.SetName("MyApp");
|
||||
aboutInfo.SetVersion(MY_APP_VERSION_STRING);
|
||||
aboutInfo.SetDescription(_("My wxWidgets-based application!"));
|
||||
aboutInfo.SetCopyright("(C) 1992-2018");
|
||||
aboutInfo.SetCopyright("(C) 1992-2020");
|
||||
aboutInfo.SetWebSite("http://myapp.org");
|
||||
aboutInfo.AddDeveloper("My Self");
|
||||
|
||||
|
@@ -111,9 +111,9 @@ public:
|
||||
|
||||
@param k
|
||||
string to search for, empty string will list all entries
|
||||
|
||||
@param mode
|
||||
optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
|
||||
|
||||
@param mode
|
||||
optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
|
||||
but this currently only supported by the wxHtmlHelpController.
|
||||
|
||||
@return @true on success
|
||||
|
@@ -279,7 +279,7 @@ public:
|
||||
void Inset( wxInt32 x , wxInt32 y );
|
||||
void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom );
|
||||
void Offset( const wxPoint2DInt &pt );
|
||||
void ConstrainTo( const wxRect2DInt &rect );
|
||||
void ConstrainTo( const wxRect2DInt &rect );
|
||||
wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor );
|
||||
|
||||
static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
|
||||
|
34
interface/wx/gifdecod.h
Normal file
34
interface/wx/gifdecod.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gifdecod.h
|
||||
// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation
|
||||
// Author: Guillermo Rodriguez Garcia <guille@iies.es>
|
||||
// Version: 3.02
|
||||
// Copyright: (c) 1999 Guillermo Rodriguez Garcia
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
@class wxGIFDecoder
|
||||
|
||||
An animation decoder supporting animated GIF files.
|
||||
*/
|
||||
class wxGIFDecoder : public wxAnimationDecoder
|
||||
{
|
||||
public:
|
||||
wxGIFDecoder();
|
||||
~wxGIFDecoder();
|
||||
|
||||
virtual bool Load( wxInputStream& stream );
|
||||
virtual wxAnimationDecoder *Clone() const;
|
||||
virtual wxAnimationType GetType() const;
|
||||
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const;
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const;
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const;
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
|
||||
virtual long GetDelay(unsigned int frame) const;
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const;
|
||||
|
||||
protected:
|
||||
virtual bool DoCanRead(wxInputStream& stream) const;
|
||||
};
|
||||
|
@@ -144,7 +144,7 @@ class wxGLAttributes : public wxGLAttribsBase
|
||||
public:
|
||||
/**
|
||||
Use true colour instead of colour index rendering for each pixel.
|
||||
It makes no effect for OS X.
|
||||
It makes no effect for macOS.
|
||||
*/
|
||||
wxGLAttributes& RGBA();
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
wxGLAttributes& BufferSize(int val);
|
||||
|
||||
/**
|
||||
Specifies the framebuffer level. It makes no effect for OS X.
|
||||
Specifies the framebuffer level. It makes no effect for macOS.
|
||||
|
||||
@param val
|
||||
0 for main buffer, >0 for overlay, <0 for underlay.
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
wxGLAttributes& Samplers(int val);
|
||||
|
||||
/**
|
||||
Used to request a frame buffer sRGB capable. It makes no effect for OS X.
|
||||
Used to request a frame buffer sRGB capable. It makes no effect for macOS.
|
||||
*/
|
||||
wxGLAttributes& FrameBuffersRGB();
|
||||
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
@param val
|
||||
The major version number requested.
|
||||
|
||||
It has no effect under OS X where specifying CoreProfile() will
|
||||
It has no effect under macOS where specifying CoreProfile() will
|
||||
result in using OpenGL version at least 3.2.
|
||||
*/
|
||||
wxGLContextAttrs& MajorVersion(int val);
|
||||
@@ -326,7 +326,7 @@ public:
|
||||
@param val
|
||||
The minor version number requested, e.g. 2 if OpenGL 3.2 is requested.
|
||||
|
||||
It has no effect under OS X where specifying CoreProfile() will
|
||||
It has no effect under macOS where specifying CoreProfile() will
|
||||
result in using OpenGL version at least 3.2.
|
||||
*/
|
||||
wxGLContextAttrs& MinorVersion(int val);
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
@param vminor
|
||||
The minor version number requested, e.g. 5 if OpenGL 4.5 is requested.
|
||||
|
||||
It has no effect under OS X where specifying CoreProfile() will
|
||||
It has no effect under macOS where specifying CoreProfile() will
|
||||
result in using OpenGL version at least 3.2.
|
||||
*/
|
||||
wxGLContextAttrs& OGLVersion(int vmayor, int vminor);
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
later. They must not support functionality marked as deprecated or
|
||||
removed by the requested version of the OpenGL API.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& ForwardCompatible();
|
||||
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
subsets of OpenGL, lacking some features of the full specification.
|
||||
Used mainly in embedded devices such as mobile phones.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& ES2();
|
||||
|
||||
@@ -376,7 +376,7 @@ public:
|
||||
some logs are enabled and also allows OGL to send debug messages through
|
||||
a callback function.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& DebugCtx();
|
||||
|
||||
@@ -384,14 +384,14 @@ public:
|
||||
Request robustness, or how OpenGL handles out-of-bounds buffer object
|
||||
accesses and graphics reset notification behaviours.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& Robust();
|
||||
|
||||
/**
|
||||
With robustness enabled, never deliver notification of reset events.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& NoResetNotify();
|
||||
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
With robustness enabled, if graphics reset happens, all context state is
|
||||
lost.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& LoseOnReset();
|
||||
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
Request OpenGL to protect other applications or shared contexts from reset
|
||||
side-effects.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& ResetIsolation();
|
||||
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
@param val
|
||||
0 for not flushing, 1 (wxWidgets default) for flushing pending commands.
|
||||
|
||||
It has no effect under OS X.
|
||||
It has no effect under macOS.
|
||||
*/
|
||||
wxGLContextAttrs& ReleaseFlush(int val = 1);
|
||||
|
||||
@@ -620,7 +620,7 @@ enum
|
||||
This attribute should be followed by the major version number
|
||||
requested.
|
||||
|
||||
It has no effect under OS X where specifying ::WX_GL_CORE_PROFILE will
|
||||
It has no effect under macOS where specifying ::WX_GL_CORE_PROFILE will
|
||||
result in using OpenGL version at least 3.2 but can still be used
|
||||
there for portability.
|
||||
|
||||
@@ -748,6 +748,15 @@ enum
|
||||
context to the canvas, and then finally call SwapBuffers() to swap the
|
||||
buffers of the OpenGL canvas and thus show your current output.
|
||||
|
||||
Please note that wxGLContext always uses physical pixels, even on the
|
||||
platforms where wxWindow uses logical pixels, affected by the coordinate
|
||||
scaling, on high DPI displays. Thus, if you want to set the OpenGL view
|
||||
port to the size of entire window, you must multiply the result returned by
|
||||
wxWindow::GetClientSize() by wxGLCanvas::GetContentScaleFactor() before
|
||||
passing it to @c glViewport(). Same considerations apply to other OpenGL
|
||||
functions and other coordinates, notably those retrieved from wxMouseEvent
|
||||
in the event handlers.
|
||||
|
||||
Notice that versions of wxWidgets previous to 2.9 used to implicitly create a
|
||||
wxGLContext inside wxGLCanvas itself. This is still supported in the
|
||||
current version but is deprecated now and will be removed in the future,
|
||||
@@ -760,7 +769,7 @@ enum
|
||||
parameter) but it's discouraged.
|
||||
|
||||
@note
|
||||
On those platforms which use a configure script (e.g. Linux and OS X)
|
||||
On those platforms which use a configure script (e.g. Linux and macOS)
|
||||
OpenGL support is automatically enabled if the relative headers and
|
||||
libraries are found.
|
||||
To switch it on under the other platforms (e.g. Windows), you need to edit
|
||||
@@ -823,6 +832,10 @@ public:
|
||||
If @a attribList is not specified, wxGLAttributes::PlatformDefaults()
|
||||
is used, plus some other attributes (see below).
|
||||
|
||||
@param parent
|
||||
Pointer to a parent window.
|
||||
@param id
|
||||
Window identifier. If -1, will automatically create an identifier.
|
||||
@param attribList
|
||||
Array of integers. With this parameter you can set the device
|
||||
context attributes associated to this window. This array is
|
||||
@@ -841,6 +854,22 @@ public:
|
||||
WX_GL_DOUBLEBUFFER are used. But notice that if you do specify some
|
||||
attributes you also need to explicitly include these two default
|
||||
attributes in the list if you need them.
|
||||
@param pos
|
||||
Window position. wxDefaultPosition is (-1, -1) which indicates that
|
||||
wxWidgets should generate a default position for the window.
|
||||
@param size
|
||||
Window size. wxDefaultSize is (-1, -1) which indicates that
|
||||
wxWidgets should generate a default size for the window. If no
|
||||
suitable size can be found, the window will be sized to 20x20
|
||||
pixels so that the window is visible but obviously not correctly
|
||||
sized.
|
||||
@param style
|
||||
Window style.
|
||||
@param name
|
||||
Window name.
|
||||
@param palette
|
||||
Palette for indexed colour (i.e. non WX_GL_RGBA) mode. Ignored
|
||||
under most platforms.
|
||||
*/
|
||||
wxGLCanvas(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const int* attribList = NULL,
|
||||
|
@@ -305,6 +305,19 @@ enum wxCompositionMode
|
||||
wxCOMPOSITION_ADD /**< @e R = @e S + @e D */
|
||||
};
|
||||
|
||||
/**
|
||||
Used to indicate what kind of gradient is set in a wxGraphicsPenInfo
|
||||
object.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
enum wxGradientType {
|
||||
wxGRADIENT_NONE,
|
||||
wxGRADIENT_LINEAR,
|
||||
wxGRADIENT_RADIAL
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Represents a bitmap.
|
||||
|
||||
@@ -321,7 +334,7 @@ public:
|
||||
/**
|
||||
Default constructor creates an invalid bitmap.
|
||||
*/
|
||||
wxGraphicsBitmap() {}
|
||||
wxGraphicsBitmap();
|
||||
|
||||
/**
|
||||
Return the contents of this bitmap as wxImage.
|
||||
@@ -456,6 +469,8 @@ public:
|
||||
with wxDC and doesn't known its exact type. Use Create() instead if
|
||||
you know that the DC is e.g. wxWindowDC.
|
||||
|
||||
@see wxGraphicsRenderer::CreateContextFromUnknownDC()
|
||||
|
||||
@since 3.1.1
|
||||
*/
|
||||
static wxGraphicsContext* CreateFromUnknownDC(wxDC& dc);
|
||||
@@ -631,11 +646,14 @@ public:
|
||||
of gradient @a stops can be specified.
|
||||
|
||||
The version taking wxGraphicsGradientStops is new in wxWidgets 2.9.1.
|
||||
|
||||
The @a matrix parameter was added in wxWidgets 3.1.3
|
||||
*/
|
||||
wxGraphicsBrush
|
||||
CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
|
||||
wxDouble x2, wxDouble y2,
|
||||
const wxColour& c1, const wxColour& c2) const;
|
||||
const wxColour& c1, const wxColour& c2,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
@@ -643,34 +661,39 @@ public:
|
||||
wxGraphicsBrush
|
||||
CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
|
||||
wxDouble x2, wxDouble y2,
|
||||
const wxGraphicsGradientStops& stops) const;
|
||||
const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) const;
|
||||
|
||||
/**
|
||||
Creates a native brush with a radial gradient.
|
||||
|
||||
The brush originates at (@a xo, @a yc) and ends on a circle around
|
||||
(@a xc, @a yc) with the given @a radius.
|
||||
The brush originates at (@a startX, @a startY) and ends on a circle around
|
||||
(@a endX, @a endY) with the given @a radius.
|
||||
|
||||
The gradient may be specified either by its start and end colours @a
|
||||
oColor and @a cColor or by a full set of gradient @a stops.
|
||||
|
||||
The version taking wxGraphicsGradientStops is new in wxWidgets 2.9.1.
|
||||
|
||||
The ability to apply a transformation matrix to the gradient was added in 3.1.3
|
||||
*/
|
||||
virtual wxGraphicsBrush
|
||||
CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
|
||||
wxDouble xc, wxDouble yc,
|
||||
CreateRadialGradientBrush(wxDouble startX, wxDouble startY,
|
||||
wxDouble endX, wxDouble endY,
|
||||
wxDouble radius,
|
||||
const wxColour& oColor,
|
||||
const wxColour& cColor) const;
|
||||
const wxColour& cColor,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) const;
|
||||
|
||||
/**
|
||||
@overload
|
||||
*/
|
||||
virtual wxGraphicsBrush
|
||||
CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
|
||||
wxDouble xc, wxDouble yc,
|
||||
CreateRadialGradientBrush(wxDouble startX, wxDouble startY,
|
||||
wxDouble endX, wxDouble endY,
|
||||
wxDouble radius,
|
||||
const wxGraphicsGradientStops& stops) = 0;
|
||||
const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) = 0;
|
||||
|
||||
/**
|
||||
Sets the brush for filling paths.
|
||||
@@ -781,8 +804,8 @@ public:
|
||||
@param y
|
||||
The y coordinate position to draw the text at.
|
||||
@param angle
|
||||
The angle relative to the (default) horizontal direction to draw
|
||||
the string.
|
||||
The angle, in radians, relative to the (default) horizontal
|
||||
direction to draw the string.
|
||||
*/
|
||||
void DrawText(const wxString& str, wxDouble x, wxDouble y, wxDouble angle);
|
||||
|
||||
@@ -810,8 +833,8 @@ public:
|
||||
@param y
|
||||
The y coordinate position to draw the text at.
|
||||
@param angle
|
||||
The angle relative to the (default) horizontal direction to draw
|
||||
the string.
|
||||
The angle, in radians, relative to the (default) horizontal
|
||||
direction to draw the string.
|
||||
@param backgroundBrush
|
||||
Brush to fill the text with.
|
||||
*/
|
||||
@@ -1093,7 +1116,7 @@ public:
|
||||
/**
|
||||
Returns the resolution of the graphics context in device points per inch.
|
||||
*/
|
||||
virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY);
|
||||
virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY) const;
|
||||
|
||||
/**
|
||||
Returns the associated window if any.
|
||||
@@ -1304,7 +1327,7 @@ public:
|
||||
Creates wxGraphicsBitmap from a native bitmap handle.
|
||||
|
||||
@a bitmap meaning is platform-dependent. Currently it's a GDI+ @c
|
||||
Bitmap pointer under MSW, @c CGImage pointer under OS X or a @c
|
||||
Bitmap pointer under MSW, @c CGImage pointer under macOS or a @c
|
||||
cairo_surface_t pointer when using Cairo under any platform.
|
||||
|
||||
Notice that this method takes ownership of @a bitmap, i.e. it will be
|
||||
@@ -1341,6 +1364,24 @@ public:
|
||||
*/
|
||||
virtual wxGraphicsContext* CreateContext(const wxEnhMetaFileDC& metaFileDC) = 0;
|
||||
|
||||
/**
|
||||
Creates a wxGraphicsContext from a DC of unknown specific type.
|
||||
|
||||
Creates a wxGraphicsContext if @a dc is a supported type (i.e. has a
|
||||
corresponding CreateContext() method, e.g. wxWindowDC or wxMemoryDC).
|
||||
Returns @NULL if the DC is unsupported.
|
||||
|
||||
This method is only useful as a helper in generic code that operates
|
||||
with wxDC and doesn't known its exact type. Use the appropriate
|
||||
CreateContext() overload instead if you know that the DC is e.g.
|
||||
wxWindowDC.
|
||||
|
||||
@see wxGraphicsContext::CreateFromUnknownDC()
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
wxGraphicsContext* CreateContextFromUnknownDC(wxDC& dc);
|
||||
|
||||
/**
|
||||
Creates a wxGraphicsContext associated with a wxImage.
|
||||
|
||||
@@ -1418,18 +1459,33 @@ public:
|
||||
int flags = wxFONTFLAG_DEFAULT,
|
||||
const wxColour& col = *wxBLACK) = 0;
|
||||
|
||||
/**
|
||||
Creates a native graphics font from a wxFont and a text colour.
|
||||
|
||||
The specified DPI is used to convert the (fractional) wxFont point-size
|
||||
to a fractional pixel-size.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
virtual wxGraphicsFont CreateFontAtDPI(const wxFont& font,
|
||||
const wxRealPoint& dpi,
|
||||
const wxColour& col = *wxBLACK) = 0;
|
||||
|
||||
/**
|
||||
Creates a native brush with a linear gradient.
|
||||
|
||||
Stops support is new since wxWidgets 2.9.1, previously only the start
|
||||
and end colours could be specified.
|
||||
|
||||
The ability to apply a transformation matrix to the gradient was added in 3.1.3
|
||||
|
||||
*/
|
||||
virtual wxGraphicsBrush CreateLinearGradientBrush(wxDouble x1,
|
||||
wxDouble y1,
|
||||
wxDouble x2,
|
||||
wxDouble y2,
|
||||
const wxGraphicsGradientStops& stops) = 0;
|
||||
const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) = 0;
|
||||
|
||||
/**
|
||||
Creates a native affine transformation matrix from the passed in
|
||||
@@ -1457,11 +1513,14 @@ public:
|
||||
|
||||
Stops support is new since wxWidgets 2.9.1, previously only the start
|
||||
and end colours could be specified.
|
||||
|
||||
The ability to apply a transformation matrix to the gradient was added in 3.1.3
|
||||
*/
|
||||
virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
|
||||
wxDouble xc, wxDouble yc,
|
||||
virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble startX, wxDouble startY,
|
||||
wxDouble endX, wxDouble endY,
|
||||
wxDouble radius,
|
||||
const wxGraphicsGradientStops& stops) = 0;
|
||||
const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix) = 0;
|
||||
|
||||
/**
|
||||
Extracts a sub-bitmap from an existing bitmap.
|
||||
@@ -1475,7 +1534,7 @@ public:
|
||||
|
||||
Currently this function returns "gdiplus" for Windows GDI+
|
||||
implementation, "direct2d" for Windows Direct2D implementation,
|
||||
"cairo" for Cairo implementation and "cg" for OS X CoreGraphics
|
||||
"cairo" for Cairo implementation and "cg" for macOS CoreGraphics
|
||||
implementation.
|
||||
|
||||
@remarks The string returned by this method is not user-readable and is
|
||||
@@ -1500,7 +1559,7 @@ public:
|
||||
virtual void GetVersion(int* major, int* minor = NULL, int* micro=NULL) const = 0;
|
||||
|
||||
/**
|
||||
Returns the default renderer on this platform. On OS X this is the Core
|
||||
Returns the default renderer on this platform. On macOS this is the Core
|
||||
Graphics (a.k.a. Quartz 2D) renderer, on MSW the GDIPlus renderer, and
|
||||
on GTK we currently default to the Cairo renderer.
|
||||
*/
|
||||
@@ -1565,7 +1624,7 @@ public:
|
||||
@class wxGraphicsPenInfo
|
||||
|
||||
This class is a helper used for wxGraphicsPen creation using named parameter
|
||||
idiom: it allows to specify various wxGraphicsPen attributes using the chained
|
||||
idiom: it allows specifying various wxGraphicsPen attributes using the chained
|
||||
calls to its clearly named methods instead of passing them in the fixed
|
||||
order to wxGraphicsPen constructors.
|
||||
|
||||
@@ -1600,6 +1659,50 @@ public:
|
||||
wxGraphicsPenInfo& Join(wxPenJoin join);
|
||||
|
||||
wxGraphicsPenInfo& Cap(wxPenCap cap);
|
||||
|
||||
wxGraphicsPenInfo&
|
||||
LinearGradient(wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
|
||||
const wxColour& c1, const wxColour& c2,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix);
|
||||
|
||||
wxGraphicsPenInfo&
|
||||
LinearGradient(wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
|
||||
const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix);
|
||||
|
||||
wxGraphicsPenInfo&
|
||||
RadialGradient(wxDouble startX, wxDouble startY,
|
||||
wxDouble endX, wxDouble endY, wxDouble radius,
|
||||
const wxColour& oColor, const wxColour& cColor,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix);
|
||||
|
||||
wxGraphicsPenInfo&
|
||||
RadialGradient(wxDouble startX, wxDouble startY,
|
||||
wxDouble endX, wxDouble endY,
|
||||
wxDouble radius, const wxGraphicsGradientStops& stops,
|
||||
const wxGraphicsMatrix& matrix = wxNullGraphicsMatrix);
|
||||
|
||||
wxColour GetColour() const;
|
||||
wxBitmap GetStipple() const;
|
||||
wxPenStyle GetStyle() const;
|
||||
wxPenJoin GetJoin() const;
|
||||
wxPenCap GetCap() const;
|
||||
int GetDashes(wxDash **ptr);
|
||||
int GetDashCount() const;
|
||||
wxDash* GetDash() const;
|
||||
bool IsTransparent() const;
|
||||
wxDouble GetWidth() const;
|
||||
wxGradientType GetGradientType() const;
|
||||
wxDouble GetX1() const;
|
||||
wxDouble GetY1() const;
|
||||
wxDouble GetX2() const;
|
||||
wxDouble GetY2() const;
|
||||
wxDouble GetStartX() const;
|
||||
wxDouble GetStartY() const;
|
||||
wxDouble GetEndX() const;
|
||||
wxDouble GetEndY() const;
|
||||
wxDouble GetRadius() const;
|
||||
const wxGraphicsGradientStops& GetStops() const;
|
||||
};
|
||||
|
||||
|
||||
|
1504
interface/wx/grid.h
1504
interface/wx/grid.h
File diff suppressed because it is too large
Load Diff
@@ -18,8 +18,8 @@ enum
|
||||
/**
|
||||
Size the column automatically to fit all values.
|
||||
|
||||
@note On OS X, this style is only implemented in the Cocoa build on
|
||||
OS X >= 10.5; it behaves identically to wxCOL_WIDTH_DEFAULT otherwise.
|
||||
@note On macOS, this style is only implemented in the Cocoa build on
|
||||
macOS >= 10.5; it behaves identically to wxCOL_WIDTH_DEFAULT otherwise.
|
||||
*/
|
||||
wxCOL_WIDTH_AUTOSIZE = -2
|
||||
};
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
/**
|
||||
Set the column flags.
|
||||
|
||||
This method allows to set all flags at once, see also generic
|
||||
This method allows setting all flags at once, see also generic
|
||||
ChangeFlag(), SetFlag(), ClearFlag() and ToggleFlag() methods below as
|
||||
well as specific SetResizeable(), SetSortable(), SetReorderable() and
|
||||
SetHidden() ones.
|
||||
|
@@ -404,6 +404,16 @@ public:
|
||||
*/
|
||||
int GetColumnTitleWidth(const wxHeaderColumn& col);
|
||||
|
||||
/**
|
||||
Returns width needed for the column with the given index.
|
||||
|
||||
This is just a convenient wrapper for the overload taking
|
||||
wxHeaderColumn.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
int GetColumnTitleWidth(unsigned int idx);
|
||||
|
||||
protected:
|
||||
/**
|
||||
Method to be implemented by the derived classes to return the
|
||||
@@ -692,7 +702,7 @@ public:
|
||||
*/
|
||||
int GetColumn() const;
|
||||
void SetColumn(int col);
|
||||
|
||||
|
||||
/**
|
||||
Return the current width of the column.
|
||||
|
||||
@@ -700,7 +710,7 @@ public:
|
||||
*/
|
||||
int GetWidth() const;
|
||||
void SetWidth(int width);
|
||||
|
||||
|
||||
/**
|
||||
Return the new order of the column.
|
||||
|
||||
|
@@ -100,6 +100,7 @@ public:
|
||||
If the help viewer is not running, runs it and displays the given section.
|
||||
|
||||
- @e WinHelp, MS HTML Help @a sectionNo is a context id.
|
||||
- @e MS HTML Help: Pass -1 in @a sectionNo to display the index.
|
||||
- @e External HTML help: wxExtHelpController implements @a sectionNo as
|
||||
an id in a map file, which is of the form:
|
||||
- @e wxHtmlHelpController: @a sectionNo is an identifier as specified in
|
||||
@@ -156,11 +157,12 @@ public:
|
||||
/**
|
||||
If the help viewer is not running, runs it, and searches for sections matching
|
||||
the given keyword. If one match is found, the file is displayed at this section.
|
||||
The optional parameter allows to search the index (wxHELP_SEARCH_INDEX)
|
||||
The optional parameter allows searching the index (wxHELP_SEARCH_INDEX)
|
||||
but this currently is only supported by the wxHtmlHelpController.
|
||||
|
||||
- @e WinHelp, MS HTML Help:
|
||||
If more than one match is found, the first topic is displayed.
|
||||
- @e MS HTML Help: Pass an empty string to display the search page.
|
||||
- @e External HTML help, simple wxHTML help:
|
||||
If more than one match is found, a choice of topics is displayed.
|
||||
- @e wxHtmlHelpController: see wxHtmlHelpController::KeywordSearch.
|
||||
@@ -247,7 +249,7 @@ public:
|
||||
|
||||
This is an alias for one of a family of help controller classes which is
|
||||
most appropriate for the current platform.
|
||||
|
||||
|
||||
A help controller allows an application to display help, at the contents
|
||||
or at a particular topic, and shut the help program down on termination.
|
||||
This avoids proliferation of many instances of the help viewer whenever the
|
||||
|
@@ -269,7 +269,7 @@ public:
|
||||
wxHtmlHelpDialog* GetDialog();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
wxString GetTitle() const;
|
||||
wxString GetStart() const;
|
||||
wxString GetBasePath() const;
|
||||
|
||||
|
||||
/* SetContentsRange: store in the bookrecord where in the index/contents lists the
|
||||
* book's records are stored. This to facilitate searching in a specific book.
|
||||
* This code will have to be revised when loading/removing books becomes dynamic.
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
For the values of @a helpStyle, please see the documentation for
|
||||
wxHtmlHelpController.
|
||||
*/
|
||||
wxHtmlHelpWindow(wxWindow* parent, int wxWindowID,
|
||||
wxHtmlHelpWindow(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user