Commit Graph

55805 Commits

Author SHA1 Message Date
Vadim Zeitlin
a349dc1085 Handle underlined and strikethrough attributes in wxGTK native font info.
These attributes were not handled by wxFont::GetNativeFontInfoDesc() as it
only serialized the Pango font description which doesn't support them.

Fix this by handling these attributes explicitly and prepending them to the
Pango font string if necessary.

Closes #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:17:12 +00:00
Vadim Zeitlin
cba4e486a4 Take into account wxFONTFLAG_STRIKETHROUGH in wxGTK wxFont ctor.
Honour wxFONTFLAG_STRIKETHROUGH in wxFont ctor taking flags as this is the
only way to create a strike-through font currently.

See #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:16:46 +00:00
Vadim Zeitlin
f33230391a Fix spelling in the comments in wxPropertyGrid code.
No real changes.

Closes #14645.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-14 22:26:54 +00:00
Vadim Zeitlin
39191cbfdb Allow using horizontal cursor navigation keys in non-readonly wxComboCtrl.
Don't intercept Left/Right/Home/End keys until the control is read-only,
otherwise they're more useful for navigating in its text part than in its
drop-down.

Closes #14648.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-14 22:26:31 +00:00
Vadim Zeitlin
9cc8cedaae No changes, just remove an unused variable from CHM code.
Closes #14655.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-14 22:26:09 +00:00
Vadim Zeitlin
7ffd3f0e8b No changes, just remove unnecessary variable initialization.
Combine variable declaration and initialization.

Closes #14659.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-14 22:25:46 +00:00
Vadim Zeitlin
4eed538ea7 Czech translations update from Zbynek Schwarz.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-14 10:27:36 +00:00
Vadim Zeitlin
c03c654417 Relax wxMessageDialog style checks, assume wxOK by default.
Don't complain if neither wxOK nor wxYES[_NO] are specified but just assume
wxOK by default. This allows the code calling wxMessageBox() with just an icon
flag to continue to work in the same way in 2.9 as it did in 2.8.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:16:11 +00:00
Vadim Zeitlin
b576c83a30 No changes, just remove unneeded variable initialziation in wxAUI.
Initialize the variables to the correct values when defining them instead of
initializing them as 0 first and then assigning them the real value.

Closes #14652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:48 +00:00
Vadim Zeitlin
c3f641cb5e Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG images.
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.

Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.

Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:25 +00:00
Vadim Zeitlin
20e6714a67 Add wxBitmap::NewFromPNGData() for creating bitmaps from PNG data.
This simple function can be used to create a wxBitmap from the raw image data
in PNG format. It is just a thin wrapper around wxImage load functions under
almost all platforms but has two advantages:

1. It can be implemented natively for some platforms (currently only OS X).
2. It can be used in a single expression as it doesn't require creating a
   temporary wxMemoryInputStream and this will be required by wxBITMAP_PNG()
   macro that will be added soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:00 +00:00
Vadim Zeitlin
3ccea0978c Don't ignore invalid files entered into wxFileDirPickerCtrlBase.
File/directory picker controls with wxFLP_FILE_MUST_EXIST/wxDIRP_DIR_MUST_EXIST
style simply ignored any value entered by user if it didn't correspond to an
existing file/directory. This meant that the program didn't use the value that
was shown on the screen resulting in very confusing UI -- e.g. a program could
complain that no value was entered when actually it was and just corresponded
to a non-existing file.

As we can't prevent the entry of arbitrary strings in the text field of the
file picker control, stop pretending that we can validate it and just update
the control value, and send the corresponding event, whenever the text control
value changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:37 +00:00
Vadim Zeitlin
be7a086c0c Extract "Close" button creation from wxInfoBarGeneric into new function.
Such buttons may be needed in other places and it's not obvious to create
them, so add a new public wxBitmapButton::NewCloseButton() method to allow
creating them easily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:14 +00:00
Vadim Zeitlin
be682205c1 Provide up to date documentation for wxLoadUserResource().
Document the new and preferred overload avoiding copying the data. Also
document the new (since 2.9.1) parameters of the old one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:50 +00:00
Vadim Zeitlin
e23fd60fe7 Change wxMSW-specific wxLoadUserResource() to accept standard RT_XXX types.
Resource types can be either strings for custom types or integers casted to a
TCHAR* for the standard ones. Using wxString for the resource type prevented
us from using the latter as any attempt to initialize wxString for such a
pseudo-string resulted in an immediate crash.

