Commit Graph

53014 Commits

Author SHA1 Message Date
Vadim Zeitlin
8c40af9430 Document wxEVT_COMMAND_SLIDER_UPDATED in wxSlider documentation too.
This even was only documented in wxCommandEvent documentation but not in
wxSlider, mention it there too.

Closes #12292.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-15 11:10:34 +00:00
Vadim Zeitlin
1f4d7e441c No changes, just clean up wxSVGFileDC code a little.
Use literal strings instead of macros such as "newline", "space" and
"semicolon" and also use wxColour::GetAsString() instead of reimplementing it.

Closes #13037.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 23:25:58 +00:00
Vadim Zeitlin
8864388cf2 Show wx{Note,Tool}book-specific styles in the notebook sample too.
Demonstrate the use of styles such as wxNB_FIXEDWIDTH or wxTBK_HORZ_LAYOUT
specific to particular controls and not only the ones common to all of them.

Closes #13036.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:55:05 +00:00
Vadim Zeitlin
5c16a69952 Don't generate wxEVT_CHAR_HOOK events while the mouse is captured.
This prevents the parent TLW from interfering with the keyboard handling of
the window that captured the mouse which very often needs Escape for itself to
cancel the capture.

In particular, this fixes the problems with Escape closing the entire dialog
containing the controls instead of closing just the combobox drop down or a
popup menu in wxMSW.

Also modify wxGTK for consistency and update the documentation.

Closes #12952.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:55:01 +00:00
Vadim Zeitlin
ff45048665 Document EVT_CHAR_HOOK.
Explain that it is sent to the active TLW and not the focus window and that
handling it suppresses all the normal keyboard events.

Mention that it is not generated by wxOSX/Cocoa currently, see #12431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:55 +00:00
Vadim Zeitlin
982bc2e421 Don't intercept Escape key while IME is active.
Escape is used by IME and intercepting it at wxWidgets level to generate
EVT_CHAR_HOOK breaks the IME UI and may result in unexpected loss of data
entered by user.

