This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.
This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.
Closes#14812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was broken by r72581, add event.Skip() call to the handler for this event
added there.
Also add a handler for this event to the corresponding page of the widgets
sample to be able to test this.
Closes#14799.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use CreateStdDialogButtonSizer() instead of constructing
wxStdDialogButtonSizer directly, not only this is shorter but it also makes
the "OK" button default correctly.
Also initialize the labels instead of leaving them initially empty.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample contains disabled code for using other type of windows than
MyCanvas for the splitter children but it didn't compile any more because the
variables were declared as wxScrolledWindow. Fix this by using just wxWindow
for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Comparing paths using wxString is a bad idea as identical paths can be seen as
mismatching because of case-only differences.
Also, don't reset wxRadioBox selection from its selection handler, this
doesn't work under e.g. wxGTK and is a bad example.
Closes#14791.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxXmlResourceHandlerImplBase::GetAnimation() returned wxAnimation by value
which created references to wxAnimationCtrlNameStr and wxNullAnimation
symbols, defined in the "adv" library, in "core" when using Sun CC even though
they were not referenced directly.
Fix this by returning wxAnimation by pointer to keep it opaque for "core" code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.
Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.
Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.
Closes#2628.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.
Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.
Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).
Closes#14711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do this for consistency with all the other ones and also because it makes it
simpler to notice any unwanted icons for hidden windows created by this sample.
See #13251.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.
Update the sample to test it, the key event handling in it had to be modified
to allow it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need to clear the control contents before loading a file into it
because LoadFile() is supposed to do this on its own (although currently it
doesn't, which will be fixed soon).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't show "About" dialog on startup, this has nothing to do with the purpose
of this sample and is just annoying.
Also, don't select the entire file after opening it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Hover and activation events were sent even for the disabled buttons which was
unexpected and inconsistent with wxRibbonToolBar, so don't do it.
Closes#14709.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to construct a font based on the parent window font instead of
either fully specifying all font parameters or basing it on a standard font.
Closes#14632.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow adding checkboxes to and removing them from the wrap sizer to
demonstrate how it adjusts to its contents dynamically.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Optionally show standard "Help" question mark button in the ribbon top right
corner and generate the appropriate event for it.
Closes#14576.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Text origin was calculated incorrectly for the rotated text and the bounding
box was wrong even in non-rotated case.
Fix this by using correct definition of the text anchor according to the SVG
specification and add a test to the svg sample demonstrating this.
Closes#14489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
Pass wxTE_PROCESS_ENTER to wxSpinCtrlTextGeneric if it's specified for
wxSpinCtrl itself and also forward wxEVT_COMMAND_TEXT_ENTER events from it to
wxSpinCtrl itself.
This fixes lack of these events for wxSpinCtrlDouble under MSW and also lack
of them for any kind of wxSpinCtrl in the ports using generic version (notably
wxOSX).
Closes#14604.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.
Add controls allowing to test this feature to the widgets sample.
Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.
This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It probably was needed before, when the flags had different values for
different controls, but is simply unused now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Keyboard handling is subtly different in wxGTK for native controls and generic
wxWindows so add a way to test both of them in the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Warn if key presses occur when the input window doesn't have focus as the
usual key events are not generated then which could be understood as a bug in
the sample instead of the correct result.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.
Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.
Closes#14520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.
Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.
Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.
Closes#14361.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows Scroll{Lines,Pages}() methods inherited from wxWindow to work with
it.
Add a test of using them to the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Trying to append a menu item with empty label resulted in an assert (at least
under wxGTK but probably elsewhere too), and in any case wasn't very useful,
so use "(untitled)" instead in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added wxRibbonBar::ShowPage(), HidePage() and IsPageShown() methods and show
them in the sample.
Also add GetPageNumber() helper.
Closes#14471.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't work anyhow, so make it explicit by asserting if an attempt to do
it is made. And document this.
Also add a test of SetHint() to the text sample to verify it still works.
Closes#14456.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was broken since the addition of the call to wxApp::OnInit() to
wxMediaPlayerApp::OnInit() -- as the base class parses the command line
itself, we need to use OnInitCmdLine() and OnCmdLineParsed() instead of doing
it manually if we call it.
Also don't load the play list saved in wxConfig if any command line parameters
were given as otherwise the saved files would be used first (this seems to
have been always broken...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As we now recommend creating the controls shown inside wxStaticBox as its
children, and not siblings, follow our own recommendation by doing just this
in XRC handler of wxStaticBoxSizer.
Also add a test of using a tooltip with a wxStaticBoxSizer element to the XRC
demo showing that tooltips do work now for them, unlike before.
Closes#14431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't rely on implicit conversion of wxString to char*/wxChar*, it doesn't
exist in STL build. Add explicit c_str(), wc_str() or t_str() calls.
Closes#14420.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show the "extension button" in the ribbon panel if this style is specified.
Also generate a specific event if this button is clicked.
Closes#14283.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include copy.xpm under all platforms as all of them support (even though
without necessarily implementing it) wxMenuItem::SetBitmap() now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixed composite object positioning in centred and right-aligned
paragraphs.
Added field example to sample, and enabled pixel font size selection.
Added custom text and dimension scaling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "%ld" instead of "%d" to format long values, using "%d" results in an
assert failure under LP64 systems as int and long have different sizes there.
Closes#14311.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A port number is an unsigned short, not long, so don't make it long just
because wxCmdLineParser doesn't provide a convenient way to get the value of
an unsigned short option (it would be nice if it did...).
This fixes the problem with using "%d" format specifier with a long variable
as this resulted in an assert under LP64 systems.
See #14311.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.
Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.
Closes#14268.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.
Currently this is only implemented in the generic version.
Closes#12583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was disabled because it wasn't implemented for wxGTK at some time in the
past -- but it is implemented now, so there is no reason to not allow testing
it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GetTitle() added in r71213 resulted in virtual function warnings from g++, fix
them by renaming it to GetBoxTitle().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.
Document the problem with the old functions and use the new ones in the
sample.
See #14137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to easily test this function interactively, notably check what
happens when the currently selected string is changed under different ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxHAS_XXX symbols need to be checked with #ifdef, not #if.
See #1614 (as this change was part of the patch submitted there, even if the
ticket itself is unrelated).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxListCtrl::EndEditLabel() isn't available in wxUniv, it's wxMSW-only.
This fixes the sample compilation in wxUniv/MSW build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define these methods even when wxUSE_OWNER_DRAWN is turned off for some
reason. This allows to avoid ugly tests for !defined(__WXMSW__) ||
wxUSE_OWNER_DRAWN in the code that just wants to set a bitmap for a menu item.
Closes#12664.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.
This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.
Closes#14050.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use composited windows if supported by GTK+ for wxWindows with this background
style.
Also add wxWindow::IsTransparentBackgroundSupported() and show how to use it
in the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.
These defines are only needed for VC8 and later but should do no harm for the
previous versions.
See #11009.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rebake all the projects after the changes of r70182, even if they're only
really needed for the library itself, the other project files should
correspond to the bakefiles contents too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The translation was missing a %s, copied the translation from the same string at samples/internat/ja/internat.po.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changing the localisation files to be in UTF-8 allows them to be committed by the pre-commit hook script.
Also regenerated relevant .mo files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The makefile referred to a file in src/mgl/, wxMGL has been removed since r70353 so this makefile can be deleted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow inserting and deleting tools and not only appending them.
Add possibility to enable/disable and toggle tools.
Send wxUpdateUIEvent for the tools.
Add various properties accessors.
Closes#13835.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Z-move events don't have (x, y) position, but they do have Z-position which
needs to be set.
Also don't use (x, y) position for these events in the sample.
See #748.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Generate wxUpdateUIEvent for the ribbon buttons to allow updating their state
using wxEVT_UPDATE_UI. Also update the same to show this.
Closes#12003.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changes the samples to look better under Mac and avoid the worst problems such
as overlapping buttons or truncated controls.
Closes#11651.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix linking errors when using wxXML in sttaic monolithic build: in this case
we must link with expat but it was listed too early, before wxWidgets
libraries using it, in the bakefile-generated makefiles.
Now add it to the end of the linker command line too by including -lexpat in
EXTRALIBS_FOR_BASE which are appended to the linker arguments.
Notice that now -lexpat is linked twice because it is still added by
<wx-lib>xml</wx-lib> in bakefiles, even in monolithic build, but I don't know
how to avoid it and it is harmless anyhow.
Closes#12573.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The implementation is far from perfect as it relies on hard-coded margins but
is better than nothing as it allows wxNotebook best size determination and
SetPageSize() method to work correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to set the picker styles and set its range and not only the
current value.
Also log the events generated by it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.
It is also available for wxDirPickerCtrl but is less useful there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).
Extend exec sample to allow easily testing the different flags and adding more
of them later.
See #13676.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using WXK_NUMPADn with wxUIActionSimulator doesn't work under Unix, the
resulting GDK events have wrong keyval for some reason.
It would, of course, be nice to fix this but in the meanwhile use ASCII codes
to simulate the digits to at least allow doing this at all.
Also extend uiaction sample to allow testing text simulation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Send wxEVT_CHAR_HOOK event from wxOSX/Cocoa code.
Also test for wxEVT_CHAR_HOOK in the keyboard sample and show the effect of
not skipping it.
Closes#12431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow %e and %g formats (as well as their upper-letter equivalents) in
addition to the default %f format for number display in wxGrid.
Closes#13583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A checkbox on the static page was added to two sizers at once, resulting in
heap corruption later. Fix this by adding it to the right sizer only.
Closes#13619.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The initial splitter size must be set correctly when using gravity with
wxSplitterWindow as otherwise the sash would jump on first resize -- which was
exactly what happened in the splitter sample.
Add a SetSize() call to the sample with the comment explaining why is it
needed and also actually make it stick as the cached last size was not updated
before the splitter was split before.
Closes#9821.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix confusion of what cell activation is and inconsistence with native
handling in GTK+. Document the distinction between activating (~
editing) a cell and activating (double-clicking) the whole item.
Deprecate wxDataViewCustomRenderer::LeftClick() and Activate() methods,
replace them with single ActivateCell() that is called for both kinds of
activation.
Fix implementations so that ActivateCell() is not called on
double-click, when it shouldn't, and vice versa: don't send
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED for cell activation.
Partially reverts r67099 -- restores old 2.9 signatures of compatibility
LeftClick() and Activate() methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can be used to show more customizable tooltips than the native wxToolTip
but at the price of using generic implementation in some cases (actually
almost always now, with the exceptions of text control tooltips under MSW).
Extra features include:
- The balloon-like tooltip form.
- Possibility to show an icon.
- Title display in a different form.
More customization could be added later. It should be also possible to fully
implement this class natively under MSW.
Update the dialogs sample to show the rich tooltips in action.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCustomBackgroundWindow is a new class allowing to set a custom bitmap for
the background of any window. The relevant code was mostly moved from wxPanel
to which it was added only recently (before 2.9.2) making it unnecessary to
preserve compatibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is mostly important to allow using wxImage-based wxGraphicsContext
without requiring X server connection under Unix: as wxFont can't be used
without X server, we needed another way to create wxGraphicsFont in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a way to use wxGraphicsContext to draw on wxImage.
This is implemented internally by drawing on wxGraphicsBitmap which can be now
also created from wxImage.
Add a test of the new functionality to the image sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement wxTimePickerCtrl natively for MSW and add a generic implementation
(very loosely based on the original class by Paul Breen) for the other
platforms.
Also update the calendar sample to show the new control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix typo in the sample, comma was used instead of a semicolon. The code still
worked correctly but make it look correctly too now.
Closes#13453.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow the user to sort the control contents by clicking on the columns with
wxCOL_SORTABLE flag and also provide SetSortColumn() method to sort the
control programmatically.
Also add wxTreeListItemComparator class and SetItemComparator() method to
allow customizing the way the items are compared.
Update the sample to show how to define a custom comparator.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override wxDataViewModel::IsListModel() to return true if wxTreeListCtrl
doesn't have any depth. This results in better display when using the generic
implementation of wxDataViewCtrl as no space is reserved for the (unnecessary)
expanders in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These styles allow to use a smaller browse button as the standard one takes
too much space, often leaving too little of it for the more important text
control part.
Notice that both styles are, in fact, equal to wxPB_SMALL but only file and
directory pickers currently use it as it doesn't make sense for the colour and
font pickers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There doesn't seem to be any reason not to do this in the controls which we
know are meant for entering file or directory names into them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The controls were too small to see long paths in them comfortably while there
was plenty of space in the page, use wxEXPAND flag for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As we already had MSW-specific AutoCompleteFileNames(), we can just as well
also add the also useful AutoCompleteDirectories() to be used with the text
controls used for path entry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a facade for wxDataViewCtrl allowing to easily work with multi-column
trees, possibly with an optional checkbox in the first column. Its API is very
similar to wxTreeListCtrl and it provides a simple migration path from the
latter.
Add the class itself, documentation for it and minimal unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Having wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE is more consistent with already using the complete short name of an image format elsewhere (e.g. wxBITMAP_TYPE_JPEG, not wxBTMAP_TYPE_JPG, and wxTIFFHandler as opposed to wxTIFHandler). Renamed all existing occurrences and kept the old enum values for backwards compatibility.
Also renamed occurrences of wxBITMAP_TYPE_RESOURCE to the already existing wxBITMAP_TYPE_BMP_RESOURCE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid defining SetImageList() in several different places in wx API as not
only this resulted in (trivial) code duplication but this method also had
different semantics before: it didn't take ownership of the pointer passed to
it in wxTreeCtrl, wxListCtrl and wxBookCtrl and derived classes but did take
its ownership in wxDataViewTreeCtrl and wxRichTextFormattingDialog.
Harmonize this for all the classes now: SetImageList() never takes ownership
while AssignImageList() (which is now available in all classes having
SetImageList()) always does.
Also add convenience wxWithImages::GetImage() helper to avoid (more) code
duplication in wxDataViewTreeCtrl code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Thread id is an (unsigned) long, not just unsigned, so use "%lx" to print it
instead of "%x" to avoid asserts in formatting code.
Closes#13404.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).
The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also generate events corresponding to WM_SYSCOMMAND messages for the custom
items of the system menu.
Add a small snippet to test the new functionality to the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement support for wxHELP for wxMSW, wxGTK and wxOSX/Cocoa (at least when
showing the message box from the main thread, there doesn't seem to be any way
to show more than three buttons with CFUserNotificationDisplayAlert() so
"Help" button is not supported when using it).
This is useful not only on its own, i.e. to allow the user to ask for help,
but also because it brings the total number of buttons supported by the
message dialog to 4, meaning that more choices can be offered to the user
(which is rarely, but not quite never, useful).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775