Wx files working
This commit is contained in:
parent
c417beda6d
commit
30cb0f8f63
54 changed files with 3157 additions and 5197 deletions
|
|
@ -213,9 +213,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -470,7 +471,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -530,9 +531,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -711,14 +711,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -741,8 +738,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -770,7 +766,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1123,8 +1119,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1132,7 +1128,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1267,13 +1263,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1297,8 +1292,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1411,20 +1404,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1566,9 +1557,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -205,9 +205,18 @@ public:
|
|||
static void SetValue(const T& value,
|
||||
wxAnyValueBuffer& buf)
|
||||
{
|
||||
// Use placement new
|
||||
// Use placement new, taking care to avoid running into problems with
|
||||
// "new" redefinition in wx/msw/msvcrt.h.
|
||||
#ifdef WXDEBUG_NEW
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
void* const place = buf.m_buffer;
|
||||
::new(place) T(value);
|
||||
|
||||
#ifdef WXDEBUG_NEW
|
||||
#define new WXDEBUG_NEW
|
||||
#endif
|
||||
}
|
||||
|
||||
static const T& GetValue(const wxAnyValueBuffer& buf)
|
||||
|
|
|
|||
|
|
@ -193,7 +193,9 @@ protected:
|
|||
//#elif defined(__WXGTK__)
|
||||
// #include "wx/gtk1/anybutton.h"
|
||||
#elif defined(__WXMAC__)
|
||||
// #include "wx/osx/anybutton.h"
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/anybutton.h"
|
||||
#else
|
||||
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
|
||||
{
|
||||
public:
|
||||
|
|
@ -235,6 +237,7 @@ protected:
|
|||
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
#endif
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/anybutton.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -546,69 +546,74 @@ protected:
|
|||
};
|
||||
|
||||
#if defined(__UNIX__) && !defined(__WINDOWS__)
|
||||
#include <signal.h>
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/unix/app.h"
|
||||
#else
|
||||
#include <signal.h>
|
||||
|
||||
class wxFDIODispatcher;
|
||||
class wxFDIOHandler;
|
||||
class wxWakeUpPipe;
|
||||
class wxFDIODispatcher;
|
||||
class wxFDIOHandler;
|
||||
class wxWakeUpPipe;
|
||||
|
||||
// wxApp subclass implementing event processing for console applications
|
||||
class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase
|
||||
{
|
||||
public:
|
||||
wxAppConsole();
|
||||
virtual ~wxAppConsole();
|
||||
// wxApp subclass implementing event processing for console applications
|
||||
class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase
|
||||
{
|
||||
public:
|
||||
wxAppConsole();
|
||||
virtual ~wxAppConsole();
|
||||
|
||||
// override base class initialization
|
||||
virtual bool Initialize(int& argc, wxChar** argv) wxOVERRIDE;
|
||||
// override base class initialization
|
||||
virtual bool Initialize(int& argc, wxChar** argv) wxOVERRIDE;
|
||||
|
||||
|
||||
// Unix-specific: Unix signal handling
|
||||
// -----------------------------------
|
||||
// Unix-specific: Unix signal handling
|
||||
// -----------------------------------
|
||||
|
||||
// type of the function which can be registered as signal handler: notice
|
||||
// that it isn't really a signal handler, i.e. it's not subject to the
|
||||
// usual signal handlers constraints, because it is called later from
|
||||
// CheckSignal() and not when the signal really occurs
|
||||
typedef void (*SignalHandler)(int);
|
||||
// type of the function which can be registered as signal handler: notice
|
||||
// that it isn't really a signal handler, i.e. it's not subject to the
|
||||
// usual signal handlers constraints, because it is called later from
|
||||
// CheckSignal() and not when the signal really occurs
|
||||
typedef void (*SignalHandler)(int);
|
||||
|
||||
// Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used
|
||||
// instead of a function pointer
|
||||
//
|
||||
// Return true if handler was installed, false on error
|
||||
bool SetSignalHandler(int signal, SignalHandler handler);
|
||||
// Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used
|
||||
// instead of a function pointer
|
||||
//
|
||||
// Return true if handler was installed, false on error
|
||||
bool SetSignalHandler(int signal, SignalHandler handler);
|
||||
|
||||
// Check if any Unix signals arrived since the last call and execute
|
||||
// handlers for them
|
||||
void CheckSignal();
|
||||
// Check if any Unix signals arrived since the last call and execute
|
||||
// handlers for them
|
||||
void CheckSignal();
|
||||
|
||||
// Register the signal wake up pipe with the given dispatcher.
|
||||
//
|
||||
// This is used by wxExecute(wxEXEC_NOEVENTS) implementation only.
|
||||
//
|
||||
// The pointer to the handler used for processing events on this descriptor
|
||||
// is returned so that it can be deleted when we no longer needed it.
|
||||
wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher);
|
||||
// Register the signal wake up pipe with the given dispatcher.
|
||||
//
|
||||
// This is used by wxExecute(wxEXEC_NOEVENTS) implementation only.
|
||||
//
|
||||
// The pointer to the handler used for processing events on this descriptor
|
||||
// is returned so that it can be deleted when we no longer needed it.
|
||||
wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher);
|
||||
|
||||
private:
|
||||
// signal handler set up by SetSignalHandler() for all signals we handle,
|
||||
// it just adds the signal to m_signalsCaught -- the real processing is
|
||||
// done later, when CheckSignal() is called
|
||||
static void HandleSignal(int signal);
|
||||
private:
|
||||
// signal handler set up by SetSignalHandler() for all signals we handle,
|
||||
// it just adds the signal to m_signalsCaught -- the real processing is
|
||||
// done later, when CheckSignal() is called
|
||||
static void HandleSignal(int signal);
|
||||
|
||||
|
||||
// signals for which HandleSignal() had been called (reset from
|
||||
// CheckSignal())
|
||||
sigset_t m_signalsCaught;
|
||||
// signals for which HandleSignal() had been called (reset from
|
||||
// CheckSignal())
|
||||
sigset_t m_signalsCaught;
|
||||
|
||||
// the signal handlers
|
||||
/* WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash); */
|
||||
/* SignalHandlerHash m_signalHandlerHash; */
|
||||
// the signal handlers
|
||||
WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash);
|
||||
SignalHandlerHash m_signalHandlerHash;
|
||||
|
||||
// pipe used for wake up signal handling: if a signal arrives while we're
|
||||
// blocking for input, writing to this pipe triggers a call to our CheckSignal()
|
||||
wxWakeUpPipe *m_signalWakeUpPipe;
|
||||
};
|
||||
#endif
|
||||
|
||||
// pipe used for wake up signal handling: if a signal arrives while we're
|
||||
// blocking for input, writing to this pipe triggers a call to our CheckSignal()
|
||||
wxWakeUpPipe *m_signalWakeUpPipe;
|
||||
};
|
||||
#else
|
||||
// this has to be a class and not a typedef as we forward declare it
|
||||
class wxAppConsole : public wxAppConsoleBase { };
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ protected:
|
|||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/button.h"
|
||||
#elif defined(__WXMAC__)
|
||||
/* #include "wx/osx/button.h" */
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/button.h"
|
||||
#else
|
||||
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
|
|
@ -91,6 +93,7 @@ public:
|
|||
protected:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxButton);
|
||||
};
|
||||
#endif
|
||||
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/button.h"
|
||||
|
|
|
|||
|
|
@ -212,6 +212,9 @@ protected:
|
|||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/control.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/control.h"
|
||||
#else
|
||||
WXDLLIMPEXP_DATA_CORE(extern const char) wxControlNameStr[];
|
||||
|
||||
// General item class
|
||||
|
|
@ -247,6 +250,7 @@ public:
|
|||
|
||||
void OnKeyDown( wxKeyEvent &event ) ;
|
||||
};
|
||||
#endif
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/control.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -605,7 +605,12 @@ typedef short int WXTYPE;
|
|||
#if __has_cpp_attribute(deprecated)
|
||||
/* gcc 5 claims to support this attribute, but actually doesn't */
|
||||
#if !defined(__GNUC__) || wxCHECK_GCC_VERSION(6, 0)
|
||||
#define wxHAS_DEPRECATED_ATTR
|
||||
/* Even later gcc versions only support it when using C++11. */
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus >= 201103L
|
||||
#define wxHAS_DEPRECATED_ATTR
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -697,6 +702,43 @@ typedef short int WXTYPE;
|
|||
# define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
Some gcc versions choke on __has_cpp_attribute(gnu::visibility) due to the
|
||||
presence of the colon, but we only need this macro in C++ code, so just
|
||||
don't define it when using C.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
/*
|
||||
wxDEPRECATED_EXPORT_CORE is a special macro used for the classes that are
|
||||
exported and deprecated (but not when building the library itself, as this
|
||||
would trigger warnings about using this class when implementing it).
|
||||
|
||||
It exists because standard [[deprecated]] attribute can't be combined with
|
||||
legacy __attribute__((visibility)), but we can't use [[visibility]] instead
|
||||
of the latter because it can't be use in the same place in the declarations
|
||||
where we use WXDLLIMPEXP_CORE. So we define this special macro which uses
|
||||
the standard visibility attribute just where we can't do otherwise.
|
||||
*/
|
||||
#ifdef WXBUILDING
|
||||
#define wxDEPRECATED_EXPORT_CORE(msg) WXDLLIMPEXP_CORE
|
||||
#else /* !WXBUILDING */
|
||||
#ifdef wxHAS_DEPRECATED_ATTR
|
||||
#if __has_cpp_attribute(gnu::visibility)
|
||||
#define wxDEPRECATED_EXPORT_CORE(msg) \
|
||||
[[deprecated(msg), gnu::visibility("default")]]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef wxDEPRECATED_EXPORT_CORE
|
||||
/* Fall back when nothing special is needed or available. */
|
||||
#define wxDEPRECATED_EXPORT_CORE(msg) \
|
||||
wxDEPRECATED_MSG(msg) WXDLLIMPEXP_CORE
|
||||
#endif
|
||||
#endif /* WXBUILDING/!WXBUILDING */
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
Macros to suppress and restore gcc warnings, requires g++ >= 4.6 and don't
|
||||
do anything otherwise.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
#include "wx/control.h" // the base class
|
||||
#include "wx/dcclient.h" // for wxPaintDC
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
// Not used here any more, but still declared for backwards compatibility.
|
||||
class WXDLLIMPEXP_FWD_CORE wxComboBox;
|
||||
class WXDLLIMPEXP_FWD_CORE wxStaticText;
|
||||
class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
|
||||
|
|
@ -238,7 +240,8 @@ private:
|
|||
// show the correct controls
|
||||
void ShowCurrentControls();
|
||||
|
||||
// create the month combo and year spin controls
|
||||
// create the month choice and year spin controls: the name is misleading
|
||||
// (it should be called CreateMonthChoice()) but preserved for compatibility
|
||||
void CreateMonthComboBox();
|
||||
void CreateYearSpinCtrl();
|
||||
|
||||
|
|
@ -268,7 +271,7 @@ private:
|
|||
|
||||
// the subcontrols
|
||||
wxStaticText *m_staticMonth;
|
||||
wxComboBox *m_comboMonth;
|
||||
wxChoice *m_choiceMonth;
|
||||
|
||||
wxStaticText *m_staticYear;
|
||||
wxSpinCtrl *m_spinYear;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,8 @@ public:
|
|||
explicit wxGridCellNumberEditor(int min = -1, int max = -1)
|
||||
: wxGridCellTextEditor(),
|
||||
m_min(min),
|
||||
m_max(max)
|
||||
m_max(max),
|
||||
m_value(0L)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -213,6 +214,7 @@ public:
|
|||
: wxGridCellTextEditor(),
|
||||
m_width(width),
|
||||
m_precision(precision),
|
||||
m_value(0.0),
|
||||
m_style(format)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
41
wxheaders/wx/generic/private/drawbitmap.h
Normal file
41
wxheaders/wx/generic/private/drawbitmap.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/private/drawbitmap.h
|
||||
// Purpose: Small helper for drawing images.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2022-10-25
|
||||
// Copyright: (c) 2022 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_PRIVATE_DRAWBITMAP_H_
|
||||
#define _WX_GENERIC_PRIVATE_DRAWBITMAP_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/withimages.h"
|
||||
|
||||
// Just a trivial wrapper for wxDC::DrawBitmap() using wxWithImages: this is
|
||||
// used in several places in the generic wxListCtrl and wxTreeCtrl code.
|
||||
inline void
|
||||
wxDrawImageBitmap(wxWindow* window,
|
||||
const wxWithImages& images,
|
||||
int image,
|
||||
wxDC& dc,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
dc.DrawBitmap(images.GetImageBitmapFor(window, image),
|
||||
x, y,
|
||||
true /* use mask */);
|
||||
}
|
||||
|
||||
// Overload for the controls deriving from both wxWindow and wxWithImages, as
|
||||
// both wxListCtrl and wxTreeCtrl do.
|
||||
template <typename T>
|
||||
inline void
|
||||
wxDrawImageBitmap(T* window, int image, wxDC& dc, int x, int y)
|
||||
{
|
||||
wxDrawImageBitmap(window, *window, image, dc, x, y);
|
||||
}
|
||||
|
||||
#endif // _WX_GENERIC_PRIVATE_DRAWBITMAP_H_
|
||||
|
|
@ -640,7 +640,7 @@ public:
|
|||
void DrawImage( int index, wxDC *dc, int x, int y );
|
||||
void GetImageSize( int index, int &width, int &height ) const;
|
||||
|
||||
void SetImageList( wxImageList *imageList, int which );
|
||||
void SetImages( wxWithImages *images, const int which );
|
||||
void SetItemSpacing( int spacing, bool isSmall = false );
|
||||
int GetItemSpacing( bool isSmall = false );
|
||||
|
||||
|
|
@ -694,8 +694,9 @@ public:
|
|||
SetItem( info );
|
||||
}
|
||||
|
||||
wxImageList* GetSmallImageList() const
|
||||
{ return m_small_image_list; }
|
||||
wxWithImages* GetSmallImages() const
|
||||
{ return m_small_images; }
|
||||
|
||||
|
||||
// set the scrollbars and update the positions of the items
|
||||
void RecalculatePositions();
|
||||
|
|
@ -811,8 +812,9 @@ protected:
|
|||
bool m_dirty;
|
||||
|
||||
wxColour *m_highlightColour;
|
||||
wxImageList *m_small_image_list;
|
||||
wxImageList *m_normal_image_list;
|
||||
wxWithImages *m_small_images;
|
||||
wxWithImages *m_normal_images;
|
||||
|
||||
int m_small_spacing;
|
||||
int m_normal_spacing;
|
||||
bool m_hasFocus;
|
||||
|
|
|
|||
|
|
@ -329,6 +329,9 @@ public:
|
|||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/glcanvas.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/glcanvas.h"
|
||||
#else
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
|
|
@ -496,6 +499,7 @@ protected:
|
|||
};
|
||||
|
||||
#endif // _WX_GLCANVAS_H_
|
||||
#endif
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/glcanvas.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -633,8 +633,22 @@ static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequis
|
|||
#define GDK_KEY_KP_Subtract GDK_KP_Subtract
|
||||
#define GDK_KEY_KP_Tab GDK_KP_Tab
|
||||
#define GDK_KEY_KP_Up GDK_KP_Up
|
||||
#define GDK_KEY_Launch0 GDK_Launch0
|
||||
#define GDK_KEY_Launch1 GDK_Launch1
|
||||
#define GDK_KEY_Launch2 GDK_Launch2
|
||||
#define GDK_KEY_Launch3 GDK_Launch3
|
||||
#define GDK_KEY_Launch4 GDK_Launch4
|
||||
#define GDK_KEY_Launch5 GDK_Launch5
|
||||
#define GDK_KEY_Launch6 GDK_Launch6
|
||||
#define GDK_KEY_Launch7 GDK_Launch7
|
||||
#define GDK_KEY_Launch8 GDK_Launch8
|
||||
#define GDK_KEY_Launch9 GDK_Launch9
|
||||
#define GDK_KEY_LaunchA GDK_LaunchA
|
||||
#define GDK_KEY_LaunchB GDK_LaunchB
|
||||
#define GDK_KEY_LaunchC GDK_LaunchC
|
||||
#define GDK_KEY_LaunchD GDK_LaunchD
|
||||
#define GDK_KEY_LaunchE GDK_LaunchE
|
||||
#define GDK_KEY_LaunchF GDK_LaunchF
|
||||
#define GDK_KEY_Left GDK_Left
|
||||
#define GDK_KEY_Linefeed GDK_Linefeed
|
||||
#define GDK_KEY_Mail GDK_Mail
|
||||
|
|
|
|||
|
|
@ -214,9 +214,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -471,7 +472,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -531,9 +532,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -712,14 +712,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -742,8 +739,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -771,7 +767,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1124,8 +1120,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1133,7 +1129,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1268,13 +1264,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1298,8 +1293,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1412,20 +1405,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1567,9 +1558,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -38,10 +38,8 @@
|
|||
// At all times m_isIdentity is set if the matrix itself is an Identity matrix.
|
||||
// It is used where possible to optimize calculations.
|
||||
class
|
||||
#ifndef WXBUILDING
|
||||
wxDEPRECATED_MSG("use wxAffineMatrix2D instead")
|
||||
#endif
|
||||
WXDLLIMPEXP_CORE wxTransformMatrix: public wxObject
|
||||
wxDEPRECATED_EXPORT_CORE("use wxAffineMatrix2D instead")
|
||||
wxTransformMatrix: public wxObject
|
||||
{
|
||||
public:
|
||||
wxTransformMatrix();
|
||||
|
|
|
|||
|
|
@ -214,9 +214,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -471,7 +472,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -531,9 +532,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -712,14 +712,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -742,8 +739,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -771,7 +767,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1124,8 +1120,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1133,7 +1129,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1268,13 +1264,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1298,8 +1293,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1412,20 +1405,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1567,9 +1558,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,14 @@ protected:
|
|||
m_allowTextEvents = enable;
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 30202
|
||||
// Recreate the native control entirely while preserving its initial
|
||||
// contents and attributes: this is useful if the height of the items must
|
||||
// be changed as the native control doesn't seem to support doing this once
|
||||
// it had been already determined.
|
||||
void MSWRecreate();
|
||||
#endif // wxABI_VERSION >= 3.2.2
|
||||
|
||||
private:
|
||||
// there are the overridden wxTextEntry methods which should only be called
|
||||
// when we do have an edit control so they assert if this is not the case
|
||||
|
|
|
|||
|
|
@ -149,6 +149,9 @@ private:
|
|||
// position (which is not really supposed to ever happen).
|
||||
int MSGetMenuItemPos() const;
|
||||
|
||||
// Get the extent of the given text using the correct font.
|
||||
wxSize GetMenuTextExtent(const wxString& text) const;
|
||||
|
||||
// item bitmaps
|
||||
wxBitmapBundle m_bmpUnchecked; // (used only for checkable items)
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@
|
|||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Note that this file globally redefines "new" keyword breaking the use of
|
||||
// placement new in any code parsed after it. If you run into this problem, the
|
||||
// solutions are, in order of preference:
|
||||
//
|
||||
// 1. Don't include this header at all. Use better tools for memory debugging.
|
||||
// 2. Predefine __NO_VC_CRTDBG__ before including it (basically the same as 1).
|
||||
// 3. Do "#undef new" before and "#define new WXDEBUG_NEW" in your own code
|
||||
// before/after using placement new or before/after including third part
|
||||
// headers using it.
|
||||
|
||||
// the goal of this file is to define wxCrtSetDbgFlag() macro which may be
|
||||
// used like this:
|
||||
// wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,38 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (m_placement.showCmd != SW_SHOWMAXIMIZED && m_placement.showCmd != SW_SHOWMINIMIZED)
|
||||
{
|
||||
RECT rcWindow;
|
||||
::GetWindowRect(tlw->GetHWND(), &rcWindow);
|
||||
// Height and width should be the same unless the user performed
|
||||
// an Aero Snap operation.
|
||||
const RECT rcNormal = m_placement.rcNormalPosition;
|
||||
if ((rcWindow.bottom - rcWindow.top) != (rcNormal.bottom - rcNormal.top) ||
|
||||
(rcWindow.right - rcWindow.left) != (rcNormal.right - rcNormal.left))
|
||||
{
|
||||
WinStruct<MONITORINFO> mi;
|
||||
if (!::GetMonitorInfo(::MonitorFromWindow(tlw->GetHWND(),
|
||||
MONITOR_DEFAULTTONEAREST), &mi))
|
||||
{
|
||||
wxLogLastError("GetMonitorInfo");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the tray is on the top or the left, then the rectangle needs to
|
||||
// be adjusted to match what ::SetWindowPlacement expects.
|
||||
if (mi.rcMonitor.top < mi.rcWork.top ||
|
||||
mi.rcMonitor.left < mi.rcWork.left)
|
||||
{
|
||||
// Negative offset to eliminate the tray width/height.
|
||||
OffsetRect(&rcWindow, (mi.rcMonitor.left - mi.rcWork.left),
|
||||
(mi.rcMonitor.top - mi.rcWork.top));
|
||||
}
|
||||
|
||||
::CopyRect(&m_placement.rcNormalPosition, &rcWindow);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public:
|
|||
|
||||
bool m_initialized;
|
||||
bool m_isBusy;
|
||||
bool m_inEventCallback;
|
||||
wxString m_pendingURL;
|
||||
wxString m_pendingPage;
|
||||
int m_pendingContextMenuEnabled;
|
||||
|
|
|
|||
|
|
@ -214,9 +214,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -471,7 +472,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -531,9 +532,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -712,14 +712,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -742,8 +739,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -771,7 +767,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1124,8 +1120,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1133,7 +1129,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1268,13 +1264,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1298,8 +1293,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1412,20 +1405,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1567,9 +1558,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -17,19 +17,14 @@ public:
|
|||
// creation
|
||||
// --------
|
||||
|
||||
wxTextCtrl() { Init(); }
|
||||
wxTextCtrl();
|
||||
wxTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxTextCtrlNameStr))
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, value, pos, size, style, validator, name);
|
||||
}
|
||||
const wxString& name = wxASCII_STR(wxTextCtrlNameStr));
|
||||
virtual ~wxTextCtrl();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
|
|
|
|||
|
|
@ -169,6 +169,11 @@ protected:
|
|||
int& x, int& y,
|
||||
int& w, int& h) const wxOVERRIDE;
|
||||
|
||||
// override this one to update our icon on DPI change (not quite the same
|
||||
// thing as font, but close enough...)
|
||||
virtual void MSWUpdateFontOnDPIChange(const wxSize& newDPI) wxOVERRIDE;
|
||||
|
||||
|
||||
// This field contains the show command to use when showing the window the
|
||||
// next time and also indicates whether the window should be considered
|
||||
// being iconized or maximized (which may be different from whether it's
|
||||
|
|
@ -195,6 +200,10 @@ protected:
|
|||
wxWindowRef m_winLastFocused;
|
||||
|
||||
private:
|
||||
// Part of SetIcons() actually updating the window icons.
|
||||
void DoSetIcons();
|
||||
|
||||
|
||||
// The system menu: initially NULL but can be set (once) by
|
||||
// MSWGetSystemMenu(). Owned by this window.
|
||||
wxMenu *m_menuSystem;
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ public:
|
|||
|
||||
virtual bool SetUserAgent(const wxString& userAgent) wxOVERRIDE;
|
||||
|
||||
virtual bool RunScript(const wxString& javascript, wxString* output = NULL) const wxOVERRIDE;
|
||||
virtual void RunScriptAsync(const wxString& javascript, void* clientData = NULL) const wxOVERRIDE;
|
||||
virtual bool AddScriptMessageHandler(const wxString& name) wxOVERRIDE;
|
||||
virtual bool RemoveScriptMessageHandler(const wxString& name) wxOVERRIDE;
|
||||
|
|
|
|||
|
|
@ -106,22 +106,11 @@ wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp"
|
|||
#endif
|
||||
|
||||
#if !defined(wxUSE_DPI_AWARE_MANIFEST) || wxUSE_DPI_AWARE_MANIFEST == 0
|
||||
#define wxMANIFEST_DPI .manifest
|
||||
#define wxMANIFEST_FILE "wx/msw/wx.manifest"
|
||||
#elif wxUSE_DPI_AWARE_MANIFEST == 1
|
||||
#define wxMANIFEST_DPI _dpi_aware.manifest
|
||||
#define wxMANIFEST_FILE "wx/msw/wx_dpi_aware.manifest"
|
||||
#elif wxUSE_DPI_AWARE_MANIFEST == 2
|
||||
#define wxMANIFEST_DPI _dpi_aware_pmv2.manifest
|
||||
#endif
|
||||
|
||||
#define wxRC_STR(text) wxRC_STR2(text)
|
||||
#define wxRC_STR2(text) #text
|
||||
#define wxRC_CONCAT(a, b) wxRC_CONCAT2(a, b)
|
||||
#define wxRC_CONCAT2(a, b) a ## b
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define wxMANIFEST_FILE "wx/msw/wx" wxRC_STR(wxMANIFEST_DPI)
|
||||
#else
|
||||
#define wxMANIFEST_FILE wxRC_CONCAT(wx/msw/wx, wxMANIFEST_DPI)
|
||||
#define wxMANIFEST_FILE "wx/msw/wx_dpi_aware_pmv2.manifest"
|
||||
#endif
|
||||
wxMANIFEST_ID RT_MANIFEST wxMANIFEST_FILE
|
||||
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@
|
|||
|
||||
#define PACKAGE_BUGREPORT "wx-dev@googlegroups.com"
|
||||
#define PACKAGE_NAME "wxWidgets"
|
||||
#define PACKAGE_STRING "wxWidgets 3.2.1"
|
||||
#define PACKAGE_STRING "wxWidgets 3.2.2"
|
||||
#define PACKAGE_TARNAME "wxwidgets"
|
||||
#define PACKAGE_VERSION "3.2.1"
|
||||
#define PACKAGE_VERSION "3.2.2"
|
||||
|
||||
// for jpeg
|
||||
|
||||
|
|
|
|||
|
|
@ -220,9 +220,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -477,7 +478,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -537,9 +538,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -718,14 +718,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -748,8 +745,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -777,7 +773,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1130,8 +1126,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1139,7 +1135,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1274,13 +1270,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1304,8 +1299,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1418,20 +1411,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1573,9 +1564,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -169,8 +169,8 @@ public:
|
|||
// sometimes decorations make the client area smaller
|
||||
virtual wxPoint GetClientAreaOrigin() const wxOVERRIDE;
|
||||
|
||||
wxWindowMac *FindItem(long id) const;
|
||||
wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
||||
/* wxWindowMac *FindItem(long id) const; */
|
||||
/* wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const; */
|
||||
|
||||
virtual void TriggerScrollEvent( wxEventType scrollEvent ) ;
|
||||
// this should not be overridden in classes above wxWindowMac
|
||||
|
|
|
|||
|
|
@ -177,6 +177,9 @@ private:
|
|||
#include "wx/msw/panel.h"
|
||||
#else
|
||||
#define wxHAS_GENERIC_PANEL
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/generic/panelg.h"
|
||||
#else
|
||||
#ifndef _WX_GENERIC_PANELG_H_
|
||||
#define _WX_GENERIC_PANELG_H_
|
||||
|
||||
|
|
@ -216,5 +219,6 @@ private:
|
|||
|
||||
#endif // _WX_GENERIC_PANELG_H_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // _WX_PANELH_BASE_
|
||||
|
|
|
|||
|
|
@ -33,38 +33,42 @@ public:
|
|||
};
|
||||
|
||||
wxJSScriptWrapper(const wxString& js, OutputType outputType)
|
||||
: m_escapedCode(js), m_outputType(outputType)
|
||||
: m_outputType(outputType)
|
||||
{
|
||||
// Adds one escape level.
|
||||
const char *charsNeededToBeEscaped = "\\\"\n\r\v\t\b\f";
|
||||
for (
|
||||
size_t pos = m_escapedCode.find_first_of(charsNeededToBeEscaped, 0);
|
||||
pos != wxString::npos;
|
||||
pos = m_escapedCode.find_first_of(charsNeededToBeEscaped, pos)
|
||||
) {
|
||||
switch (m_escapedCode[pos].GetValue())
|
||||
m_escapedCode.reserve(js.size());
|
||||
for (wxString::const_iterator it = js.begin(); it != js.end(); ++it)
|
||||
{
|
||||
if (wxStrchr(charsNeededToBeEscaped, *it))
|
||||
{
|
||||
case 0x0A: // '\n'
|
||||
m_escapedCode[pos] = 'n';
|
||||
break;
|
||||
case 0x0D: // '\r'
|
||||
m_escapedCode[pos] = 'r';
|
||||
break;
|
||||
case 0x0B: // '\v'
|
||||
m_escapedCode[pos] = 'v';
|
||||
break;
|
||||
case 0x09: // '\t'
|
||||
m_escapedCode[pos] = 't';
|
||||
break;
|
||||
case 0x08: // '\b'
|
||||
m_escapedCode[pos] = 'b';
|
||||
break;
|
||||
case 0x0C: // '\f'
|
||||
m_escapedCode[pos] = 'f';
|
||||
break;
|
||||
m_escapedCode += '\\';
|
||||
switch ((wxChar) *it)
|
||||
{
|
||||
case 0x0A: // '\n'
|
||||
m_escapedCode += 'n';
|
||||
break;
|
||||
case 0x0D: // '\r'
|
||||
m_escapedCode += 'r';
|
||||
break;
|
||||
case 0x0B: // '\v'
|
||||
m_escapedCode += 'v';
|
||||
break;
|
||||
case 0x09: // '\t'
|
||||
m_escapedCode += 't';
|
||||
break;
|
||||
case 0x08: // '\b'
|
||||
m_escapedCode += 'b';
|
||||
break;
|
||||
case 0x0C: // '\f'
|
||||
m_escapedCode += 'f';
|
||||
break;
|
||||
default:
|
||||
m_escapedCode += *it;
|
||||
}
|
||||
}
|
||||
m_escapedCode.insert(pos, '\\');
|
||||
pos += 2;
|
||||
else
|
||||
m_escapedCode += *it;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "wx/window.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapBundle;
|
||||
class WXDLLIMPEXP_FWD_PROPGRID wxPGCell;
|
||||
class WXDLLIMPEXP_FWD_PROPGRID wxPGProperty;
|
||||
class WXDLLIMPEXP_FWD_PROPGRID wxPropertyGrid;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[];
|
|||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/radiobut.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/radiobut.h"
|
||||
#else
|
||||
#ifndef _WX_RADIOBUT_H_
|
||||
#define _WX_RADIOBUT_H_
|
||||
|
||||
|
|
@ -146,6 +149,7 @@ public:
|
|||
|
||||
#endif
|
||||
// _WX_RADIOBUT_H_
|
||||
#endif
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/radiobut.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
class wxSockAddressImpl;
|
||||
|
|
|
|||
|
|
@ -210,9 +210,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -467,7 +468,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -527,9 +528,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -708,14 +708,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -738,8 +735,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -767,7 +763,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1120,8 +1116,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1129,7 +1125,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1264,13 +1260,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1294,8 +1289,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1408,20 +1401,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1563,9 +1554,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,25 @@
|
|||
#include "wx/containr.h"
|
||||
#include "wx/vector.h"
|
||||
|
||||
// Hack to work around problems with wxNavigationEnabled<wxBookCtrlBase> when
|
||||
// using wx as DLL: we want the compiler to see that it's already available in
|
||||
// the DLL by including some other DLL exported class using it as the base in
|
||||
// order to prevent it from generating a non-DLL-exported instantiation which
|
||||
// will conflict with the one in the DLL at the link-time.
|
||||
//
|
||||
// Find the first available class using wxNavigationEnabled<wxBookCtrlBase> as
|
||||
// base, any will do (except for wxAUI one, as this would create a dependency
|
||||
// on the AUI library that we can't have here).
|
||||
#if wxUSE_CHOICEBOOK
|
||||
#include "wx/choicebk.h"
|
||||
#elif wxUSE_LISTBOOK
|
||||
#include "wx/listbook.h"
|
||||
#elif wxUSE_TOOLBOOK
|
||||
#include "wx/toolbook.h"
|
||||
#elif wxUSE_TREEBOOK
|
||||
#include "wx/treebook.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSimplebook: a book control without any user-actionable controller.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ protected:
|
|||
#if defined(__WINDOWS__)
|
||||
#include "wx/msw/sound.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/sound.h"
|
||||
#else
|
||||
#ifndef _WX_SOUND_H_
|
||||
#define _WX_SOUND_H_
|
||||
|
||||
|
|
@ -122,6 +125,7 @@ private:
|
|||
wxDECLARE_NO_COPY_CLASS(wxSound);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
// _WX_SOUND_H_
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ protected:
|
|||
// of this thread.
|
||||
virtual void *Entry() = 0;
|
||||
|
||||
// use this to call the Entry() virtual method
|
||||
// obsolete private function calling Entry(), do not use.
|
||||
void *CallEntry();
|
||||
|
||||
// Callbacks which may be overridden by the derived class to perform some
|
||||
|
|
|
|||
|
|
@ -342,16 +342,14 @@ wxSemaError wxSemaphore::Post()
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include "wx/private/threadinfo.h"
|
||||
#include "wx/scopeguard.h"
|
||||
|
||||
void wxThread::Sleep(unsigned long milliseconds)
|
||||
{
|
||||
wxMilliSleep(milliseconds);
|
||||
}
|
||||
|
||||
// This function exists only for backwards compatibility, don't call it.
|
||||
void *wxThread::CallEntry()
|
||||
{
|
||||
wxON_BLOCK_EXIT0(wxThreadSpecificInfo::ThreadCleanUp);
|
||||
return Entry();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,12 +158,20 @@ public:
|
|||
// its dtor is not virtual.
|
||||
~wxUILocale();
|
||||
|
||||
#if wxABI_VERSION >= 30202
|
||||
// Return the locale ID representing the default system locale, which would
|
||||
// be set is UseDefault() is called.
|
||||
static wxLocaleIdent GetSystemLocaleId();
|
||||
#endif // wxABI_VERSION >= 3.2.2
|
||||
|
||||
// Try to get user's (or OS's) preferred language setting.
|
||||
// Return wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed
|
||||
// Prefer using GetSystemLocaleId() above.
|
||||
static int GetSystemLanguage();
|
||||
|
||||
// Try to get user's (or OS's) default locale setting.
|
||||
// Return wxLANGUAGE_UNKNOWN if the locale-guessing algorithm failed
|
||||
// Prefer using GetSystemLocaleId() above.
|
||||
static int GetSystemLocale();
|
||||
|
||||
// Try to retrieve a list of user's (or OS's) preferred UI languages.
|
||||
|
|
|
|||
|
|
@ -213,9 +213,10 @@
|
|||
|
||||
// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
|
||||
//
|
||||
// Default is 0
|
||||
// This feature is incomplete and experimental, please only enable it if
|
||||
// you want to participate in its development.
|
||||
//
|
||||
// Recommended setting: 0 (this is still work in progress...)
|
||||
// Recommended setting: 0 (unless you wish to try working on it).
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
||||
// Support for message/error logging. This includes wxLogXXX() functions and
|
||||
|
|
@ -470,7 +471,7 @@
|
|||
// wxFileConfig
|
||||
#define wxUSE_TEXTFILE 1
|
||||
|
||||
// i18n support: _() macro, wxLocale class. Requires wxTextFile.
|
||||
// i18n support: _() macro, wxLocale class.
|
||||
#define wxUSE_INTL 1
|
||||
|
||||
// Provide wxFoo_l() functions similar to standard foo() functions but taking
|
||||
|
|
@ -530,9 +531,8 @@
|
|||
#define wxUSE_CONFIG 1
|
||||
|
||||
// If wxUSE_CONFIG is 1, you may choose to use either the native config
|
||||
// classes under Windows (using .INI files under Win16 and the registry under
|
||||
// Win32) or the portable text file format used by the config classes under
|
||||
// Unix.
|
||||
// classes under Windows (using the registry) or the portable text file
|
||||
// format used by the config classes under Unix.
|
||||
//
|
||||
// Default is 1 to use native classes. Note that you may still use
|
||||
// wxFileConfig even if you set this to 1 - just the config object created by
|
||||
|
|
@ -711,14 +711,11 @@
|
|||
// or your compiler cannot for some reason cope with complexity of templates used.
|
||||
#define wxUSE_ANY 1
|
||||
|
||||
// Support for regular expression matching via wxRegEx class: enable this to
|
||||
// use POSIX regular expressions in your code. You need to compile regex
|
||||
// library from src/regex to use it under Windows.
|
||||
// Support for regular expression matching via wxRegEx class.
|
||||
//
|
||||
// Default is 0
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if your compiler supports it, if it doesn't please
|
||||
// contribute us a makefile for src/regex for it
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_REGEX 1
|
||||
|
||||
// wxSystemOptions class
|
||||
|
|
@ -741,8 +738,7 @@
|
|||
// Recommended setting: 1 (requires wxUSE_XML)
|
||||
#define wxUSE_XRC 1
|
||||
|
||||
// XML parsing classes. Note that their API will change in the future, so
|
||||
// using wxXmlDocument and wxXmlNode in your app is not recommended.
|
||||
// XML parsing classes.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -770,7 +766,7 @@
|
|||
// Recommended setting: 1
|
||||
#define wxUSE_PROPGRID 1
|
||||
|
||||
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
|
||||
// Use wxStyledTextCtrl, a wxWidgets Scintilla wrapper.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
|
|
@ -1123,8 +1119,8 @@
|
|||
#define wxUSE_ARTPROVIDER_STD 1
|
||||
|
||||
// Use art provider providing Tango icons: this art provider has higher quality
|
||||
// icons than the default ones using smaller size XPM icons without
|
||||
// transparency but the embedded PNG icons add to the library size.
|
||||
// icons than the default one. It uses SVG format which allows much better scaling
|
||||
// then when bitmaps are used, at the expense of somewhat larger library size.
|
||||
//
|
||||
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
|
||||
// the GTK+ stock icons replaces it so it is normally not necessary.
|
||||
|
|
@ -1132,7 +1128,7 @@
|
|||
// Recommended setting: 1 but can be turned off to reduce the library size.
|
||||
#define wxUSE_ARTPROVIDER_TANGO 1
|
||||
|
||||
// Hotkey support (currently Windows only)
|
||||
// Hotkey support (currently Windows and macOS only)
|
||||
#define wxUSE_HOTKEY 1
|
||||
|
||||
// Use wxCaret: a class implementing a "cursor" in a text control (called caret
|
||||
|
|
@ -1267,13 +1263,12 @@
|
|||
// common dialogs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
|
||||
// file selector, printer dialog). Switching this off also switches off the
|
||||
// printing architecture and interactive wxPrinterDC.
|
||||
// Use common dialogs (e.g. file selector, printer dialog). Switching this off
|
||||
// also switches off the printing architecture and interactive wxPrinterDC.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1 (unless it really doesn't work)
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_COMMON_DIALOGS 1
|
||||
|
||||
// wxBusyInfo displays window with message when app is busy. Works in same way
|
||||
|
|
@ -1297,8 +1292,6 @@
|
|||
// wxDirDlg class for getting a directory name from user
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
// TODO: setting to choose the generic or native one
|
||||
|
||||
// Use file open/save dialogs.
|
||||
//
|
||||
// Default is 1
|
||||
|
|
@ -1411,20 +1404,18 @@
|
|||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
|
||||
// much more.
|
||||
// wxHTML allows displaying simple HTML.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
|
||||
// smaller library.
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_HTML 1
|
||||
|
||||
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
|
||||
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
|
||||
// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
|
||||
// list of libraries used to link your application (although this is done
|
||||
// implicitly for Microsoft Visual C++ users).
|
||||
// list of libraries used to link your application when linking to wxWidgets
|
||||
// statically (although this is done implicitly for Microsoft Visual C++ users).
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
|
|
@ -1566,9 +1557,10 @@
|
|||
// disabled if you don't plan to use images in such format sometimes saving
|
||||
// substantial amount of code in the final library.
|
||||
//
|
||||
// Some formats require an extra library which is included in wxWin sources
|
||||
// which is mentioned if it is the case.
|
||||
|
||||
// Some formats require an extra library (e.g. libpng) which is always included in
|
||||
// wxWidgets sources but some build systems (cmake, configure) can be configured to
|
||||
// to use the system or user-provided version.
|
||||
//
|
||||
// Set to 1 for wxImage support (recommended).
|
||||
#define wxUSE_IMAGE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ private:
|
|||
|
||||
// the global/default versions of the above
|
||||
static EGLConfig *ms_glEGLConfig;
|
||||
|
||||
friend void wxEGLUpdatePosition(wxGLCanvasEGL* win);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems,
|
|||
|
||||
#endif // !wxQSORT_DECLARED
|
||||
|
||||
// Fix using placement new in case it was redefined by wx/msw/msvcrt.h.
|
||||
#ifdef WXDEBUG_NEW
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
namespace wxPrivate
|
||||
{
|
||||
|
||||
|
|
@ -715,6 +720,11 @@ inline bool wxVectorContains(const wxVector<T>& v, const T& obj)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Redefine if it we undefined it above.
|
||||
#ifdef WXDEBUG_NEW
|
||||
#define new WXDEBUG_NEW
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
|
||||
|
||||
// Define vector::shrink_to_fit() equivalent which can be always used, even
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
/* NB: this file is parsed by automatic tools so don't change its format! */
|
||||
#define wxMAJOR_VERSION 3
|
||||
#define wxMINOR_VERSION 2
|
||||
#define wxRELEASE_NUMBER 1
|
||||
#define wxRELEASE_NUMBER 2
|
||||
#define wxSUBRELEASE_NUMBER 0
|
||||
#define wxVERSION_STRING wxT("wxWidgets 3.2.1")
|
||||
#define wxVERSION_STRING wxT("wxWidgets 3.2.2")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -354,6 +354,18 @@ typedef void (wxEvtHandler::*wxWebViewEventFunction)
|
|||
wx__DECLARE_EVT1(wxEVT_WEBVIEW_TITLE_CHANGED, id, \
|
||||
wxWebViewEventHandler(fn))
|
||||
|
||||
#define EVT_WEBVIEW_FULLSCREEN_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_WEBVIEW_FULLSCREEN_CHANGED, id, \
|
||||
wxWebViewEventHandler(fn))
|
||||
|
||||
#define EVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, id, \
|
||||
wxWebViewEventHandler(fn))
|
||||
|
||||
#define EVT_WEBVIEW_SCRIPT_RESULT(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_WEBVIEW_SCRIPT_RESULT, id, \
|
||||
wxWebViewEventHandler(fn))
|
||||
|
||||
// old wxEVT_COMMAND_* constants
|
||||
#define wxEVT_COMMAND_WEBVIEW_NAVIGATING wxEVT_WEBVIEW_NAVIGATING
|
||||
#define wxEVT_COMMAND_WEBVIEW_NAVIGATED wxEVT_WEBVIEW_NAVIGATED
|
||||
|
|
|
|||
|
|
@ -175,6 +175,11 @@ extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
|
|||
class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
enum WindowOrder
|
||||
{
|
||||
OrderBefore, // insert before the given window
|
||||
OrderAfter // insert after the given window
|
||||
};
|
||||
// creating the window
|
||||
// -------------------
|
||||
|
||||
|
|
@ -1719,12 +1724,6 @@ protected:
|
|||
virtual bool TryBefore(wxEvent& event) wxOVERRIDE;
|
||||
virtual bool TryAfter(wxEvent& event) wxOVERRIDE;
|
||||
|
||||
enum WindowOrder
|
||||
{
|
||||
OrderBefore, // insert before the given window
|
||||
OrderAfter // insert after the given window
|
||||
};
|
||||
|
||||
// common part of GetPrev/NextSibling()
|
||||
wxWindow *DoGetSibling(WindowOrder order) const;
|
||||
|
||||
|
|
@ -2107,30 +2106,246 @@ inline void wxWindowBase::SetInitialBestSize(const wxSize& size)
|
|||
#define wxWindowMac wxWindow
|
||||
#endif // wxUniv
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/osx/window.h"
|
||||
#include "wx/osx/window.h"
|
||||
#else
|
||||
class wxWindow: public wxWindowBase {
|
||||
#ifndef _WX_WINDOW_H_
|
||||
#define _WX_WINDOW_H_
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxWindow);
|
||||
#include "wx/brush.h"
|
||||
#include "wx/dc.h"
|
||||
|
||||
friend class wxDC;
|
||||
friend class wxPaintDC;
|
||||
class WXDLLIMPEXP_FWD_CORE wxButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxScrollBar;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPanel;
|
||||
class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow;
|
||||
|
||||
public:
|
||||
wxWindowMac();
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
class WXDLLIMPEXP_FWD_CORE wxWidgetImpl ;
|
||||
typedef wxWidgetImpl wxOSXWidgetImpl;
|
||||
#endif
|
||||
|
||||
wxWindowMac( wxWindowMac *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxPanelNameStr) );
|
||||
|
||||
virtual ~wxWindowMac();
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindow);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
class WXDLLIMPEXP_CORE wxWindow: public wxWindowBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxWindow);
|
||||
|
||||
friend class wxDC;
|
||||
friend class wxPaintDC;
|
||||
|
||||
public:
|
||||
wxWindow();
|
||||
|
||||
wxWindow( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxPanelNameStr) );
|
||||
|
||||
virtual ~wxWindow();
|
||||
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxPanelNameStr) );
|
||||
|
||||
virtual void SendSizeEvent(int flags = 0) wxOVERRIDE;
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void SetLabel( const wxString& label ) wxOVERRIDE;
|
||||
virtual wxString GetLabel() const wxOVERRIDE;
|
||||
|
||||
virtual void Raise() wxOVERRIDE;
|
||||
virtual void Lower() wxOVERRIDE;
|
||||
|
||||
virtual bool Show( bool show = true ) wxOVERRIDE;
|
||||
virtual bool ShowWithEffect(wxShowEffect effect,
|
||||
unsigned timeout = 0) wxOVERRIDE
|
||||
{
|
||||
return OSXShowWithEffect(true, effect, timeout);
|
||||
}
|
||||
virtual bool HideWithEffect(wxShowEffect effect,
|
||||
unsigned timeout = 0) wxOVERRIDE
|
||||
{
|
||||
return OSXShowWithEffect(false, effect, timeout);
|
||||
}
|
||||
|
||||
virtual void SetFocus() wxOVERRIDE;
|
||||
|
||||
virtual void WarpPointer( int x, int y ) wxOVERRIDE;
|
||||
virtual bool EnableTouchEvents(int eventsMask) wxOVERRIDE;
|
||||
|
||||
virtual void Refresh( bool eraseBackground = true,
|
||||
const wxRect *rect = NULL ) wxOVERRIDE;
|
||||
|
||||
virtual void Update() wxOVERRIDE;
|
||||
virtual void ClearBackground() wxOVERRIDE;
|
||||
|
||||
virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE;
|
||||
virtual bool SetFont( const wxFont &font ) wxOVERRIDE;
|
||||
virtual bool SetBackgroundColour( const wxColour &colour ) wxOVERRIDE;
|
||||
virtual bool SetForegroundColour( const wxColour &colour ) wxOVERRIDE;
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
|
||||
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE;
|
||||
|
||||
virtual int GetCharHeight() const wxOVERRIDE;
|
||||
virtual int GetCharWidth() const wxOVERRIDE;
|
||||
|
||||
public:
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = true ) wxOVERRIDE;
|
||||
virtual void SetScrollPos( int orient, int pos, bool refresh = true ) wxOVERRIDE;
|
||||
virtual int GetScrollPos( int orient ) const wxOVERRIDE;
|
||||
virtual int GetScrollThumb( int orient ) const wxOVERRIDE;
|
||||
virtual int GetScrollRange( int orient ) const wxOVERRIDE;
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = NULL ) wxOVERRIDE;
|
||||
virtual void AlwaysShowScrollbars(bool horz = true, bool vert = true) wxOVERRIDE;
|
||||
virtual bool IsScrollbarAlwaysShown(int orient) const wxOVERRIDE
|
||||
{
|
||||
return orient == wxHORIZONTAL ? m_hScrollBarAlwaysShown
|
||||
: m_vScrollBarAlwaysShown;
|
||||
}
|
||||
|
||||
virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetDPI() const wxOVERRIDE;
|
||||
virtual double GetDPIScaleFactor() const wxOVERRIDE;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
|
||||
|
||||
#endif
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// simple accessors
|
||||
// ----------------
|
||||
|
||||
virtual WXWidget GetHandle() const wxOVERRIDE;
|
||||
|
||||
virtual bool SetTransparent(wxByte alpha) wxOVERRIDE;
|
||||
virtual bool CanSetTransparent() wxOVERRIDE;
|
||||
virtual wxByte GetTransparent() const;
|
||||
|
||||
// event handlers
|
||||
// --------------
|
||||
|
||||
void OnMouseEvent( wxMouseEvent &event );
|
||||
void OnDPIChanged( wxDPIChangedEvent& event );
|
||||
|
||||
virtual bool AcceptsFocus() const wxOVERRIDE;
|
||||
virtual void EnableVisibleFocus(bool enabled) wxOVERRIDE;
|
||||
|
||||
virtual bool IsDoubleBuffered() const wxOVERRIDE { return true; }
|
||||
|
||||
public:
|
||||
// For implementation purposes:
|
||||
// sometimes decorations make the client area smaller
|
||||
virtual wxPoint GetClientAreaOrigin() const wxOVERRIDE;
|
||||
|
||||
virtual void TriggerScrollEvent( wxEventType scrollEvent ) ;
|
||||
// this should not be overridden in classes above wxWindowMac
|
||||
// because it is called from its destructor via DeleteChildren
|
||||
virtual void RemoveChild( wxWindowBase *child ) wxOVERRIDE;
|
||||
|
||||
// optimization to avoid creating a user pane in wxWindow::Create if we already know
|
||||
// we will replace it with our own peer
|
||||
void DontCreatePeer();
|
||||
|
||||
// return true unless DontCreatePeer() had been called
|
||||
bool ShouldCreatePeer() const;
|
||||
|
||||
bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; }
|
||||
|
||||
double GetContentScaleFactor() const wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
// For controls like radio buttons which are genuinely composite
|
||||
wxList m_subControls;
|
||||
|
||||
// the peer object, allowing for cleaner API support
|
||||
|
||||
void * m_cgContextRef ;
|
||||
|
||||
mutable bool m_cachedClippedRectValid ;
|
||||
mutable wxRect m_cachedClippedRectWithOuterStructure ;
|
||||
mutable wxRect m_cachedClippedRect ;
|
||||
mutable wxRect m_cachedClippedClientRect ;
|
||||
mutable wxRegion m_cachedClippedRegionWithOuterStructure ;
|
||||
mutable wxRegion m_cachedClippedRegion ;
|
||||
mutable wxRegion m_cachedClippedClientRegion ;
|
||||
|
||||
// insets of the mac control from the wx top left corner
|
||||
wxPoint m_macTopLeftInset ;
|
||||
wxPoint m_macBottomRightInset ;
|
||||
wxByte m_macAlpha ;
|
||||
|
||||
wxScrollBar* m_hScrollBar ;
|
||||
wxScrollBar* m_vScrollBar ;
|
||||
bool m_hScrollBarAlwaysShown;
|
||||
bool m_vScrollBarAlwaysShown;
|
||||
wxWindow* m_growBox ;
|
||||
wxString m_label ;
|
||||
|
||||
bool m_isNativeWindowWrapper;
|
||||
|
||||
// set to true if we do a sharp clip at the content area of this window
|
||||
// must be dynamic as eg a panel normally is not clipping precisely, but if
|
||||
// it becomes the target window of a scrolled window it has to...
|
||||
bool m_clipChildren ;
|
||||
|
||||
// implement the base class pure virtuals
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL ) const wxOVERRIDE;
|
||||
|
||||
virtual void DoEnable( bool enable ) wxOVERRIDE;
|
||||
#if wxUSE_MENUS
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) wxOVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual void DoFreeze() wxOVERRIDE;
|
||||
virtual void DoThaw() wxOVERRIDE;
|
||||
|
||||
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
||||
virtual wxSize DoGetSizeFromClientSize( const wxSize & size ) const;
|
||||
virtual void DoClientToScreen( int *x, int *y ) const wxOVERRIDE;
|
||||
virtual void DoScreenToClient( int *x, int *y ) const wxOVERRIDE;
|
||||
virtual void DoGetPosition( int *x, int *y ) const wxOVERRIDE;
|
||||
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
|
||||
virtual void DoGetClientSize( int *width, int *height ) const wxOVERRIDE;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
|
||||
virtual void DoSetClientSize(int width, int height) wxOVERRIDE;
|
||||
|
||||
virtual void DoCaptureMouse() wxOVERRIDE;
|
||||
virtual void DoReleaseMouse() wxOVERRIDE;
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize() and would usually just call
|
||||
// ::MoveWindow() except for composite controls which will want to arrange
|
||||
// themselves inside the given rectangle
|
||||
virtual void DoMoveWindow( int x, int y, int width, int height ) wxOVERRIDE;
|
||||
virtual void DoSetWindowVariant( wxWindowVariant variant ) wxOVERRIDE;
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip ) wxOVERRIDE;
|
||||
#endif
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindow);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif // _WX_WINDOW_H_
|
||||
#endif
|
||||
|
||||
#elif defined(__WXQT__)
|
||||
|
|
|
|||
|
|
@ -129,6 +129,70 @@ public:
|
|||
return m_imageList;
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 30202
|
||||
// Return logical size of the image to use or (0, 0) if there are none.
|
||||
wxSize GetImageLogicalSize(const wxWindow* window, int iconIndex) const
|
||||
{
|
||||
wxSize size;
|
||||
|
||||
if ( iconIndex != NO_IMAGE )
|
||||
{
|
||||
if ( !m_images.empty() )
|
||||
{
|
||||
size = m_images.at(iconIndex).GetPreferredLogicalSizeFor(window);
|
||||
}
|
||||
else if ( m_imageList )
|
||||
{
|
||||
// All images in the image list are of the same size.
|
||||
size = m_imageList->GetSize();
|
||||
}
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
// Overload provided to facilitate transition from the existing code using
|
||||
// wxImageList::GetSize() -- don't use it in the new code.
|
||||
void GetImageLogicalSize(const wxWindow* window, int iconIndex,
|
||||
int& width, int& height) const
|
||||
{
|
||||
const wxSize size = GetImageLogicalSize(window, iconIndex);
|
||||
width = size.x;
|
||||
height = size.y;
|
||||
}
|
||||
|
||||
// Return the bitmap to use at the current DPI of the given window.
|
||||
//
|
||||
// If index == NO_IMAGE, just returns wxNullBitmap.
|
||||
wxBitmap GetImageBitmapFor(const wxWindow* window, int iconIndex) const
|
||||
{
|
||||
wxBitmap bitmap;
|
||||
|
||||
if ( iconIndex != NO_IMAGE )
|
||||
{
|
||||
if ( !m_images.empty() )
|
||||
{
|
||||
bitmap = m_images.at(iconIndex).GetBitmapFor(window);
|
||||
}
|
||||
else if ( m_imageList )
|
||||
{
|
||||
bitmap = m_imageList->GetBitmap(iconIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG
|
||||
(
|
||||
"Image index specified, but there are no images.\n"
|
||||
"\n"
|
||||
"Did you forget to call SetImages()?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
#endif // wxABI_VERSION >= 3.2.2
|
||||
|
||||
protected:
|
||||
// This function is called when the images associated with the control
|
||||
// change, due to either SetImages() or SetImageList() being called.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue