Commit Graph

86 Commits

Author SHA1 Message Date
Vadim Zeitlin
2054b6b35f Log wxMenuEvent::GetMenu() in the menu sample for wxEVT_MENU_{OPEN,CLOSE}.
Show the menu associated with the event, if any, directly in the sample to
make comparing the behaviour of the different ports easier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:27 +00:00
Dimitri Schoolwerth
6b12639c49 Fix failing Win32 calls with checkable menu item.
Since r76202 InsertMenuItem is used when adding checkable menu items even
without a bitmap. The call fails because hbmpChecked and hbmpUnchecked are
set to HBMMENU_CALLBACK on pre-Vista, making the menu owner drawn
unnecessarily.

Fix by adding GetHBitmapForMenuCheckable which is used when assigning
values to hbmpChecked and hbmpUnchecked. GetHBitmapForMenu remains
unchanged (for possible porting reasons) and is used for hBmpItem only.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 20:05:30 +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
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
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
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
95316a3f24 Move menu messages handling from wxFrame to wxTLW in wxMSW.
This allows to generate the menu open/close/highlight events correctly for the
popup menus used in the dialogs.

Extend the menu sample with a test using such menus.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:13 +00:00
Vadim Zeitlin
816e7781b0 Fix menu sample compilation under wxOSX.
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
2012-05-20 20:29:15 +00:00
Vadim Zeitlin
1580a10d87 Always provide wxMenuItem bitmap-related methods in wxMSW.
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
2012-03-04 00:29:55 +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
f2012fa639 Remove __WXMGL__ tests from the samples too.
__WXMGL__ is not used any longer, remove it from the samples too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 18:50:35 +00:00
Dimitri Schoolwerth
d13b34d3f2 No code changes, fixed various typos.
Applied patch by snowleopard2 fixing typos in interface/. Extended the fixes throughout trunk.

Closes #13076.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-03 20:31:32 +00:00
Dimitri Schoolwerth
4c51a665c6 Fixed various typos.
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.

Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").

Closes #13063 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:17:38 +00:00
Vadim Zeitlin
18f42b94df Remove calls to wxApp::SetTopWindow() from the samples and documentation.
It is definitely not necessary to call SetTopWindow() when there is only a
single top level window and it is arguable whether it's useful to do it even
when there are many of them so don't encourage its use in the documentation
and also remove all its occurrences from the samples.

Closes #12816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:05:14 +00:00
Vadim Zeitlin
553d672896 Make menu operations always work with "Test" menu in the sample.
Some tests in the "Menu" menu of the menu sample worked with the "Test" menu
while others used the last one ("Help" initially but possibly something else
if the test commands from "Menubar" menu were used).

Harmonize all menu commands to use the "Test" menu now.

See #12668.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:02:50 +00:00
Vadim Zeitlin
08e78a5412 Add a test for deleting a sub-menu to the menu sample.
Also fix some typos in the help message.

See #12668.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-10 00:36:50 +00:00
Vadim Zeitlin
4ded4e1910 Remove test code accidentally committed as part of r66015.
Don't call wxMenuItem::Set{Background,Text}Colour() in the menu sample, this
was for testing only.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-05 12:53:44 +00:00
Vadim Zeitlin
e801524514 Use explicit menu item background if it's given under MSW.
An explicit item background colour specified in user code should override the
default theme background.

Closes #12652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-04 10:57:19 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
e8c0d57346 don't omit wxOK in wxMessageBox() call
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 16:29:23 +00:00
Francesco Montorsi
41f02b9acc always call SetIcon() on the main frame of the sample; some small cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 01:01:00 +00:00
Vadim Zeitlin
6b1eedc1bb add more stock items (#9799)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-01 14:38:02 +00:00
Vadim Zeitlin
00a77b7c5d added wxWindow::GetPopupMenuSelectionFromUser() (modified patch 1793823)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-23 23:42:31 +00:00
Julian Smart
68bc148cac Compile fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-11 18:39:49 +00:00
Julian Smart
52af3158e9 Menu label consistency changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-11 17:54:59 +00:00
Vadim Zeitlin
7f2bcd064c use DisableTimestamp() instead of SetTimestamp(NULL)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-27 19:25:58 +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
cfbf301d7c test rendering of disabled items with bitmaps (for bug 1632888)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-14 20:45:30 +00:00
Vadim Zeitlin
f1a9b1a3d9 removed GTK header include
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-11 14:11:38 +00:00
Robert Roebling
ee0a94cfc2 Commited FRM's stockitem patch (empty stock items).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-03 12:23:04 +00:00
Vadim Zeitlin
ab73fe8d1d added stock menu items support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-20 22:24:57 +00:00
Julian Smart
92f07cf89e Proposed syntax for telling WinCE whether a context menu is available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-28 14:18:45 +00:00
Julian Smart
42b16af462 WinCE can't copy with title in menu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-28 13:26:55 +00:00
Julian Smart
8e1b6d43a7 Fix nonsensical checked menu item label and behaviour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-02 18:19:04 +00:00
Mart Raudsepp
6716099174 Any reason why we #if the menuitem bitmap code in the menu sample? For now just adding wxGTK in addition to
wxUSE_OWNER_DRAWN case, for the cases where bitmaps are to be set...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-15 22:40:32 +00:00
Vadim Zeitlin
030f50ef4a modified GetLastMenuItem() to also take into account the popup menu items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-28 13:17:29 +00:00
Włodzimierz Skiba
532d575bd9 Allow MSW Base be usable in other ports than wxMSW (ie. wxTVision in windows console). Adjustements for limited setup.h (as in wxTV) and minor source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-10 17:53:19 +00:00
Michael Wetherell
aaf996e5ef I don't think wxX11 and wxMGL support EVT_CONTEXT_MENU yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-18 20:39:34 +00:00
Robert Roebling
98f297837a Readded test for wxMenuItem::SetLabel() to sample.
Support for hotkeys in names functions for GTK+2.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-16 16:53:55 +00:00
Robert Roebling
ac103441d1 Applied patch which solved conflicts between wxWidgets
and GTK+'s context menu code.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-16 15:27:15 +00:00
Vadim Zeitlin
9f486b326a gave different accels to different radio items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-19 22:35:22 +00:00
Václav Slavík
232ba4c332 compilation fix: only us-ascii is safe in sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-25 18:56:33 +00:00
Dimitri Schoolwerth
2153bf897a replaced menu calls Append([...], true) with the less cryptic AppendCheckItem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-13 00:02:35 +00:00
Mattia Barbon
c1a48eafdf Warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-05 20:49:42 +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
Włodzimierz Skiba
1242c2d976 Menu sample is helpful in bringing new port and should work in limited setup.h. My first wxW commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-18 11:52:25 +00:00
Vadim Zeitlin
ba8eb933c4 and now fixed USE_CONTEXT_MENU definition as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-13 10:47:02 +00:00
Vadim Zeitlin
51a9eb7327 fixed USE_CONTEXT_MENU tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-13 10:46:17 +00:00
Vadim Zeitlin
62ad15a5b2 do use context menu event under wxGTK, it is supported there now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-08 19:15:46 +00:00
Julian Smart
6ee9b7b53e Applied patch [ 868373 ] Missed Unicode markup in menu sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-08 11:36:38 +00:00