Wx files working
This commit is contained in:
parent
c417beda6d
commit
30cb0f8f63
54 changed files with 3157 additions and 5197 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue