Commit Graph

152 Commits

Author SHA1 Message Date
Tim Kosse
116112bcf5 Fix a compile error with some compilers introduced in r76813.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-10 09:51:41 +00:00
Tim Kosse
def3b2c90f Items appended via the menu have no item data. Don't crash if right-clicking these items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 16:47:25 +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
b01d1a5e97 Add a helper function to get the last tree item to the sample.
This makes the behaviour of different menu commands working with the "last
item" consistent as some of them used the last root child while others used
the really last item (i.e. the last child of the last child).

This should have been part of r75987.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:54 +00:00
Vadim Zeitlin
90860e9444 Remove code maintaining last item from the treectrl sample.
The code was buggy (e.g. it didn't update the last item correctly after
executing "Append many items" menu command) and seems to be unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:53 +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
4e1e8dc51b Change wxMSW wxTreeCtrl::DoFreeze() to not hide the tree any more.
Hiding the tree when it's frozen, as done in r72665, results in its own
problems, e.g. loss of focus. So don't do this but resize the control to a
very small size when freezing it and restore it to its old size afterwards.

Closes #15166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:36 +00:00
Vadim Zeitlin
d6b180ec36 Don't show log menu tiems in the tree control sample when !wxUSE_LOG.
No real changes, just correct the "#if wxUSE_LOG" placement.

See #4024.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-06 12:43:48 +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
27bc919446 Add a possibility to beep on no match to wxGenericTreeCtrl.
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
2012-10-07 22:42:02 +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
Dimitri Schoolwerth
2d143b6689 Removed ellipsis from "About..." occurrences.
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
2012-01-20 16:51:09 +00:00
Dimitri Schoolwerth
a1b806b982 Replaced Ok() occurrences with IsOk() throughout trunk.
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().

Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 16:29:04 +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
22993989b4 Don't send wxEVT_COMMAND_TREE_ITEM_MENU event without valid item in wxMSW.
The generic wxTreeCtrl version only sends this event when the mouse is right
clicked on a valid item so do the same in wxMSW version too for consistency.

This is also consistent with wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK event and
avoids strange problems with unexpected wxEVT_COMMAND_TREE_ITEM_MENU events
generated on right double click.

Finally, replace the checks for item validity in the event handler in the
sample with asserts which should loudly complain if it happens to be invalid.

Closes #11226.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:52 +00:00
Vadim Zeitlin
ce00f59b5b No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:44:45 +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
e95f081682 Add a test for selecting the last item in the tree control sample.
This allows to test whether an item is brought into view by selecting it,
see #11154.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:43:11 +00:00
Vadim Zeitlin
5708ae18f2 Add wxTreeCtrl::{Clear,Set}FocusedItem().
Allow changing just the currently focused (not selected) item and also
removing the focus completely.

Closes #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:01:30 +00:00
Vadim Zeitlin
5cb3a695e0 Add wxTreeCtrl::SelectChildren() method.
Add MSW and generic implementation, documentation and change to the sample
showing it.

Closes #11620.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 12:43:39 +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
43b2d5e7c3 Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-20 16:47:54 +00:00
Vadim Zeitlin
febebac1a0 added wxTreeCtrl::GetFocusedItem() (closes #10859)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-19 23:34:51 +00:00
Vadim Zeitlin
51a5c8df7c improve wxTreeCtrl::ScrollTo() behaviour in the generic version and add a test for it to the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-31 13:08:16 +00:00
Vadim Zeitlin
bd5d8ac1b5 define constants for the number of items in the tree at each level and number of levels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 12:48:51 +00:00
Vadim Zeitlin
5cfb5f66af add a menu item to test setting focus (see #626 comment:42)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-16 11:49:04 +00:00
Vadim Zeitlin
a10c8e43d0 add event.Skip() in EVT_CONTEXT_MENU handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-17 09:53:19 +00:00
Vadim Zeitlin
df4a099cbe fix state images after changing their style (see #9591)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-25 18:34:45 +00:00
Robert Roebling
11339a3884 Use xpms for checked/unchecked states instead of drawing them (yielded junk)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-17 11:58:39 +00:00
Vadim Zeitlin
a6aa377bb3 use transparent icons and clear the DC before drawing them to fix the background of state icons appearance (part of #9591)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 19:15:19 +00:00
Vadim Zeitlin
0c6afdbf4c test showing parent/sibling items too (#9903)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-03 20:16:56 +00:00
Robert Roebling
f95dc4d620 Compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-24 12:56:25 +00:00
Robert Roebling
4754ab1630 Next part of tree state icon patches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-24 12:48:01 +00:00
Vadim Zeitlin
ec8bb9248e compilation fix after the last change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-24 15:09:39 +00:00
Vadim Zeitlin
8c7da4a6b2 correct toggling of the selected icon (closes 4029)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-23 18:49:22 +00:00
Vadim Zeitlin
f73eddd2a5 made wxTreeCtrl::GetNextVisible() behave in the same way in Win32 as in the generic version and implemented GetPrevVisible() in the generic version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-07 21:58:51 +00:00
Vadim Zeitlin
f87a111f9e added a menu command to clear log
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-10 23:48:51 +00:00
Vadim Zeitlin
527343602e 1. changed wxIconBundle to use m_refData and COW to make copying icon bundles
fast (which was needed for 2)
2. make it possible to return wxIconBundles from wxArtProvider
3. implement Mac-specific wxArtProvider doing (2)

(modified patch 1581960)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-07 19:59:51 +00:00
Vadim Zeitlin
c6a6bbbf63 disable select root menu command when the root is hidden
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-30 12:58:01 +00:00
Paul Cornett
9812391356 fix assertions on invalid items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-11 23:29:26 +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
8f6dc819f8 return correct item and position from wxTreeEvent::GetItem/Point() (patch 1622166)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 15:43:22 +00:00
Vadim Zeitlin
e525c4ff96 test GetBoundingRect()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 11:26:51 +00:00
Vadim Zeitlin
a978c7d258 show the item for which the context menu is shown correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-22 22:33:25 +00:00
Paul Cornett
b143cf708b 64-bit warning fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 05:36:31 +00:00
Vadim Zeitlin
5c2603c2e8 make log messages more readable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-24 15:24:19 +00:00
Robert Roebling
3bb918c097 Added test to reproduce [ 1541148 ] wxTreeCtrol: crash if right mouse click
The MSW tree control sends a series of invalid events.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-24 11:13:17 +00:00
Vadim Zeitlin
998cee6792 make control children of a panel and not directly the frame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-03 23:43:35 +00:00
Włodzimierz Skiba
b2c82287f6 Final steps to move to common icon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 06:43:18 +00:00
Stefan Neis
344d066d17 Use xpm for PM port on OS/2 as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-16 16:13:51 +00:00