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