Commit Graph

92 Commits

Author SHA1 Message Date
Tobias Schlager
73f6f622f9 Allow specifying the maximum width of static text in dialogs
This patch allows specification of the maximum width of static texts
created with wxDialog::CreateTextSizer.

The patch preserves backwards compatibility by setting the previous
width value as the default argument value.

Closes https://github.com/wxWidgets/wxWidgets/pull/355
2016-12-01 14:06:43 +01:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Tobias Taschner
f1abb351af Remove MicroWindows support.
MicroWindows (aka Nano-X) support hasn’t been updated since 2010 and last work for it in wxWidgets happened more than 10 years ago.
2015-08-27 11:00:16 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
1ca1d77e01 Remove the inclusions of wx/cocoa headers which don't exist any more.
This should have been part of r76735: in addition to removing the old Cocoa
port headers, also remove the references to them from the common include
files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 13:28:42 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Paul Cornett
16fc5c6a61 remove extraneous semicolon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-10 16:05:07 +00:00
Václav Slavík
5ca59eb82e Destroy the wxDialog::ShowWindowModalThenDo() functor a.s.a.p.
Previously, the functor was kept in a helper event handler that was bound to
wxEVT_WINDOW_MODAL_DIALOG_CLOSED and only marked as already called, but never
unbound. Consequently, the functor object remained allocated for as long as the
event table existed and was only freed with the dialog instance.

Change the logic to destroy the functor object as soon as it was called and is
no longer needed for anything.

This is particularly important when used with C++11 lambdas that capture the
dialog in a wxWindowPtr pointer, because the pointer would be retained forever
otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 12:19:56 +00:00
Václav Slavík
c5d4360fc9 Add lambda-friendly wxDialog::ShowWindowModalThenDo().
Add a convenience ShowWindowModalThenDo() variant of ShowWindowModal()
that takes a functor argument and calls it when the dialog is closed.

This is, of course, particularly useful when the argument is a C++11
lambda, especially when having more than one window-modal dialog invoked
from the same window, which can get messy quickly with all the
wxEVT_WINDOW_MODAL_DIALOG_CLOSED handlers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:20 +00:00
Vadim Zeitlin
35d6156ba4 Don't enable dialog navigation inside wxFrame by default.
This was done, apparently accidentally, by r68366 and resulted in cursor arrow
keys not being sent by default to the wxFrame children under MSW any more as
they were used for dialog navigation instead.

So don't derive wxTopLevelWindow from wxNavigationEnabled<> any more and only
derive from it at wxDialog level.

Closes #15445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:53 +00:00
Paul Cornett
092162bc12 wxDialogBase only has one ctor, so just do initialization in ctor instead of Init()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 05:04:11 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
bd362275b8 Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 01:05:28 +00:00
Vadim Zeitlin
a601696dd5 Add EVT_WINDOW_MODAL_DIALOG_CLOSED() event table macro.
Add it for consistency with wxEVT_WINDOW_MODAL_DIALOG_CLOSED.

See #13804.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:05 +00:00
Vadim Zeitlin
32a925f832 Change wxDIALOG_NO_PARENT to avoid clash with wxICON_EXCLAMATION.
Use 0x20 (wxAPPLY) instead of 0x100 (wxICON_EXCLAMATION) for
wxDIALOG_NO_PARENT as otherwise using wxICON_EXCLAMATION with wxMessageBox in
wxGTK (and possibly other ports, although not wxMSW which doesn't honour
wxDIALOG_NO_PARENT for message boxes at all) resulted in not using the
specified parent for the message box and, as a side effect, not centering it
on its parent neither.

Closes #13464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 11:06:11 +00:00
Vadim Zeitlin
6d61520df3 Fix wxStandardDialogLayoutAdapter compilation with wxUSE_BUTTON==0.
This class probably should not be compiled in at all in the minimal build but
in the meanwhile just add #if checks around its button-related parts.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-10 13:51:57 +00:00
Vadim Zeitlin
83a7613b71 Use the same logic for closing dialogs as for handling Escape key.
Pressing "Esc" key closed the dialog with only wxID_OK button (but no
wxID_CANCEL one) by default but pressing the "close window" button only closed
it if wxID_CANCEL was present.

Fix this by using the same code in OnCloseWindow() as in OnCharHook(), after
extracting it into the new SendCloseButtonClickEvent() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-09 20:53:26 +00:00
Vadim Zeitlin
b14cca2a84 Extract CreateSeparatedSizer() from wxDialog::CreateSeparatedButtonSizer().
Extract the code adding a separating wxStaticLine to the sizer in its own
function to be able to reuse it in upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-30 21:48:16 +00:00
Vadim Zeitlin
c79510ca12 Make the main message of wxGenericMessageDialog stand out.
Use larger bold font for the main message in wxGenericMessageDialog if the
extended message is also given to make it stand out similarly to how it
happens in the native GTK and MSW dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-19 15:41:18 +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
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
cdc48273b4 Fix bug with using uninitialized flags in GetParentForModalDialog().
GetParentForModalDialog() was called from the ctor initialized list before
m_windowStyle could be initialized by the base class ctor in several different
places, meaning that the check for wxDIALOG_NO_PARENT in this function was
using uninitialized variable.

