Commit Graph

13520 Commits

Author SHA1 Message Date
Jaakko Salli
644b283d6a Store property name and value in wxPropertyGridEvent, keep track of live event instances, and clear property/grid information in them in wxPropertyGrid dtor. This allows application to relay events for later processing without fear of losing most relevant information within.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-27 14:35:02 +00:00
Julian Smart
906cb3f119 Applied modified #10655 (Added Cookie (receive) support to wxHTTP)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 19:47:23 +00:00
Vadim Zeitlin
6f0740beb5 Use FWD version of DLL export macro in forward declaration.
Forward declarations must use WXDLLIMPEXP_FWD_XXX and not WXDLLIMPEXP_XXX to
avoid g++ warnings about "type attributes are honored only at type definition".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:37 +00:00
Vadim Zeitlin
ddb44248a6 Fixed wxDataViewCtrl::Set{Foreground,Background}Colour() to work under GTK too.
Implement DoApplyWidgetStyle() in wxGTK version of wxDataViewCtrl to propagate
the main window style to the GtkTreeView which is what the user mostly sees.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:30 +00:00
Vadim Zeitlin
2fa90e33ea Use default composite controls attributes for wxDataViewCtrl.
wxDataViewCtrl should use the same colours/fonts as the native list and tree
controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:12 +00:00
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
Vadim Zeitlin
3396739da1 Refactor wxStyledTextCtrl to share common file save/load code.
Keep the code for saving and loading text contents from files in a single
place instead of doing it differently in wxTextCtrl and wxStyledTextCtrl.

This required adding Set/GetValue() methods to wxTextAreaBase just so that its
DoLoad/SaveFile() could use them, even if they are the same as wxTextEntryBase
methods and are overridden in wxTextCtrlBase to be implemented in terms of the
latter.

Notice that wxRichTextCtrl might need to be refactored to use this code too in
the future.

Also notice that this reverts the change of r62081 which replaced SetValue()
with ChangeValue() in DoLoadFile() as wxTextAreaBase only has SetValue() and
it's not worth adding ChangeValue() to it too just to preserve this recent
change in behaviour.

Closes #10715.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 13:26:16 +00:00
Stefan Csomor
ddbc8ac9ca cleaning up key handling, closes #10406
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 10:39:26 +00:00
Jaakko Salli
a1d5aa9361 Have wxComboCtrl generate wxEVT_COMMAND_COMBOBOX_DROPDOWN and wxEVT_COMMAND_COMBOBOX_CLOSEUP events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 09:15:29 +00:00
Julian Smart
51c72a7b56 Applied #9011: Native wxListCtrl::HitTest on OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-25 09:02:04 +00:00
Julian Smart
a74d082e8c Applied #10858: wxListCtrl on Mac does not route Freeze/Thaw/Update to m_genericImpl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-25 07:45:35 +00:00
Julian Smart
240071a415 Added missing const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:47:34 +00:00
Julian Smart
198c264dbc Applied part of #10034: wxImage::ConvertToDisabled()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:05:33 +00:00
Julian Smart
250ab35a3b Applied: wxDocument: Adding an asterix to the title
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 13:49:01 +00:00
Julian Smart
426d19f139 Applied patch #9058 (add Hildon 2.0 support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 12:36:34 +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
Stefan Csomor
e876d0f262 removing unneeded method, closes #11073
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:39:38 +00:00
Stefan Csomor
2c864095a0 removing unneeded method, closes #11073
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:15:41 +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
Julian Smart
c631741b39 Fixed compile problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 06:48:27 +00:00
Paul Cornett
b4bde7a74b build fixes for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 16:32:32 +00:00
Vadim Zeitlin
670d01778a Extract default grid header renderers from wxGridCellAttrProvider.
We must be able to use them even when we have no attributes at all
and even when we have no associated table, so use default renderers in wxGrid
implementation of Draw{Row,Column}Label()/DrawBorder() in this case.

