Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Free the Editors
raph:
--- Quote from: dmoore on July 05, 2007, 03:29:57 pm ---How about we define a new notebook class cbNotebook that offers a core set of features to the main CB app and plugins? These features would include the usual add/remove/select page, and some persitency code to allow users to define the ordering of their notebook pages in static books that would get called when the CB layout is saved/loaded. Then we can drop-in wxFlatNotebook, wxAUINotebook or any other notebook we feel like for cbNotebook's implementation and not have to worry about breaking the main app.
--- End quote ---
I think writing a notebook control from scratch is a waste of time and resources.
I think we should extend wxAuiNotebook (which nearly already supports all the features we need) to fit our needs, since it already comes with wxWidgets.
wxAuiNotebook would be a perfect candidate for the open files notebook, since it allows splitting of tabs (here: open files) in a very intuitive way (I think being able to dock the main tabs to the/into the other panes ("Messages", "Management"...) is unintuitive and confusing).
Anyway the other notebooks ("Messages", "Management"...) really need a "detach" feature, since splitting the tabs isn't enough here.
--- Quote from: dmoore on July 05, 2007, 03:29:57 pm ---In addition to detachable pages that I've been working on, cbNotebook could also offer features like a proper z-order (nothing is more frustrating than closing a file and having its neighbor selected instead of the last selected file), draggable tabs etc all of which would be invisible to the sdk user.
--- End quote ---
Hm, never realized this. Never saw an application which implemented that behavior.
dmoore:
--- Quote from: raph on July 05, 2007, 04:16:42 pm ---I think writing a notebook control from scratch is a waste of time and resources.
--- End quote ---
If you read my post more carefully I didn't say anything about writing a notebook from scratch :). As you say we would drop in wxAuiNotebook or wxFlatnotebook to provide the core of the implementation.
--- Quote ---I think we should extend wxAuiNotebook (which nearly already supports all the features we need) to fit our needs, since it already comes with wxWidgets.
--- End quote ---
I don't have a strong preference either way, but I agree it will be easier to maintain one external GUI dependency instead of two
--- Quote ---wxAuiNotebook would be a perfect candidate for the open files notebook, since it allows splitting of tabs (here: open files) in a very intuitive way
--- End quote ---
i still need to see it in action. I can also see wanting to detach files from the notebook altogether
--- Quote ---(I think being able to dock the main tabs to the/into the other panes ("Messages", "Management"...) is unintuitive and confusing).
--- End quote ---
i can't imagine using it either. but more generally people might want to create their own notebooks and collect tabs in them as they see fit.
--- Quote ---Anyway the other notebooks ("Messages", "Management"...) really need a "detach" feature, since splitting the tabs isn't enough here.
--- End quote ---
I've implemented this as a right click menu option (well, at least for messages, I'm in the process of adding the default right click menu option to detach pages to my tearawaynotebook class to handle the management notebook).
raph:
--- Quote from: dmoore on July 05, 2007, 04:39:35 pm ---i still need to see it in action.
--- End quote ---
Do you mean wxAuiNotebook? There is a sample in wx_src_dir/samples/aui.
dmoore:
I was just being lazy about building the sample (because I had to rebuild wx). anyway, I've done it now. very impressive tab splitting and, obviously, the notebooks are more consistent with wxAUI theming. I think upgrading to wxAuiNotebook makes sense, but I still think wrapping it in a cbNotebook class is agood idea from a maintainability/extensibility viewpoint.
zarnce:
Thanks for the proof of concept. I was starting to look through the code in my free time to make the editors movable.
Thanks
Zarnce
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version