Change wxLoadUserResource() resource type parameter type to wxChar* to avoid
this and allow passing standard resource types, such as RT_RCDATE, to this
function directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:28 +00:00
Vadim Zeitlin
9a0f0f462f Don't initialize alpha twice when loading wxImage from resources.
Calling InitAlpha() when we already had loaded alpha from the resource data
results in an assert. Fix this by only initializing alpha if don't have it
yet.

Closes #14643.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:05 +00:00
Vadim Zeitlin
0825f0ba2b Fix wxFindWindowAtPoint() with nested windows in wxMSW.
Return the deepest child of the window and not the first one as this function
needs to return the window that is at the top of Z-order.

Closes #14591.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:12:42 +00:00
Vadim Zeitlin
c7453fba64 Fix "pos" argument description in wxTreeCtrl::InsertItem() documentation.
Closes #14640.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:12:19 +00:00
Vadim Zeitlin
5ddb3b8c53 Fix setting colours for the edit control part of wxComboBox.
Recognize this control as part of wxComboBox and so handle WM_CTLCOLOR for it.

To do this, override ContainsHWND() in wxComboBox and use it, on the parent
window, in wxControl::DoMSWControlColor(), if we fail to find the window
directly.

Closes #811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:11:56 +00:00
Julian Smart
d07f2e1918 Added support for wxTEXT_ATTR_EFFECT_SMALL_CAPITALS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-12 18:58:30 +00:00
Steve Lamerton
0bfd90b3e7 Add generic wxFileSystem support to wxWebView using wxWebViewFSHandler.
Closes #14623.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-11 09:26:58 +00:00
Steve Lamerton
e52aec972c Move wxWebViewIE missing definitions to webview_missing.h and add new definitions required for Find.
These are required as some compilers, notably MinGW and VC6, do not include up to date headers. Fixes #14621.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-10 20:02:58 +00:00
Stefan Csomor
2128f218be layout adaption, current sizer code leads to too much white space
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-10 12:49:16 +00:00
Vadim Zeitlin
155ce4f184 Fix handling of wxTextEntry hints in wxGTK.
Recent changes (r71308) optimizing away setting the text of the text entry if
it didn't really change completely broke the generic text hints implementation
as e.g. clearing the hint didn't change anything because the entry was already
logically empty anyhow.

Fix this by simply comparing the new value with the real value of the entry
returned by DoGetValue() and not GetValue() that takes hints into account.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 20:28:22 +00:00
Vadim Zeitlin
14722c43c3 Fix deprecating warning introduced in r72446.
Use wxVScrolledWindow::ScrollToRow() instead of the old and ambiguous
ScrollToLine() which is only preserved for compatibility reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:37:06 +00:00
Vadim Zeitlin
2eb92b0da8 Allow using versions of libnotify < 0.7 in wxGTK.
libnotify 0.4.5 included in Ubuntu Lucid (10.04) can be used for implementing
wxNotificationMessage too, there is only a minor difference with 0.7 API. So
while we stick check for 0.7 initially, accept lower versions too if 0.7 is
not available.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:36:43 +00:00
Vadim Zeitlin
82213cb04e Set modifiers properly for the key events with AltGr in wxGTK.
Just as under Windows, represent AltGr as a combination of wxMOD_CONTROL and
wxMOD_ALT.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:36:20 +00:00
Vadim Zeitlin
44b7211689 Remove workarounds for wxTextCtrl::SetValue() events in pickers code.
Simply use ChangeValue() instead of SetValue() to avoid the unwanted events
instead of using guard variables.

No real changes but the code is simpler and shorter now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:35:57 +00:00
Vadim Zeitlin
4a2c28bf68 Add a test of wxFilePickerCtrl::GetValue() to the widgets sample.
Make the current value of the control visible in its page.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:35:34 +00:00
Vadim Zeitlin
77e3a24a01 Add an informational message to the file picker page of widgets sample.
No real changes, just indicate that clicking the "Set initial directory"
button was indeed taken into account.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:35:12 +00:00
Vadim Zeitlin
06a419244f Simplify and correct setting of initial directory for wxFilePickerCtrl.
Create wxFileDialog with correct initial directory and default file name from
the very beginning instead of updating it later. This makes the code simpler
and also actually makes it work as the initial directory setting was
overwritten by setting the default path later even if it didn't contain any
directory component.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:34:49 +00:00
Vadim Zeitlin
d965bcda31 Fix harmless virtual function hiding warning in wxMSW build.
Override the other StrokeLines() overload in wxGDIPlusContext just to avoid
the warning about hiding a base class virtual method from MinGW compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:34:25 +00:00
Vadim Zeitlin
ecad27577f Fix wxKeyEvent::GetKeyCode() descripotion: it doesn't depend on locale.
GetKeyCode() will always return valid key codes for Latin-1 symbols but won't
do it for other non-ASCII Unicode characters even if they are representable in
the current locale.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 10:46:37 +00:00
Vadim Zeitlin
6b7bcbf1ef Do not use wxIsprint() in EVT_CHAR example in the documentation.
This is incorrect as wxIsprint() is locale-dependent and only really works as
expected in UTF-8 locales (which are never used under Windows). Instead, just
test for control characters directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 10:46:14 +00:00
Julian Smart
be8d847d4a Ensure the selected style is visible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 09:38:15 +00:00
Vadim Zeitlin
f1059300f4 Italian translations update from Roberto Boriotti.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 08:34:59 +00:00
Vadim Zeitlin
f78b3d1fc0 Don't try to determine the clicked item ourselves in wxMSW wxListBox.
This doesn't work when the listbox is scrolled as the result of a click to
make the selected item fully visible and results in the index of the item
being off by 1 in the generated event which is a pretty serious problem.