Closes #11230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:28:55 +00:00
Vadim Zeitlin
cb7c02fd46 Remove DLL export declaration from wxScrolled.
As this class has only inline methods it doesn't need to be exported from the
DLL and actually exporting it results in linking problems when using
wxScrolled<wxWindow> (which, unlike wxScrolled<wxPanel>, is not used in wx
itself and so doesn't seem to be instantiated) in DLL client even with VC > 6.

An alternative solution would be to change WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE
macro to explicitly instantiate the template in the DLL even for VC > 6 but
this wouldn't solve the problem for wxScrolled<CustomClass> while removing the
DLL export declaration should.

Also use wxScrolled<wxWindow> in addition to wxScrolled<wxPanel> in the scroll
sample to test that it links correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:28:42 +00:00
Julian Smart
4fdc2c5f2a Added wxRICHTEXT_HANDLER_USE_CSS flag for HTML handler to use CSS
where possible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 11:05:52 +00:00
Julian Smart
2f0baf9797 Resolved #4842 (accessors for member variables)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 08:15:13 +00:00
Peter Cawley
77749ea963 Added automatic linking of ribbon libraries when using MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 12:13:03 +00:00
Vadim Zeitlin
fdc468a0a6 Add a separate wxControlRenderer::DrawButtonLabel() too.
wxControlRenderer::DrawLabel() was used by both wxStaticText and wxButton but
their labels may need to be drawn differently and wxRenderer does have
different DrawLabel() and DrawButtonLabel() to do it. Now also add a separate
method for the buttons to wxControlRenderer.

See #11220.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 00:23:03 +00:00
Vadim Zeitlin
2c1a1ed190 Implement wxWindow::DoGetBorderSize() in wxUniv.
As some wxUniv classes implement DoGetBestClientSize(), the new code in
wxWindow::DoGetBestSize() implementation calls DoGetBorderSize() which asserts
because it's not implemented, making it impossible to even start the minimal
sample -- fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 00:22:52 +00:00
Stefan Csomor
1437127330 fixing include type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:08:52 +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
Stefan Csomor
0a84f928e9 moving themeing include to private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 12:57:12 +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
Vadim Zeitlin
4017f5ca49 wxSocket::Initialize() and Shutdown() are for main thread only.
Calling Initialize() from another thread could never work before but it wasn't
clear that this was the case so document it in the functions comments and
documentation now and add asserts checking that they are called from the main
thread only.

Also simplify the code as we don't actually need to do any reference-counting
here and a simple boolean flag indicating whether the sockets are initialized
is enough.

Closes #11119.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 08:44:35 +00:00
Vadim Zeitlin
45de347c10 Put wxAny implementation entirely in the header.
This allows to remove WXDLLIMPEXP_BASE from the class declaration and should
hopefully fix VC6 linking errors when building the unit test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-20 12:37:16 +00:00
Vadim Zeitlin
59d43911b4 Optionally return length from wxLoadUserResource().
Add optional length output parameter and also change the return type to "char
*" from "wxChar *" to which it apparently was blindly changed just to make
this code compile even though this function never returned any strings.

Closes #11214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:57 +00:00
Vadim Zeitlin
b0edecea48 Add wxColour::{Set,Get}RGB[A]().
These methods allow to operate with all 3 or 4 colour channels at once.

Add their implementation, documentation and a unit test for wxColour
exercising them.

Closes #9918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:50 +00:00
Vadim Zeitlin
0193727824 Add curly braces around wxFAIL_MSG() to avoid g++ 4.3 warning.
g++ 4.3 warns about lack of explicit braces to make it happy.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:42 +00:00
Vadim Zeitlin
39601a7f74 Set svn properties correctly for the newly added files.
Set svn:keyword and, most importantly, svn:eol-style, to avoid having files
with DOS line endings in svn, for the new files added by r61971.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 15:41:08 +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
Vadim Zeitlin
0f08aa4432 Change return type of wxList::Member() to bool.
It used to return a pointer in wxUSE_STL==0 build and an object in
wxUSE_STL==1 one making checking its return value difficult without provoking
warnings from either MSVC or g++ (see #11038).

Also, all the other occurrences of Member() already returned bool, including
the one in wxStringList so changing it to return bool in wxList itself is more
consistent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 17:10:58 +00:00
Vadim Zeitlin
b3b17ee743 Fix recurring typo in "theming".
It was (consistently) misspelt as "themeing" in several places.

Closes #11206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 16:16:30 +00:00
Vadim Zeitlin
e9670814f5 Use UTF-8 for all non-ASCII characters in the sources.
Avoid mixing Latin-1, UTF-8 and Mac Roman (?) encodings in different source
files, use UTF-8 everywhere.

See #11116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 16:16:12 +00:00
Julian Smart
370eda07c1 Added missing includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 08:18:52 +00:00
Vadim Zeitlin
3175fc12b4 More ribbon compilation fixes for OS X.
Add more headers for wxColour and wxFont.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 00:17:57 +00:00
Vadim Zeitlin
91d33c61a5 Ribbon compilation fixes for OS X.
Forward declare wxWindow and wxDC classes in wx/ribbon/art.h to avoid errors
in (PCH-less?) buildbot builds.

Also include header containing declarations of private Mac functions in
implementation file (closes #11203).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 23:19:01 +00:00
Vadim Zeitlin
956b3d92ef Allow creating wxSingleInstanceChecker with default name.
This makes it easier to use in common cases: there is no need to come up with
a unique name for the checker any more as sufficiently unique combination of
wxApp::GetAppName() and wxGetUserId() is used if no name was explicitly given.

This is done by calling the new CreateDefault() on demand from
IsAnotherRunning() instead of simply creating the checker with the default
name in the default ctor for compatibility (you had to call Create() after
using the default ctor before and it can only be called once) and because
wxTheApp might not exist yet when wxSingleInstanceChecker is created.

Closes #11166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 12:38:00 +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
1a2df6a75b Change wxBoxSizer::AddSpacer() to only add space in sizer direction.
It used to add a spacer with the given size in both directions but this was
counter-intuitive and wasn't expected even by the original author of this code
so change it to behave more reasonably.

Closes #11197.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-15 17:05:32 +00:00
Vadim Zeitlin
a8030f0eaa Really fix VC6 compilation after r61919.
The change in r61922 which was supposed to do it somehow forgot the fix itself
and added only a comment explaining why it was needed. Really do name the
struct now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-15 17:05:13 +00:00