To work around this, don't generate EVT_CHAR_HOOK for Escape while IME is
active by checking for the special semaphore variable (which could be also
used for other things in the future, see #9102) value.

Closes #11386.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:51 +00:00
Vadim Zeitlin
caef3ffacc Produce correct SVG files in all locales.
Using wxSVGFileDC in locales using comma as decimal separator resulted in
invalid SVG files being created as a decimal period should always be used in
them.

Fix this by replacing "%g" format specification with wxString::FromCDouble()
call (wrapped in a convenient NumStr() helper function).

Closes #12008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:43 +00:00
Vadim Zeitlin
ce39ca74bc Fix changing the size of the bitmaps in wxMSW wxButton.
The size of the wxImageList used to store the bitmaps wasn't updated before
and so the old bitmap size continued to be used even after changing the actual
bitmaps.

Recreate wxXPButtonImageData to ensure that the image list size does change.

Closes #12909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:39 +00:00
Vadim Zeitlin
32eec436ed Print everything by default in non-interactive mode.
IF we don't show the dialog allowing the user to select the pages range, we
should print everything by default instead of printing nothing at all as we
used to do.

Closes #12998.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:35 +00:00
Vadim Zeitlin
b95a7c3144 Allow wxThread::Wait() and Delete() to block, even under wxMSW.
Add "wait mode" parameter to these methods which can be used to make them
block even under wxMSW where they currently dispatch messages when called
which can be totally unexpected.

Do keep the old behaviour for compatibility however, although it will change i
3.2.

Closes #12998.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:32 +00:00
Vadim Zeitlin
31dcbd12ef Respect alignment flags for owner-drawn buttons in wxMSW.
Honour wxBU_{LEFT,RIGHT,TOP,BOTTOM} flags for owner drawn buttons too, this
ensures that you can both change the colour and align the text differently for
buttons under XP and later.

Closes #12995.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 11:54:26 +00:00
Julian Smart
2631773e82 Added initialisation and checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-14 10:27:01 +00:00
Vadim Zeitlin
fd3a4cb92d Added precision parameter to wxString::From[C]Double().
Optionally support fixed precision in wxString::FromDouble() and FromCDouble()
methods. This is mostly useful for the latter to be able to format numbers in
portable way (using dot as decimal separator) without loss of precision but
also do it for the former for consistency.

Closes #12973.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-13 13:53:54 +00:00
Vadim Zeitlin
17a8f66c75 No changes, just correct a wrong trailing comment in #else.
The test meaning was inverted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-13 13:53:51 +00:00
Vadim Zeitlin
50a2a3553a Document wxTE_MULTILINE support in wxTextEntryDialog.
It wasn't immediately obvious that this dialog could be used for multiline
text entry too so mention it explicitly in the documentation.

Also show this in action in the dialogs sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-13 13:33:12 +00:00
Stefan Csomor
90dad08e77 add external utf16 text type explicitely, as it otherwise gets treated like plain-text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-12 15:57:37 +00:00
Stefan Csomor
e9020f0b22 supporting 24 and 64 sizes via scaling up
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-11 19:54:44 +00:00
Stefan Csomor
8383e673b1 under cocoa a too-small static box leads to erroneous layout information, therefore use fixed code layout info, fixes #13006
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-10 18:56:58 +00:00
Stefan Csomor
bda7c3535e safeguard against not-yet-shown view which leads to crashes under OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-10 18:55:55 +00:00
Paul Cornett
89c6e02442 add wxEVT_MAXIMIZE support to wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 17:22:43 +00:00
Vadim Zeitlin
9bfdedfb3e Make brush hatches in wxGTK consistent with wxMSW.
The cross, vertically and horizontally hatched brushes used 4 pixels between
the hatches in wxGTK but 7 in wxMSW which was very noticeable. Use the same
pattern in wxGTK as MSW uses (as we can't change it there anyhow).

Closes #13029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 16:35:56 +00:00
Vadim Zeitlin
65303ed7eb Correct the name of the header for GTK+ < 2.14.
Remove the extra ".h" suffix added during recent GTK+ 3-related changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 16:35:51 +00:00
Vadim Zeitlin
1910265f82 Add tests of other hatched brushes to the drawing sample.
Test wxCROSS_HATCH, wxVERTICAL_HATCH and wxHORIZONTAL_HATCH brushes and not
only the wxCROSSDIAG_HATCH one.

See #13029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 16:35:46 +00:00
Vadim Zeitlin
8fa11bb2a2 Don't pop up annoying message box in the drawing sample.
The rubber banding selection message box was shown even after a simple click,
i.e. when nothing was actually selected which was quite annoying, so don't do
this.

Also remove unnecessary casts and use wxLogMessage() instead of
wxString::Printf() + wxMessageBox().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 16:35:43 +00:00
Vadim Zeitlin
621d922ffd Corrections to wxTextCtrl::HitTest() documentation.
Fix the signature of the overload returning row and column which got corrupted
during transition to Doxygen and document the overload returning the position
as well. Also document all the parameters.

Closes #12954.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 10:07:58 +00:00
Vadim Zeitlin
99f44d9704 Send wxEVT_COMMAND_DATAVIEW_CACHE_HINT to proper window.
The event was sent to wxDataViewCtrl parent instead of the control itself for
some reason, fix this.

Closes #13020.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 09:44:03 +00:00
Vadim Zeitlin
e22e5ee4e7 Mention that wxEVT_MAXIMIZE is only generated by a few ports.
Currently only wxMSW, wxOSX/Cocoa and wxOS2 generate this event. Notably wxGTK
does not.

See #13022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 09:40:08 +00:00
Vadim Zeitlin
042959df5d Correct EVT_MAXIMIZE macro name in wxTLW documentation.
EVT_ACTIVATE was mistakenly used instead.

See #13022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 09:40:04 +00:00
Vadim Zeitlin
ba7bc4e4e6 Fix search for item by text in wxMSW wxListCtrl.
LVN_ODFINDITEM handler could enter infinite loop if its selection was 0 and a
key not matching any of the items first letters was pressed.

Rewrite the loop in a simpler form to ensure that it is correct. Also clarify
some comments. Finally, fix the behaviour when no matching item was found (if
it didn't hang in infinite loop, it used to select the first item in the
control).

Closes #13026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 09:28:41 +00:00
Vadim Zeitlin
aab1681669 Don't assert if starting search position in LVN_ODFINDITEM is invalid.
Just use wxLogDebug() if this happens, asserting here is not the right thing
to do as it doesn't indicate an error in the program but rather invalid
external input and, moreover, we can recover from it easily.

No changes in behaviour in normal case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-09 09:28:34 +00:00
Vadim Zeitlin
f382836f40 Add another missing #if wxUSE_MARKUP check.
The definition of DoSetLabelMarkup() should only be compiled when
wxUSE_MARKUP==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-08 17:22:15 +00:00
Vadim Zeitlin
ff65c0ef06 Czech translation update from Zbynek Schwarz.
Fix some incorrect terms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-08 17:22:08 +00:00
Stefan Csomor
74518cea41 support app activated and deactivated events, also bring back float_on_parent windows to normal level on deactivate to avoid behaving like stay_on_top
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 20:26:40 +00:00
Stefan Csomor
9d243a476a window level support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 19:04:55 +00:00
Stefan Csomor
e9e8b38179 bracket unused function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 17:31:19 +00:00
Jaakko Salli
52a368fed1 To prevent wxPropertyGrid from stealing frocus from other controls, only let SetFocusOnCanvas() move focus to the main grid 'canvas' if focus was already in on the grid's child controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 13:02:33 +00:00
Václav Slavík
ca9e521481 gtk/gtkunixprint.h only exists since GTK+ 2.14.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 12:07:58 +00:00
Václav Slavík
adc620811a Don't directly include GTK+ semi-public headers.
Only the main headers (e.g. gtk/gtk.h) should be included and GTK+ 3 is strict about this. Enable compile-time checks for this that work with GTK+ 2.24.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 18:22:28 +00:00
Václav Slavík
14b44999eb Include gdk/gdkkeysyms-compat.h.
GTK+ 2.22 changed GDK_* keysym constants to GDK_KEY_* and introduced a new header for the old names. This header must be explicitly included in GTK+ 3, so do it for now. In the long run, we should migrate to the new names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 18:22:23 +00:00
Stefan Csomor
7dbda71e4b use FixedToFloat everywhere to make sure we don't round too early, preserve fractional width with CoreText as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 15:27:44 +00:00
Stefan Csomor
e418552365 position buttons to the right on OSX as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 15:24:26 +00:00
Stefan Csomor
b64af07b7c fix positioning bug with window disabler and hidden windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 14:49:19 +00:00
Julian Smart
0e190fa2b4 Fixed #13017: wxRichTextCtrl CopyToClipboard regression
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-06 09:09:42 +00:00
Stefan Csomor
902ddbfd3e support wxWindowDisabler on osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-05 12:21:20 +00:00
Vadim Zeitlin
dc90b8d411 Add a dependency of wxUSE_TASKBARICON on wxUSE_MENUS.
PopupMenu() method of wxTaskBarIcon doesn't make much sense without wxMenu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-05 11:16:55 +00:00
Vadim Zeitlin
77ba3f9326 Don't initialize wxGBSpan with invalid values in wxGBSizerItem.
Default wxGBSizerItem ctor initialized wxGBSpan with invalid values which
resulted in an assert when loading wxGBSizer from XRC since r66964.

Fix this by simply using the default wxGBSpan ctor instead.

Closes #13004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-05 11:16:51 +00:00
Paul Cornett
b586d4c7e3 fix Activate signature after r67099
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-03 17:51:52 +00:00
Stefan Csomor
9159a25799 proper focus lost for multiline textfields and having all demanding a focusrect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 21:17:43 +00:00
Stefan Csomor
d5bda0b2bd the wx part knows better whether it has the focus (may be the embedded NSView, not the m_peer)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 21:16:30 +00:00
Julian Smart
52112306b0 Fixed a problem with paste resetting the content paragraph style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 20:55:39 +00:00