Commit Graph

13981 Commits

Author SHA1 Message Date
Vadim Zeitlin
6305f044a1 Add "filter changed" event to wxFileCtrl.
Generate an event when the selection in the filter combobox of wxFileCtrl
changes.

Closes #12099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:47 +00:00
Vadim Zeitlin
384859f8c6 Add wxConfig::Read(float *) overload.
This uses Read(double *) but casts the result to float after checking that it
is in the correct range.

Closes #12100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:38 +00:00
Jaakko Salli
735a300a96 Fixed wxComboCtrl::SetButtonPosition() on Vista/Win7 by marking the drop-down button as 'non-standard' when its size or position is changed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 14:51:07 +00:00
Jouk Jansen
9015d579c8 use wxToggleButtonXmlHandler::DoCreateBitmapToggleButton on supoorted platforms only
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 13:45:06 +00:00
Robert Roebling
c2246a3881 Applied patch, fixes #12090: wxGTK cursor handling revamp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-26 17:37:55 +00:00
Vadim Zeitlin
81fb185e4f Fix setting the fonts for wxMSW wxTextCtrl with wxTE_RICH(2) style.
Using WM_SETFONT seemed to work with rich edit controls but in fact it
doesn't, it only changes the font used by the control initially apparently but
it can be reset later.

Use EM_SETCHARFORMAT which is more reliable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-25 21:15:24 +00:00
Vadim Zeitlin
d25a864d0a Added wxMessageQueue::Clear().
This method can be called from the posting thread to remove any still pending
requests if they became unnecessary.

Closes #10905.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-22 16:14:16 +00:00
Vadim Zeitlin
86417abf07 Fix for user input processing in wxProgressDialog.
Yield for input event processing before updating the dialog instead of doing
it after this as the latter apparently doesn't always work.

Closes #10645.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-22 16:14:11 +00:00
Robert Roebling
65887bd0f1 Second try to get wxDataViewChoiceByIndex and its name right, hopefully fixes #11970: wxDataViewChoiceRenderer set/get methods should use the current selection
index not a string

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 20:13:49 +00:00
Vadim Zeitlin
f2b504977d Always define SIZEOF_WCHAR_T if it's not defined under Windows.
The assumption that SIZEOF_EVERYTHING_ELSE is defined when SIZEOF_INT is is
wrong. While wxWidgets configure does define all SIZEOF_XXX at once,
SIZEOF_INT could also be defined in some third party headers (e.g. Python.h)
and we still need to define the other ones.

In particular, doing this fixes the problem with SIZEOF_WCHAR_T not being
defined during wxPython build.

Closes #12013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 12:52:12 +00:00
Vadim Zeitlin
ebfee17940 Simplify and correct MSW selection of background brush for children painting.
Check for the transparency of the window background in MSWGetBgBrush() itself
and let MSWGetBgBrushForChild() just return the brush to be used.

This required adding a MSW-specific hack to wxPanel to allow inheriting
background of wxNotebook by its children which is slightly ugly but is exactly
what we need to do in this case and makes the rest of the code much simpler.

Also add a possibility to set the background of the page containing the
control being tested to the widgets sample to test for background inheritance.
This shows problems with wxSlider and wxRadioBox backgrounds but they're not
new with this patch.

Closes #12057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 12:51:20 +00:00
Stefan Csomor
afd5d91cae support compiling for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-20 17:58:38 +00:00
Stefan Csomor
55a0f1e303 adding support for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-20 16:36:16 +00:00
Stefan Csomor
68388fdd67 fixing copy paste error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-20 12:39:08 +00:00
Stefan Csomor
dfdad1f936 adapting to new API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-20 12:06:48 +00:00
Stefan Csomor
4919fd67c7 not needed anymore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-19 13:39:56 +00:00
Stefan Csomor
1020adb5f5 adding methoddefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-19 07:25:46 +00:00
Vadim Zeitlin
ff46415213 Compilation fix for wxUSE_LOG_DEBUG==0 case.
Don't do anything in wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD() if we don't
use debug logging anyhow.

