Commit Graph

83 Commits

Author SHA1 Message Date
Vadim Zeitlin
c618c0b620 Fix wxEVT_UPDATE_UI propagation for popup menus in MDI windows too
This is similar to f74379c751 but specific to
wxMSW MDI code: also call wxMenu::UpdateUI() without any parameters from it
instead of overriding its logic for determining where to send the events.

Add code to the mdi sample demonstrating that the event handlers in the window
itself and its MDI frame parent get the events they're supposed to get.

See #17352.
2016-01-30 21:33:38 +01:00
Vadim Zeitlin
e89fc9c152 Avoid annoying prompt when closing MDI sample with one window
Ask the user when closing the window with several MDI frames opened, if only
to demonstrate how to do it, but not if there is only one window as this is
just too annoying when using the sample for testing.
2016-01-30 21:30:43 +01: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
1c6bb3f5b8 Add a popup menu to the MDI sample.
This is just to test how wxEVT_MENU_HIGHLIGHT events from popup menu items are
handled under the different platforms.

Also log menu events to the canvas window too as it now gets some.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:38 +00:00
Vadim Zeitlin
5ef2ab09c6 Add logging of wxEVT_MENU_HIGHLIGHT events to the MDI sample too.
This allows to easily compare which events are generated and sent to which
objects under different platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:34 +00:00
Vadim Zeitlin
8de1128c07 Return correct menu pointer for wxEVT_MENU_{OPEN,CLOSE} in MDI frames.
These events are supposed to carry a pointer to the menu which was opened or
closed, but wxMenuEvent::GetMenu() always returned NULL for the menus opened
when a child MDI frame was active, as its menu bar, containing the menu, was
not searched for it.

Fix this by overriding MSWFindMenuFromHMENU() at wxMDIParentFrame level, just
as we already do for FindItemInMenuBar().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:31 +00:00
Paul Cornett
5b4a70247c use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 07:07:55 +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
Paul Cornett
ea92bb677d use stock colour/pen/brush objects in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 23:06:50 +00:00
Vadim Zeitlin
e709239889 Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks.
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
2012-03-04 00:28:58 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +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
4f7cd56c14 don't duplicate menu creation code in the parent and child frames
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-28 09:00:49 +00:00
Vadim Zeitlin
1483e5db8d refactor WM_COMMAND messages handling in MDI frames to avoid duplicating code unnecessarily and generally streamline it; added possibility to use custom menu commands in the "Window" menu and specifying accelerators for them now works too (show this in the sample); finally added standard ids for the MDI window menu commands
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-27 16:47:41 +00:00
Vadim Zeitlin
9089cffbf5 test ShowFullScreen() to verify that restoring menu works correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-26 23:17:09 +00:00
Vadim Zeitlin
9298a1c2ac use a slightly less ugly way to conditionally suppress unused parameter warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-09 13:36:23 +00:00
Vadim Zeitlin
d2824cdb7f Review/simplify/cleanup MDI classes for all platforms and introduce base
classes for wxMDI{Parent,Child}Frame and wxMDIClientWindow.

Also use generic MDI implementation for wxMotif as it seems to be more
functional and definitely is more maintained (we probably should use the
generic version for wxGTK too).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-04 02:46:19 +00:00
Chris Elliott
1583600031 fixes as per http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/92325
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-10 07:44:34 +00:00
Vadim Zeitlin
bacbf21352 we don't need status bar in the MDI children
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-18 17:29:16 +00:00
Vadim Zeitlin
45e6e6f8ab call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-04 00:34:18 +00:00
Vadim Zeitlin
ea7fb468ce include correct XPMs (Unix compilation fix after last commit)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-18 00:08:27 +00:00
Vadim Zeitlin
e21d861412 Some sample cleanup:
1. Use standard sample icon, avoid badly looking #ifdef __WXMSW__s
2. Use "modern" (i.e. this century) wxToolBar API, simplify code by
   not allocating the bitmaps on the heap and deleting them any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-17 15:04:05 +00:00
