Commit Graph

35 Commits

Author SHA1 Message Date
Vadim Zeitlin
40df8a51f2 Optionally allow showing tooltips for disabled ribbon buttons.
Add wxRibbonButtonBar::SetShowToolTipsForDisabled() to allow enabling the
tooltips even for the disabled buttons.

Closes #14820.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 00:16:16 +00:00
Vadim Zeitlin
94f39d8181 Add a setting for the disabled text colour to wxRibbon art.
Allow specifying the text for the labels of the disabled items separately.

Closes #14721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:23:41 +00:00
Vadim Zeitlin
652aa9360f Fix and enhance support for client data in wxRibbonButtonBar.
Add the possibility to retrieve the client data associated with a button and
not only set it (which wasn't very useful on its own).

Also allow having both typed (owned) and untyped (not owned) client data, as
in the other wxWidgets controls.

To avoid confusion between two different kinds of data, remove "client_data"
argument from the functions adding buttons and provide separate methods with
distinct names for setting and getting client data.

Closes #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:02:25 +00:00
Vadim Zeitlin
7f08b8283b Add wxRibbonButtonBarEvent::GetButton().
Allow to retrieve the button associated with the given button bar event.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:02:02 +00:00
Vadim Zeitlin
02a40ac1da Add wxRibbonButtonBar::GetActiveItem() and GetHoveredItem().
Add accessors for the button being currently clicked or hovered over.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:01:36 +00:00
Vadim Zeitlin
71a77e77d1 Add wxRibbonButtonBar::GetItem(), GetItemById() and GetItemId().
Allow accessing the ribbon bar buttons either by index or ID.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:01:12 +00:00
Vadim Zeitlin
42d7394119 Add help button support to wxRibbonBar.
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
2012-09-15 23:19:59 +00:00
Vadim Zeitlin
70f86dedfd Add page highlighting to wxRibbonBar.
Allow visually highlighting a page to make it more noticeable to the user.

Closes #14527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:36 +00:00
Vadim Zeitlin
7c70331e28 Add expand/collapse button to wxRibbonBar.
This allows the user to toggle the ribbon bar visibility.

Closes #14530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 17:53:36 +00:00
Vadim Zeitlin
5c14ec2640 Add possibility to hide and show again wxRibbonBar pages.
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
2012-07-13 11:46:43 +00:00
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
0a7ee6e0f4 Implement support for wxRIBBON_PANEL_EXT_BUTTON wxRibbonPanel style.
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
2012-06-03 19:17:09 +00:00
Vadim Zeitlin
07c7226468 Add wxRibbonControl::GetAncestorRibbonBar() helper.
New method allowing to find the ribbon bar containing the given window.

See #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:03 +00:00
Julian Smart
98742322cd Added wxRIBBON_PANEL_FLEXIBLE flag to allow toolbars to wrap, taking up the optimum amount of space when used in a vertical palette.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-12 19:30:10 +00:00
Julian Smart
8d3d5f067a Added wxRIBBON_PANEL_STRETCH to allow a single panel to stretch to fill the parent page.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-09 15:26:37 +00:00
Vadim Zeitlin
d1bf0be0bc Enhance wxRibbonToolBar functionality to wxRibbonButtonBar level.
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
2012-01-08 14:52:56 +00:00
Vadim Zeitlin
ff4cb9160e Add wxRibbonButtonBar::InsertXXXButton() methods.
Allow inserting buttons into the ribbon bar and not only appending them.

Closes #13811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:39 +00:00
Vadim Zeitlin
f01e56249a Allow using wxEVT_UPDATE_UI with wxRibbonButtonBar.
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
2011-12-29 22:05:34 +00:00
Vadim Zeitlin
c155b9b519 Use WX_XXX_ARRAY_PTR macro variants for arrays of pointers.
Arrays of pointers must not overload operator->() as it is not used with them
and is, in fact, unusable, provoking a warning from Sun CC every time such
array is declared. Use the special _PTR-suffixed versions to avoid this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:51 +00:00
Vadim Zeitlin
2f6b64a90b No real changes, just remove trailing commas from enums.
These commas are not allowed by standard C++ and Sun CC warns about them (and
some other compilers, e.g. HP aCC, even give errors for them).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:30 +00:00
Vadim Zeitlin
3603e5658f Add possibility to hide panels in wxRibbon.
Add wxRibbonBar::{Show,Hide}Panels() and ArePanelsShown() accessor.

Also add a toggle button to the sample to test the new functionality
(unfortunately it couldn't be done by a control in the ribbon itself as there
would be no way to show the panels back then).

Closes #12707.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-06 22:02:07 +00:00
Peter Cawley
955bad410e Add support for toggle buttons to wxRibbonButtonBar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 13:44:22 +00:00
Peter Cawley
32eb560338 Improve behaviour of scrolling through a ribbon gallery.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-06 23:46:25 +00:00
Peter Cawley
140091e55c Improve support for ribbon panel sizers: panels with sizers should now automatically minimise at small sizes, and behave properly when popping up from a minimised state.
Patch by johnr in trac issue #12580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 17:49:42 +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
a65b84f434 Add EVT_RIBBONBAR_TAB_LEFT_DCLICK event.
Generate a special event when a ribbon bar is double clicked.

Closes #12399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:35 +00:00
Vadim Zeitlin
1aff4201c3 Add EVT_RIBBONGALLERY_CLICKED event.
This event is sent whenever an item is clicked, even if it's already selected,
unlike the existing EVT_RIBBONGALLERY_SELECTED.

Closes #12128.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-24 12:27:25 +00:00
Vadim Zeitlin
fd6e15974c Fix bugs related to two phase creation of wxRibbon classes.
Add missing wxRibbonControl::Create() method. Ensure that member variables are
always initialized by the ctor. Check that we're fully initialized in EVT_SIZE
handler.

Closes #12018.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-07 23:38:21 +00:00
Peter Cawley
960615f410 Rewrote wxRibbonPage realisation and layout code to avoid setting the position and size of panels multiple times.
Fixed memory leak in wxRibbonToolBar::Realize().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 18:48:41 +00:00
Paul Cornett
cff9681b85 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 17:20:15 +00:00
Stefan Csomor
1437127330 fixing include type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:08:52 +00:00
Julian Smart
370eda07c1 Added missing includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 08:18:52 +00:00
Vadim Zeitlin
3175fc12b4 More ribbon compilation fixes for OS X.
Add more headers for wxColour and wxFont.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 00:17:57 +00:00
Vadim Zeitlin
91d33c61a5 Ribbon compilation fixes for OS X.
Forward declare wxWindow and wxDC classes in wx/ribbon/art.h to avoid errors
in (PCH-less?) buildbot builds.

Also include header containing declarations of private Mac functions in
implementation file (closes #11203).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 23:19:01 +00:00
Peter Cawley
3c3ead1d15 Merged GSOC Ribbon work from SOC2009_RIBBON branch into trunk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 12:06:02 +00:00