Closes #12070.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-18 10:29:52 +00:00
Robert Roebling
79a53c39db Added quick implementation of wxDataViewChoiceByIndexRenderer, closes #11970 (wxDataViewChoiceRenderer set/get methods should use the current selection index
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 15:52:35 +00:00
Robert Roebling
f4fcd64832 Part II of: Add GetChoice() and GetChoices() getters to all choice renderers and actually mention it in the docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 15:29:35 +00:00
Robert Roebling
6bb6cc1e4b Add GetChoice() and GetChoices() getters to all choice renderers and actually mention it in the docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 15:26:57 +00:00
Robert Roebling
3f6e622f7c Applied #11755: wxBitmapToggleButton Xml Handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 14:30:13 +00:00
Vadim Zeitlin
2954883593 Document wxDocument::DeleteContents().
This method purpose was not quite clear as it was only mentioned in passing in
documentation of OnCloseDocument() but not really documented itself.

Also don't call it from wxDocument dtor as this is useless: the user-defined
overridden version will never be called from here and the base class version
does nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 14:37:00 +00:00
Jaakko Salli
8371a35340 Added wxGraphicsContext::Create(const wxEnhMetaFileDC& dc) so that wxPrintPreview can work with wxMSW's wxGraphicsContext (closes #12028)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 08:22:36 +00:00
Václav Slavík
f19f8180a5 Add missing check for wxUSE_FILE_HISTORY existence.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 06:25:33 +00:00
Vadim Zeitlin
c48bdb0c28 Refactor wxDocParentFrame and wxDocMDIParentFrame to share common base class.
Use the same approach as for the child frames: add a base template class which
allows wxDocParentFrame to inherit from wxFrame and wxDocMDIParentFrame from
wxMDIParentFrame while still allowing to reuse the common code.

This reduces code duplication and should make implementing parent AUI document
frame easier as well, see #8945.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-12 14:34:18 +00:00
Vadim Zeitlin
0fe260084e Build fix: forgotten part of the previous commit.
This commit should have been part of r64281.

Also notice that the previous commit message mentioned a wrong ticket number,
see #10572.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:28:17 +00:00
Vadim Zeitlin
b6812a6f19 Add column parameter to wxListCtrl::GetItemText().
Allow retrieving the text from columns other than the first one directly.

Add implementations for MSW and generic versions, documentation and a unit
test.

Closes #11597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:22:16 +00:00
Vadim Zeitlin
654e324628 Change wxDIALOG_NO_PARENT value to avoid clashing with wxCENTRE.
Use a bit freed by removing wxTINY_CAPTION_HORIZ for wxDIALOG_NO_PARENT. This
allows to move it out from the lower byte of the style word to avoid conflicts
with the button selection flags which can be commonly combined with the dialog
styles.

More precisely, wxDIALOG_NO_PARENT used to clash with wxCENTRE, meaning that
wxSingleChoiceDialog, for example, was always created without parent because
its default style included wxCENTRE. This commit fixes this particular bug and
probably more similar ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:10:03 +00:00
Vadim Zeitlin
7282b0678a Replace wxTINY_CAPTION_{HORIZ,VERT} with a single wxTINY_CAPTION.
These two styles were always equivalent so we can just as well replace them
with a single one and stop wasting an extra bit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:09:57 +00:00
Vadim Zeitlin
f16fad90b2 No changes, just added comments summarizing the use of style bits.
Add comments allowing to see more clearly the styles allocation.

Please make sure to amend them if you change any style values in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:09:50 +00:00
Vadim Zeitlin
512220b67b Replace public wxEvtHandler::ProcessEventHere() with private TryHere().
ProcessEventHere() doesn't have to be public any more now that we have
ProcessEventLocally() which is safe to call from the outside (i.e. doesn't
forget about the chained event handlers and validators).

Still keep this function because it makes the code more modular and also
because we might want to make it virtual for consistency with TryBefore() and
TryAfter() later. Also rename it to TryHere() to make the symmetry with these
functions more manifest.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:46 +00:00
Vadim Zeitlin
44070fd379 Use ProcessEventLocally() instead of ProcessEventHere() in docview code.
Use wxEvtHandler::ProcessEventLocally() instead of ProcessEventHere() when
forwarding events in the docview code. This ensures that any event handlers
chained with the objects involved (document manager, document, view) will be
used.

Incidentally the old code didn't work at all as ProcessEventHere() didn't even
call TryBefore() where the (further) forwarding was implemented.

Closes #10640.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:41 +00:00
Vadim Zeitlin
396e9eb8e2 Add wxWindow::ProcessWindowEventLocally() and use it in wxMSW MDI code.
Add ProcessWindowEventLocally() which wraps ProcessEventLocally() in the same
way as ProcessWindowEvent() wraps ProcessEvent(). I.e. it allows to process
the event in this window only, without propagating it upwards, but taking into
account any event handlers associated with it.