Włodzimierz Skiba
37f66b047e Use same type in both results of A?B:C operator (Tinderbox build fix).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 06:48:03 +00:00
Vadim Zeitlin
c9f856af67 added code to test UI updating of menu items in MDI apps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-24 13:36:22 +00:00
Włodzimierz Skiba
4219b5e7c7 Code cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-16 16:05:58 +00:00
Vadim Zeitlin
290c74fbed just added wxUSE_MENUS around code using the menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-07 01:12:49 +00:00
Vadim Zeitlin
c3b7706c4f don't override OnIconized() in the sample, the bug this was working around is now fixed in wxMSW itself
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-11 13:29:28 +00:00
Chris Elliott
77380b5cba fix SF bug 1236365 (tested in VC only)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-27 08:49:08 +00:00
Włodzimierz Skiba
422d0ff0be wxDefaultSize.* and wxDefaultPosition.* to wxDefaultCoord.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-20 10:09:47 +00:00
Włodzimierz Skiba
8520f1374c Fixes for wxUSE_STATUSBAR.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-19 15:36:01 +00:00
Chris Elliott
a4f1a5f286 fix bug with button doing nothing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-23 16:04:10 +00:00
Włodzimierz Skiba
eb839c8423 -1->wxID_ANY, wxDefaultSize, wxDefaultPosition, TRUE->true and FALSE->false replacements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-01 16:09:27 +00:00
Julian Smart
be5a51fb59 More name changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-25 11:20:37 +00:00
David Elliott
9fa453eca5 Include mondrian.xpm for _all_ platforms except wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-06 18:36:49 +00:00
David Elliott
6ceba1749e Wrap ToolBar stuff with #if wxUSE_TOOLBAR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-06 18:33:09 +00:00
Julian Smart
5f58391f70 Removed warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-11 07:18:26 +00:00
Julian Smart
6aa89a22b8 Fixed copyrights and licence spelling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-17 11:55:54 +00:00
Mattia Barbon
42ed75321c More samples/Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-15 10:23:11 +00:00
Vadim Zeitlin
2b5f62a0b2 merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-04 14:11:26 +00:00
Julian Smart
a9c824e90f OnSize must not be skipped for non-wxX11 platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-22 15:44:34 +00:00
Julian Smart
b9f933ab5d Applied patch [ 597398 ] Generic MDI, wxNotebook based.
By Hans Van Leemputten (hansvl)

- This patch implements a generic notebook based mdi,
due to that wxMDIChildFrame could not derive from
wxFrame some things in the samples and in the docmdi
classes needed to be adjusted... basically this comes
down to not do (wxFrame *) but instead do
(wxMDIChildFrame *), or store a pointer to the frame in a
wxWindow* instead of a wxFrame variable...

- The main reason wxMDIChildFrame cannot derive from
wxFrame is that it would take to much platform specific
functions to be overwritten (= lot of ifdef's). This then
couldn't be called generic anymore, so that's why we
need to derive from wxPanel...

- Tested on/with:
1. wxMSW (I disabled the MSW MDI implementation to
be able to test it), tested it with the MDI sample,
docvwmdi sample and docview sample and also tested it
with wxWorkshop. (test = compile and run)
2. wxX11, tested with the same set wxWin samples as
the wxMSW test. I also compiled wxWorkshop with it,
but could not run wxWorkshop due to some issue not
related to the MDI implementation.

- How to apply:
* Apply the patch
* move mdig.cpp into wxWindows/src/generic/
* move mdig.h into wxWindows/include/wx/generic/

- Some extra things that still need to be done:
* File lists, project files should be updated to include
mdig.cpp (the patch only change this on wxX11)
* The configuration script should be updated.
* Maybe wxUSE_GENERIC_MDI_ARCHITECTURE also
should be added so it is only included when wanted...




git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-20 09:09:55 +00:00
Chris Elliott
d04d32c4ec removing bitmaps from mdi sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-12 11:56:01 +00:00
Julian Smart
618f2efa41 Added __WXX11__ tests where appropriate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-21 10:32:18 +00:00
Gilles Depeyrot
012f2cb251 use "..." instead of <...> for wx includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-01-19 14:50:37 +00:00
Mattia Barbon
4693b20c75 Unicode compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-09-21 20:21:44 +00:00
Vadim Zeitlin
3ebcfb769f applied patch #428104 (SetSizeHints() for wxMDIChildFrame)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-06-16 01:36:35 +00:00
Gilles Depeyrot
e70d4ce8d6 updated CodeWarrior projects for latest wxMac commits
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-09 21:01:26 +00:00
Vadim Zeitlin
fa762db4ed fixed compilation problems (mismatch between header and cpp)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-12-18 15:50:03 +00:00
Robert Roebling
47c93b637e Applied colour patch for better 8-bit support,
Improved handling of inserting controls into
    a toolbar that don't have any def width. This
    works for all controls but wxComboBox.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-12-16 12:27:26 +00:00
Vadim Zeitlin
3d8dea7e2e merged in the small changes from the 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-12-10 12:04:19 +00:00