Commit Graph

2504 Commits

Author SHA1 Message Date
Vadim Zeitlin
0534259ab8 Move wxControl::GetCompositeControlsDefaultAttributes() from MSW to common.
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
2009-09-26 16:43:06 +00:00
Julian Smart
082e5b9856 Applied patch #11078 - DEVMODE creation in wxWindowsPrintNativeData::TransferFrom plus SetQuality to dpi
by Martin Perktold


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:54:25 +00:00
Julian Smart
da89830af4 Applied #10025 (Patch to allow proper sizing of simple combo box)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:07:13 +00:00
Vadim Zeitlin
edd608b18a Account for the margins used by Windows around status bar text.
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
2009-09-21 13:00:36 +00:00
Vadim Zeitlin
0fd2ecfed3 Initialize wxMDIParentFrame::m_accelWindowMenu in default ctor.
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
2009-09-21 08:44:42 +00:00
Jaakko Salli
178c77606f wxAny initial commit (closes #10932)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 08:51:11 +00:00
Vadim Zeitlin
11c2b0413a Add wxUSE_RIBBON to wx/setup_inc.h and wx/chkconf.h.
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
2009-09-18 22:16:59 +00:00
Peter Cawley
3c3ead1d15 Merged GSOC Ribbon work from SOC2009_RIBBON branch into trunk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 12:06:02 +00:00
Vadim Zeitlin
ab06470e49 Add wxDEBUG_LEVEL to wx/setup.h and document it.
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
2009-09-12 11:29:42 +00:00
Vadim Zeitlin
7d9550df50 Define wxDEBUG_LEVEL in both debug and release builds as 1.
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
2009-09-12 11:28:52 +00:00
Vadim Zeitlin
ddc4214a4f Use correct visual attributes for wxSpinCtrl.
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
2009-09-08 12:23:06 +00:00
Vadim Zeitlin
ea283460f7 Recognize the buddy text control as part of wxSpinCtrl.
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
2009-09-06 14:31:25 +00:00
Jaakko Salli
0847e36eff wxTextEntry::SetMargins(), GetMargins() - implemented on wxMSW and wxGTK (GTK+ 2.10+); also added similar functions into wxComboCtrl, deprecated old indent-functions; wxPropertyGrid modified to use the new functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-05 12:39:12 +00:00
Vadim Zeitlin
d301c44093 Fix selection events generation in multi-select wxTreeCtrl.
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
2009-08-30 17:24:53 +00:00
Vadim Zeitlin
345ff9c65b Allow entering minus sign in wxMSW wxSpinCtrl if needed.
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
2009-08-23 22:48:35 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
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
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
94aff795d4 Added wxStandardPaths::MSWGetShellDir().
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
2009-08-14 00:05:56 +00:00
Vadim Zeitlin
6cf6897100 Don't pop explicitly changed status messages.
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
2009-08-06 00:01:43 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
68e6eb7d67 Don't call IAutoComplete::Init() twice for the same control as this leaks memory, just change the strings used for completion instead (closes #10968)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-22 14:30:29 +00:00
Vadim Zeitlin
81f0d3caef Include wx/dataobj.h from wx/clipbrd.h.
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
2009-07-20 23:54:08 +00:00
Vadim Zeitlin
43b2d5e7c3 Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-20 16:47:54 +00:00
Jaakko Salli
41ce9ae1b0 Added wxMSW wxBitmapComboBox::DoGetBestSize(), which takes bitmap size into account.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-18 07:31:09 +00:00
Vadim Zeitlin
743b426605 Added DoGetClientBestSize() and use it for a couple of controls in wxMSW.
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
2009-06-22 20:36:13 +00:00
Vadim Zeitlin
3c01c59511 implement wxTreeCtrl::GetFocusedItem() for wxMSW too (see #10859)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-19 23:48:50 +00:00
Vadim Zeitlin
c753eb9269 implement new wxBG_STYLE_XXX semantics for wxMSW too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-17 04:36:28 +00:00
Vadim Zeitlin
23d8a71f51 fix PCH-less build after changing timer id type to WPARAM (closes #10901)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-16 05:05:20 +00:00
Vadim Zeitlin
a6fd73d33a implement wxBitmapButton as just a wrapper for wxButton under MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 23:10:16 +00:00
Vadim Zeitlin
d8c89c487d no real changes, just extract private classes from msw/dc.cpp into a private header so that they could be reused from button owner drawing code too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 17:49:27 +00:00
Vadim Zeitlin
491acfc75e use WPARAM (which is 64 bit under Win64) for timer ids instead of long (which is still 32 bit) (see #10896)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 17:14:50 +00:00
Vadim Zeitlin
233f10bf15 implement images support for wxButton under XP and later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 04:23:54 +00:00
Vadim Zeitlin
28ac82bf04 added missing parentheses in a couple of GetHxxxOf() macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 03:35:30 +00:00
Vadim Zeitlin
2352862a7e preparation work for implementing images support in wxButton: move wxBitmapButton methods to the base class (enhancing/completing them in the process); there are no functionality changes yet (hopefully)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-14 22:55:24 +00:00
Vadim Zeitlin
f76c075805 added convenient wxFont::Make{Bold,Italic,Smaller,Larger} and Scale() methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-12 20:11:21 +00:00
Vadim Zeitlin
4cd15b49b4 allow customizing wxStandardPaths logic for the program directory determination
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-11 16:46:19 +00:00
Vadim Zeitlin
6de7047076 add virtual DoGetTextExtent() to allow calling the overloaded wxWindowBase::GetTextExtent() on wxWindow objects without any ugly casts/scope resolution operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-10 16:41:41 +00:00
Vadim Zeitlin
5470512797 disable warning about _set_se_translator() requiring /EHa for VC9 too (it was disabled for up to VC8)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:27:37 +00:00
Vadim Zeitlin
3998c74b9b use wxRA_SPECIFY_COLS/ROWS instead of old, deprecated and confusing wxRA_HORIZONTAL/VERTICAL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-03 22:33:32 +00:00
Václav Slavík
a5c1223d2f use enhanced metafiles for wxMSW print preview: this is as accurate as previous code, but much faster (fixes #9970)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 19:15:07 +00:00
Václav Slavík
cc3445715d add ability to create wxEnhMetaFileDC based on a reference DC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 19:11:15 +00:00
Vadim Zeitlin
0598625cb2 don't add client area origin when positioning the child MDI frame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 13:22:45 +00:00
Vadim Zeitlin
671683c445 enable OpenGL library build by default under Windows too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 12:55:11 +00:00
Vadim Zeitlin
24f618eea6 allow overriding wxUSE_GLCANVAS value in setup.h by using USE_OPENGL=1 with make (closes #10832)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 09:12:20 +00:00
Vadim Zeitlin
abd694417a remove wxMSW-specific (but copied into wxPalm too) wxAppTraits::AlwaysYield(), it's useless now that wxEventLoop is in wxBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-24 19:39:40 +00:00
Vadim Zeitlin
5508feb8f7 wxUSE_GSTREAMER is Unix-specific, remove it from common wx/setup_inc.h; it also requires wxUSE_THREADS, check for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-24 09:40:15 +00:00
Vadim Zeitlin
fa3987efdb fixed wxRadioBox positioning to take the client area origin into account; also simplified the code to avoid duplication with the base class version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-11 21:54:34 +00:00
Vadim Zeitlin
8bda0ec6a3 remove wxMSW-specific FindSuitableParent() and use GetParentForModalDialog() everywhere; extend it with additional checks and remove redundant ones elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-09 12:26:15 +00:00
Vadim Zeitlin
6e12b56f5e test whether wxHAS_EVENT_BIND is supported in wx/features.h itself, not wx/chkconf.h as the former is included after the latter and so the check was done too early and wxHAS_EVENT_BIND was always defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-03 07:44:44 +00:00
Vadim Zeitlin
f1a736636c remove mentions of wxEVENTS_COMPATIBILITY_2_8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-03 07:43:00 +00:00
Vadim Zeitlin
40636dcbfe don't use dialog size gripper under CE (should close #10765)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-02 17:06:39 +00:00