Fix it by simply retrieving the item from the listbox itself, without doing
any hit testing. This seems to give the correct result in all cases and also
makes the code much simpler as we don't have to use 2 different ways of
finding the item depending on whether it was selected using the keyboard or
the mouse and makes it unnecessary to keep track of how the selection was done
completely, i.e. reverts r64498 which is not needed any more.

Closes #14635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:44:26 +00:00
Vadim Zeitlin
2c71ae12c1 Document wxDropTarget::GetDataObject().
Closes #14631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:44:03 +00:00
Vadim Zeitlin
dd9bafe129 Don't use StringFormat::GenericTypographic() in MSW wxGraphicsContext.
Using this string format results in very condensed strings when using small
fonts. The results of GDI+ font rendering are still pretty bad even without it
but they are at least slightly better.

Closes #14537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:43:40 +00:00
Vadim Zeitlin
122b3d0df3 Use a single global StringFormat in all wxMSW wxGraphicsContext code.
Instead of creating StringFormat in DrawText() and Get[Partial]TextExtent[s],
create it once and simply use it from both functions.

This might be slightly more efficient as we don't waste time recreating it but
the main advantage is that it ensures that these functions use the same string
format and no discrepancies between them are possible.

See #14537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:43:18 +00:00
Vadim Zeitlin
6457b0bcc1 Output the values of all USE_XXX options to build.cfg file in MSW builds.
USE_RTTI, USE_AUI, USE_PROPGRID, USE_RIBBON, USE_RICHTEXT, USE_STC and USE_XRC
options were not output to the build configuration file, unlike the rest of
them.

Do output those ones as well now for consistency.

Also sort the options corresponding to different wx libraries alphabetically.

Closes #14608.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:42:55 +00:00
Vadim Zeitlin
5eea1681a6 Document wxWindow InheritsBackgroundColour() and UseBgCol() methods.
These functions were present in the interface header but didn't have their own
documentation and somehow inherited the documentation of the first function in
the same section which didn't make any sense for them. Do document them now.

Closes #14607.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:42:31 +00:00
Vadim Zeitlin
03c1266970 Link MSW-specific event loop files in wxUniv/MSW.
This fixes wxUniv build after the changes of r72008.

Closes #14606.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:42:03 +00:00
Vadim Zeitlin
d3f3e7f11d Undid accidental modification of wxTaskBarIcon in the last commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 21:51:02 +00:00
Vadim Zeitlin
e60165f72e Fix narrow/wide string concatenation in recently added wxSizerFlags assert.
This fixes MSVC build after r72434.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 21:48:57 +00:00
Vadim Zeitlin
58b1ae5e72 Fix some typos in the comments in wxOSX code.
Closes #14636.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 16:03:34 +00:00
Vadim Zeitlin
71c3620229 Check validity of wxSizerFlags::Border() direction parameter.
Catch the misguided attempts to pass the size of the border as the first
parameter of the Border(direction, size) overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 15:46:50 +00:00
Vadim Zeitlin
948f48e725 Enable GL_CULL_FACE in OpenGL samples.
Without it, the hidden faces are shown resulting in wrong display of both the
cube and the penguin, at least with Mesa (but it also seems to be the correct
thing to do according to OpenGL documentation).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 15:46:27 +00:00
Václav Slavík
616ae1e843 Fix VC6 compilation after r72430.
VC6 doesn't handle for loop scope correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:40 +00:00
Václav Slavík
c4dae34da8 Add MUI_LANGUAGE_NAME to wx/msw/missing.h.
Fixes VC6 compilation after r72430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:16 +00:00