1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
wxFlatNotebook - This class represents a flat notebook control for the
wxWidgets C++ GUI frame work, which manages multiple windows with associated tabs using different styles
============
BUILD INFO:
============
To build using MSVC 7.1 - Simply open the soltuion file wxFlatNotebook.sln - and build
To build using g++ compiler on Linux,
# cd contrib/build/wxFlatNotebook
# make clean
# make type=[release | debug ]
This will create both the library and the wxFlatNotebookTest executable
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VERSIONS:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
===========================================
Version 0.9
===========================================
Release date: 05/01/2006
===========================================
Version 1.0 First stable version, please report any bugs to Eran Ifrah at:
===========================================
eranif@bezeqint.net
or the wxForum at the 'the Code Dump' Forum
Enjoy,
Eran
===========================================
Version 1.1, Updated at 1/11/2006 9:40PM:
===========================================
This release contains minor bug fixes, plus introducing the following new features:
- Darg and Drop of tabs is now enabled between different Notebooks
- User can now disable a tab - a disabled tab will block the following operations on it:
+ No Right click menu
+ The window itself is disabled (Not only the tab)
+ User can not select this tab
+ User can not drag this tab
+ User can not use navigation keys (Ctrl+Tabs / Ctrl+Shift+Tab) to reach this tab
However, user can still close this tab using the 'X' button.
Thanks to all contributors (espcially T-Rex)
Eran
======================================================
Version 1.2 Updated at: 1/25/2006 11:11PM
======================================================
Fixed following bugs / features were added:
+ Tested on Linux (Fedora Core 4) - makefile is now provided !
+ Fixed bug that causes focus lost when using tab+ctrl
+ Added a style to disable the drag and drop
+ Flickering of buttons was reduced significally
+ Buttons (Left, Right, X) now has nice effects when pressed, hover, clicked
+ Buttons area is now used better - when hiding buttons, more place is left for drawing tabs
+ Notebook style now uses wxWindowBase flag rather then keeping its own member, this allows applying regular style (e.g. wxSIMPLE_BORDER) to the notebook
+ wxFNB_TABS_BORDER_SIMPLE was added and now replacing the wxFNB_BORDER - this flag draw a gentle border around the page container
+ When no tabs in the notebook, the background colour is now set to wxSYS_COLOUR_APPWORKSPACE - this gives more MDI look and feel on Windows
+ Fixed tabs drawing glitches - more space between the images and the text and the tab borders
+ Code clean up - especially the OnPaint() function
======================================================
Version 1.3 Updated at: 3/1/2006 11:15PM
======================================================
Fixed following bugs / features were added:
Features:
--------
+ Changed the buttons ( <>x buttons ) coloring to be more XP look
+ An option to remove the border around the tab area
+ Set/Get colors of the following:
- Active tab text
- Non-Active text
- Tab area colors
- Active tab color
+ New option introduced to add 'X' button on active tab
+ New event is now fired after page is being closed wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED -
this allow the application to preform some cleanup after closure of page
+ An option to disable a tab - a tab can now be disabled, which means it will not receive any event, user can not select
it nor navigate to it (using Ctrl+Tab/Tab)
Bugs:
----
+ Fixed minor drawing issues
+ Fixed bug that when closing the a tab using the mouse middle button, the page was set to active and only then closed.
+ Fixed bug that the old selection value in the event when closing a page was incorrect
======================================================
Version 1.5 9/13/2006 7:40PM
======================================================
Features:
+ New style added - VC8 style, with curved tabs
The new style has the following features
- Background of tab area can be painted in gradient
- Colourful tabs - a random gentle colour is generated for each new tab (very cool :))
Note: that the new tab DOES NOT support 'X' button on the tab
+ Build for DLL debug/release was fixed (on windows)
+ Makefile for Linux is now more generic using wx-config tool
+ Several drawing issues were fixed
+ Tabs now has an extra line that separate them from the page
========================================================
Version 2.0
========================================================
- Code refactoring:
+ remove wxStyledNotebook class, the same functionality now exist under wxFlatNotebook
+ All drawing was moved to renderers (wxFlatNotebook.cpp file is now cleaned from drawing)
+ Now using smart_ptr & singleton template classes where ever possible
- Added smart tabbing style with new and easy way to select tabs (request #1527285)
Once this style is enabled, pressing Ctrl+[Shift]+T will popup a dialog with all the open tabs, another Ctrl+[Shift]+T will run throw the
dialog list, until the Ctrl key is released.
- Added new styles:
wxFNB_SMART_TABS - which enables the above feature
wxFNB_DROPDOWN_TABS_LIST - which replaces the '<>' (left, right arrows buttons) with a drop down list (popup menu) with all the open tabs
this feature is similar to VS8 tabs styles.
- Fixed a bug in SetSelection - in case that the navigation buttons were hidden, and the selection was not visible, it did not ensure that it will be visible
========================================================
Version 2.1
========================================================
This version is released shortly after 2.0 since v2.0 contained many code changes, I expected feedback from user
which came ... (as expected)
So, the following changes fixes applies to v2.1:
- 'x' button on tabs with VS8 style
- dropping page on foreign notebook that does not have image list, while the page does have caused a crash
- Drawing problems with VS71 & Fancy style when selecting the bottoms tabs
- DeletePage, RemovePage now accepts second argument to allow user to disable page closing events
- Page changing events are now fired from SetSelection, to fix a problem where only mouse left click allowed users to handle the page changes event (e.g. Ctrl + T did not fire page changes event ... )
- If no right click menu is provided, an event wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU is fired (a bug that existed preveneted this event to be fired)
- wxFNB_ALLOW_FOREIGN_DND style added (check the demo)
- All xpm files are now located on a single resource file
- the smart tabbing dialog icon, was replaced from PNG to XPM.
========================================================
Version 2.2 13/05/2007
========================================================
- New style was added wxFNB_FF2 - which emulate a mix between Firefox2 & AUI, this style makes the notebook more natural when mixing between AUI & wxFNB
- A built-in customization dialog is now available for customizing the notebook - enable it by rigth-click on
empty tab area. The dialog allow customizing the following notebook options:
+ Visual style of the tab (one of 5 styles: FF2, VC8, VC71, defualt, fancy and the default)
+ Changing the navigation style between <> arrows to drop down arrow + menu or none
+ Tab orientation (bottom | upper)
+ Draw border around tab area
+ Enable mouse DClick to close tab
+ DClick closes tab
+ Hide/Show close button (the right far one)
+ Hide/Show close button on active tab
+ Enable/Disable smart tabbing
+ Enable drag and drop (plus foreign DnD)
+ Effect: enable gradient painting for the tab area
+ Effect: enable rnadom tab colour (VC8 only)
There are cases when programmer does not want to provide the user the ability to change some settings, (e.g. add close button to tab), this can be
prevented by specifiying which options are allowed to be customized:
wxFlatNotebook::SetCustomizationOptions(), and use with one of the following flags:
wxFNB_CUSTOM_TAB_LOOK = 0x00000001, ///< Allow customizing the tab appearance
wxFNB_CUSTOM_ORIENTATION = 0x00000002, ///< Allow customizing the tab orientation (upper | bottom)
wxFNB_CUSTOM_FOREIGN_DRAG = 0x00000004, ///< Allow accept foreign tabs
wxFNB_CUSTOM_LOCAL_DRAG = 0x00000008, ///< Allow local drag and drop
wxFNB_CUSTOM_CLOSE_BUTTON = 0x00000010, ///< Allow customizing close button
wxFNB_CUSTOM_ALL = wxFNB_CUSTOM_TAB_LOOK |
wxFNB_CUSTOM_ORIENTATION |
wxFNB_CUSTOM_FOREIGN_DRAG |
wxFNB_CUSTOM_LOCAL_DRAG |
wxFNB_CUSTOM_CLOSE_BUTTON
- Close button on tabs is now drawn without the blue rectangle
- Fixed several rare issues where FNB could crash
- Changed the behavior of the left/right roation arrows to rotate single tab at a time and not bulk
- Fixed minor draw issue on Linux builds (tab's text positioning)
- Sources is now compatible with wx-2.8 branch - IT WILL NOT COMPILE WITH 2.6.3
Eran
|