Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
wxSmithAui plugin: wxAui support for wxSmith
Ganbito:
--- Quote from: GeO on February 21, 2009, 02:03:22 pm ---I'm not happy to write this :(, but i found another bug:
if i click on a wxAuiNotebook that haven't any pages Cb crashs
greetings GeO
--- End quote ---
Confirmed. I'll solve it for the next release (0.8.0) wich is coming soon (this weekend or at the beginning of the next week). With this release will come wxAuiToolBar support (with real preview) wich is almost implemented.
Ganbito:
Updated to version 0.8.0 beta. Sorry for the delay, I was really busy this week.
FIXED: Code::Blocks crash when click on wxAuiNotebook preview and it has no pages. (Thans GeO for your reports).
ADDED: wxAuiToolBar support with real preview inside Code::Blocks.
* Any wxControl derived class can be added to wxAuiToolBar, except itself (I see this have no sense, but it can be added in the future, specially if someone claims for it).
* wxAuiToolBarItems that can be added separately:
* Item: wxITEM_NORMAL and wxITEM_CHECK. There is only one event supported by these at this moment: wxEVT_COMMAND_TOOL_CLICKED. More can arrive in future releases. These are separated for the other, because the other don't need most properties and I see that it is more easy and intuitive to work with these various items.
* Separator: wxITEM_SEPARATOR.
* Label: wxITEM_LABEL. Default width can be chosen, but don't work so good, at least in linux, so you have to specify the width manually or use an wxStaticText instead.
* Spacer: wxITEM_SPACER. Size can be select as width (in pixels) or proportional, but proportional result in a zero-sized spacer right now.
Pictures for the added items are basically taken from wxSmith and little modified.
Basic wxAui features are implemented. By the way, I have other projects that need my attention, so this will be the last release for a long time with the exception of bug-fix releases.
Byo: As the primary developement stage has ended, I think that this can now be added to wxSmith, because following updates can be easily submitted as patches. I can try to do this, but I need you solve me a pair of questions:
* It is a problem for you that I use CamelCase instead of the smallcase wich all wxSmith is written?
* It is acceptable to put the wxSmithAui with its actual directory layout inside wxSmith (.../wxSmith/wxwidgets/defitems/wxAui/[wxSmithAui source] and .../wxSmith/wxwidgets/icons/wxAui/[wxSmithAui icons])?
If the answer to both is "yes", I can try to fix the #includes and attach the result so you can add it to trunk.
To download the plugin: go to the first post on this topic.
PsYhLo:
i can't compile it :(
--- Code: ---........
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp||In member function ‘virtual wxObject* wxsAuiManager::OnBuildPreview(wxWindow*, long int)’:|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: ‘wxAuiToolBar’ was not declared in this scope|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: ‘ChildAsToolBar’ was not declared in this scope|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: expected primary-expression before ‘)’ token|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: expected `)' before ‘wxCheckDynamicCast’|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp||In member function ‘virtual void wxsAuiManager::OnAddChildQPP(wxsItem*, wxsAdvQPP*)’:|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|669|error: ‘wxAuiToolBar’ was not declared in this scope|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|669|error: expected primary-expression before ‘)’ token|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|669|error: expected `)' before ‘wxCheckDynamicCast’|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|684|error: expected `)' before ‘}’ token|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|684|error: expected primary-expression before ‘}’ token|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|684|error: expected `;' before ‘}’ token|
||=== Build finished: 10 errors, 58 warnings ===|
--- End code ---
and after some tweaking :) this
--- Code: ---........
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp||In member function ‘virtual wxObject* wxsAuiManager::OnBuildPreview(wxWindow*, long int)’:|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: invalid static_cast from type ‘wxWindow*’ to type ‘const wxsAuiToolBar*’|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|564|error: ‘ms_classInfo’ is not a member of ‘wxsAuiToolBar’|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp||In member function ‘virtual void wxsAuiManager::OnAddChildQPP(wxsItem*, wxsAdvQPP*)’:|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|669|error: invalid static_cast from type ‘wxObject*’ to type ‘const wxsAuiToolBar*’|
/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|669|error: ‘ms_classInfo’ is not a member of ‘wxsAuiToolBar’|
||=== Build finished: 4 errors, 58 warnings ===|
--- End code ---
ubuntu 8.10
Ganbito:
I'm developing the plugin on Ubuntu 8.04.1 64bits and it compiles with no error, only a few warnings derived from .xpm images generated by the gimp.
What version of wxWidgets are you using?
You can't change "wxAuiToolBar" to "wxsAuiToolBar", are completely different classes, in fact, wxsAuiToolBar is not derived from wxAuiToolBar or any other wxWindow class.
It seems that compiler can't found wxAuiToolBar, but the #include files are correct in the attached version. You can try to include <wx/aui/aui.h> or <wx/aui/auibar.h> in wxAuiManager.cpp. Then report what happen.
PsYhLo:
same thing
wxwidgets version is 2.8.8.0
#include <wx/aui/auibar.h> - gave me that there is no such file
my wx library is from ubuntu repository
edit
after update to 2.8.9.2 it nearly works
--- Code: ---/home/psyhlo/Desktop/downloads/wxSmithAui/wxAuiManager/wxsAuiManager.cpp|566|error: ‘class wxAuiToolBar’ has no member named ‘m_GripperSize’|
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version