Fix this by passing the style parameter explicitly to this function to allow
using it from derived class ctors. Still keep an overload which uses the
actual window parent and flags which is simpler to use for later calls to this
function.

Thanks valgrind for finding this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-18 00:05:37 +00:00
Stefan Csomor
1814b27e45 make sure we can override GetModality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-25 17:12:07 +00:00
Kevin Ollivier
9482c64466 Start on ShowWindowModal for OS X Cocoa. Not working properly as children do not display.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 20:06:48 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
12a124ddc9 remove confusing wxDialog::ButtonSizerFlags and extract button styles properly in each generic dialog implementation instead (closes #9836)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-23 08:56:32 +00:00
Stefan Csomor
94b4dd5499 add window-modal dialog calls and fallback implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-13 07:01:51 +00:00
Vadim Zeitlin
4f73f25cc8 don't use GetParent() in GetParentForModalDialog() itself as it can be called before m_parent is initialized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-09 16:55:37 +00:00
Vadim Zeitlin
8bda0ec6a3 remove wxMSW-specific FindSuitableParent() and use GetParentForModalDialog() everywhere; extend it with additional checks and remove redundant ones elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-09 12:26:15 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Julian Smart
3aa8e4ea6d Added automatic dialog scrolling ability
Added ability to resize wizard bitmaps automatically
Made it easier to derive from wxWizard and override behaviour,
mainly by making members protected instead of private



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-29 16:35:39 +00:00
Vadim Zeitlin
f36e602b3f make various control names constants of type char, not wxChar, as this is more compatible with the old ANSI build and it doesn't make much sense to use wchar_t for ASCII strings anyhow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 21:37:46 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
049908c573 make wxFrame a wxControlContainer too, so that it behaves in the same way as wxDialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 16:29:23 +00:00
Vadim Zeitlin
2229243bdf added wxDialog::GetParentForModalDialog() and use it to try to always create modal dialogs with a parent (slightly modified patch 1702962)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-22 20:34:41 +00:00
Vadim Zeitlin
25eb10d2e1 added CreateSeparatedButtonSizer(), changed signature and semantics of CreateButtonSizer()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 21:10:22 +00:00
Vadim Zeitlin
a9f620daf4 don't use dynamic handlers for standard buttons as this prevents static event handlers in derived classes from working; just catch all button events in a static handler instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-20 14:02:51 +00:00
Vadim Zeitlin
551f281b79 handle the buttons with ids specified in SetAffirmative/CancelId() as Ok/Cancel
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-20 10:30:26 +00:00
Vadim Zeitlin
2158f4d798 moved all wxDialog event handlers to wxDialogBase to avoid code duplication
(sixplication?) among ports; as a side effect added public wxDialog methods to
wxDialogBase as well and moved EndDialog() (previously implemented by wxMSW,
wxMotif, wxMac and wxCocoa but not the other ports) to wxDialogBase too


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-19 22:56:11 +00:00
Vadim Zeitlin
0be2741893 centralized Esc key handling for closing the dialogs in wxDialogBase:
1. added wxDialogBase::OnCharHook() and removed this event handler from
   all the other ports
2. also removed ad hoc code doing the same thing in wxMSW (MSWProcessMessage()
   override in wxDialog) and wxGTK (in gtk_window_key_press_callback())
3. reimplemented EmulateButtonClickIfPresent() portably and also moved it
   to wxDialogBase from wxMSW wxDialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-19 22:36:10 +00:00
Mart Raudsepp
1be7a35c5e Include gtk1 headers for non-gtk2. I don't really like this CPP logic, or more exactly __WXGTK__ without __WXGTK20__
being GTK1, oh well.
Might have missed some.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-23 03:27:34 +00:00
Mart Raudsepp
63ec432bd7 Move constant strings to .rodata/.data.rel.ro ELF segment from .data by making them really const.
If any more exotic toolchain decides to not export these strings into the core library anymore, let me know. Try to
compile the notebook sample, for example.
TODO: Move strings not meant for wxCore out of wxCore to the appropriate library.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-16 14:59:55 +00:00
Włodzimierz Skiba
897b24cf5c More common code moved from generic dialogs to wxDialogBase::CreateButtonSizer(). New system option 'wince.dialog.real-ok-cancel'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-15 10:06:15 +00:00
Vadim Zeitlin
c6ece59558 added and documented SetEscapeId()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 20:17:01 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00