Use the new method in wxMDIParentFrame code in wxMSW to ensure that event
handlers pushed on MDI children frames are taken into account. Add a test for
this to the MDI sample.

Closes #11225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:33 +00:00
Vadim Zeitlin
3cbb9df817 Refactor the event processing code to add ProcessEventLocally().
This new method can be used to only process the event in this handler or any
handlers connected to it (unlike ProcessEventHere() which doesn't follow the
chain at all), without propagating the event upwards (unlike ProcessEvent()).

Unfortunately implementing this required a field to wxEvent but there doesn't
seem to be any other way to do what we need.

There should be no user-visible changes after this commit, it just paves the
way for the upcoming fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:28 +00:00
Jaakko Salli
c0c05e79b2 Supress SetFocus() warning in wxVListBoxComboPopup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 10:29:48 +00:00
Václav Slavík
3a72e0ed15 wxMsgCatalog destructor should be public.
Fixes #12031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-08 15:31:12 +00:00
Vadim Zeitlin
316bba0c72 Invalidate wxListBox best size immediately without waiting for idle time.
Since r53743 the listbox best size was only invalidated during idle time but
this meant that it could be laid out using incorrect old best size. So while
we still defer (expensive) horizontal extent calculation until later, do
invalidate the best size immediately to ensure the listbox is laid out
correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-08 10:28:01 +00:00
Vadim Zeitlin
fd6e15974c Fix bugs related to two phase creation of wxRibbon classes.
Add missing wxRibbonControl::Create() method. Ensure that member variables are
always initialized by the ctor. Check that we're fully initialized in EVT_SIZE
handler.

Closes #12018.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-07 23:38:21 +00:00
Václav Slavík
690ddfec6e Integrate with GNOME's Recent Documents menu.
GTK+ provides GtkRecentManager for this purpose since 2.10. Use it in
wxFileHistory if available. Integration is simple, we just add a file to
GtkRecentManager in addition to normal wxFileHistory handling.

A well-behaved GNOME application would use GtkRecentManager as the
primary store for recent files, so that it reflects when the user works
with supported files in another editor(s) too. But for now, this is much
better than no support at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-07 06:45:48 +00:00
Jaakko Salli
75ac0891d8 Change wxPGProperty::SetChoices() to accept 'const wxPGChoices&'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 17:42:26 +00:00
Vadim Zeitlin
64b62afea8 Don't accept focus in the dummy main generic spin control window.
This window is only used as a container for the sub-windows and shouldn't
accept focus, trying to set it to it doesn't work anyhow (see #12004).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:36 +00:00
Vadim Zeitlin
3a71210569 Don't send wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED when nothing changed.
The generic double spin control sent UPDATED events whenever it lost focus,
whether anything changed or not.

Don't send events unless the controls value has really changed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:32 +00:00
Vadim Zeitlin
bcd286534a Added wxLANGUAGE_BOSNIAN.
Closes #12016.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:40:11 +00:00
Václav Slavík
611bed3511 Refactor wxTranslationsLoader API.
Instead of calling back into wxTranslations to actually load the data,
return wxMsgCatalog instance from
wxTranslationsLoader::LoadCatalog(). This requires making wxMsgCatalog
public.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:12:53 +00:00
Václav Slavík
ba5619e076 Move wxScopedPtr::reset() implementation to wxDEFINE_SCOPED_PTR.
Just as the destructor, reset() calls delete on T pointer and so can
only be defined when T is fully defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:43:01 +00:00
Václav Slavík
bdd6a03de7 Use wxCHECKED_DELETE in wxScopedPtr::reset().
It was only used in delete call in destructor, but the use in  reset()
needs safeguards as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:42:57 +00:00
Václav Slavík
4e0c592f98 Use wxCHECKED_DELETE in wxScopedPtr<T>.
It was only used in macros-based implementation, use it in the template
version too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:42:52 +00:00
Vadim Zeitlin
fd61f68445 No changes, just make wxDataViewEditorCtrlEvtHandler private.
This class is used by wxDataViewCtrl implementation only, there is no need for
it to be in a public header.

Move the class declaration from wx/dataview.h to datavcmn.cpp.

See #11732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:45:14 +00:00
Vadim Zeitlin
66c02e6e33 Pop event handler from wxDVC edit control before destroying it.
This fixes the assert in wxWindow dtor checking that all event handlers pushed
on the window were removed.

Also fix a memory leak by not creating an unnecessary object of wxKillRef
class. In fact remove this class entirely.

Closes #11732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:45:09 +00:00