Notebook control

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Notebook control

Post by eranif »

Hi,

I found wxAuiNotebook and wxFlatNotebook not suited to my needs.

wxAuiNotebook - Misses some key features that I got used to when using wxFlatNotebook (navigation dialog, smart tabbing and other)

wxFlatNotebook - I got into a situation when adding new feature requires heavy testing (5 styles, *many* options)

So at the end I decided to write another notebook control, which will include single look and feel, but its code base will be much more easy to maintain/enhance, so I give you:
Notebook :D

This notebook, contains almost all of the features of its former wxFlatNotebook control, but includes some fixes/additional which I always wanted to add, but due to not so good design in wxFNB, it was hard to add (for example, vertical tabs, dyanmic changing tabs height according to the image size, better space utilization and other)

Here is the demo compiled on windows + mingw (the dll to run it is also included):
http://codelite.org/download/NotebookSample.zip

Source files:
http://codelite.org/download/Notebook.tar.gz

Known bugs:
Drag and drop does not work on Linux --> this is due to WX bug, I already opened a bug ticket for this at SF.

the code runs on Mac, Windows & Linux

Build instruction:
extract the zipped folder, and run:

Code: Select all

make -f Notebook_wsp.mk
The workspace & project files that included are for codelite (http://codelite.org)

And, ofc a screenshot:
Image

Enjoy,

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post by Sof_T »

Any chance of getting together with the dvelopers of wxAUI as this would add some excellent enhancements to their control?

Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif »

Well, I dont really have time for integration this control with wxAUI, since I am *really* busy with my every day work, family and my open source project...

Integrating this into wxAui will take too much effort from my side

I just thought of sharing this code with you guys

Btw, I did not mention it in my earlier post:
The code is under wxWindows license.

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

Is the EVT_BOOK_PAGE_CLOSING broken?
my event handler is not getting called :(
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif »

Hi priyank_bolia.
the source files that are included with the zip file are probably not-updated.

To fix your problem:

Just copy the files from CodeLite sources (last time we talked, you mentioned that you checked out CodeLite source tree). the files can be located under:
trunk/Plugin/custom_*

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

I tried the latest sources but my event handler is still not getting called using:

Code: Select all

EVT_BOOK_PAGE_CLOSING(wxID_NOTEBOOK, TalkingclipboardFrame::OnPageClosing)
though

Code: Select all

m_topbook = new Notebook(mainPanel, wxID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxVB_TOP|wxVB_HAS_X|wxVB_TAB_DECORATION);
m_topbook->Connect(wxEVT_COMMAND_BOOK_PAGE_CLOSING, NotebookEventHandler(TalkingclipboardFrame::OnPageClosing), NULL, this);
is working fine, any idea what's wrong in my code.
I am using a panel as parent of notebook, and wxAUI for the panel.

Code: Select all

wxPanel *mainPanel = new wxPanel(this, wxID_ANY);
sz->Add(mainPanel, 1, wxEXPAND);
m_mgr.SetManagedWindow( mainPanel );
Post Reply