This function is not MSW-specific and should be used in generic implementation
of controls such as wxListCtrl, wxTreeCtrl and wxDataViewCtrl. Even if it is
needed by MSW only now, move it to the common code to avoid #ifdefs in these
controls code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Because Windows uses margins around the text drawn in the status bar, naively
setting a field width to the size of the text didn't work (see previous
commit for an example). As this seems a natural enough thing to do, account
for this margin inside wxStatusBar itself to avoid the user code the trouble
of having to call some special function to do it. Notice that this does mean
that fields not containing text may be slightly larger than needed, but we
consider that this (rarer) case is less important.
Also account correctly for the status bar grip size. And while we still hard
code its size, do it in a clearly named function instead of using completely
mysterious constants here and there.
Closes#10696.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If wxMDIParentFrame object was created without its Create() ever being called,
it crashed in its dtor trying to delete an uninitialized pointer, so do
initialize it to NULL in all ctors (via a helper Init() method, as usual).
Closes#11216.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxUSE_RIBBON was apparently added to the different wx/*/setup.h files manually
instead of being added to wx/setup_inc.h and regenerating the rest, correct it.
Also check that it is defined in wx/chkconf.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under Unix wxDEBUG_LEVEL can be set using configure --enable-debug=max option
but under Windows it needs to be changed in wx/msw/setup.h so add it to this
file with a comment explaining its meaning.
Also document this symbol with the other preprocessor constants.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By default include assertions and debug logging in both debug and release
builds but disable them in application release builds (when NDEBUG is
defined).
Also update (more accurately, replace) debugging overview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The default colours for this control are wxTextCtrl-like and not wxButton-like
(which is the default). Override GetDefaultAttributes() to indicate this and
to avoid returning a wrong background from wxControl::DoMSWControlColor() when
just a foreground is set.
See #1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows the code in wxWindowMSW::HandleCtlColor() to find the correct
control when handling the messages from the buddy control and hence setting
the colours for wxSpinCtrl works after this change.
Closes#1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only deselect the items when the mouse is released if really necessary: add a
flag indicating when it is instead of trying to deduce it in the mouse up
handler.
Closes#11099 (thanks to Jonathan Liu).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only restrict input to wxMSW wxSpinCtrl to digits only if it doesn't support
negative values, otherwise the user can't enter any negative numbers. As there
is no built in support for entering digits and minus sign only, simply allow
all characters to be used if the negative numbers must indeed be possible to
enter.
Closes#11082.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is huge but there are no non-white-space changes in it.
Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function allows to get the location of Windows shell special folders not
covered by wxStandardPaths methods (yet), e.g. CSIDL_DESKTOPDIRECTORY.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calls to SetStatusText() in between Push/PopStatusText() were simply lost
before, now the text explicitly changed by SetStatusText() is preserved by the
next call to PopStatusText().
This required adding a new virtual method, called DoUpdateStatusText(), which
is now implemented in all the derived classes instead of overriding
SetStatusText() (on the bright side, it doesn't need to do any checks already
done in the base class any more).
Also fix PushStatusText() to actually show the text being pushed at all under
wxMSW as a side effect.
And further reduce code duplication between wxStatusBarBase and the derived
classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is necessary in order to define wxVector<wxDataFormat> at least when
wxVector is std::vector (as in wxUSE_STL==1 build) because vectors of
incomplete types can't be used.
Also removed inclusions of this and other unneeded headers from MSW and OS X
headers and removed a hopefully out of date comment about Mac code being wx
1.xx-based from the latter.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DoGetClientBestSize() returns the best size of the client area, without
accounting for the border which is done by GetBestSize() itself and
DoGetBorderSize() called from it.
Use DoGetClientBestSize() in wxStaticText (where it was done
insideDoGetBestSize() before) and in wxListBox, to fix its height calculation.
Also use correct height of listbox items as returned by the control itself
instead of trying to guess it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775