Author Topic: wxSmithAui plugin: wxAui support for wxSmith  (Read 38317 times)

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
wxSmithAui plugin: wxAui support for wxSmith
« on: January 22, 2009, 07:05:32 pm »
I've created a plugin wich adds wxAui items to wxSmith.

Current version: 0.8.1 (Mar 9, 2009)
  * Succesfully tested on Ubuntu 8.04.1 and Windows Vista, both 64bit versions. I think that it can be released as stable version now.
  * Unlikely other codeblocks plugins, and codeblocks itself, I didn't make different project for Windows and Linux, just one project with two targets.

Current status:

* wxAuiNotebook support:

  * Based on wxNotebook for wxSmith written by byo, with little adaptation changes.
  * Complete support for wxAuiNotebook styles and events.
  * Page creation, administration and preview similar (or even equal) to byo's wxNotebook.
  * Icon per tab.

* wxAuiManager support:

  * Originally based on Sizers for wxSmith, it creates a parent wxPanel were AuiPanes are put. When no panes in the wxAuiManager, it draws a green line in the border or the parent wxPanel.
  * wxAuiPaneInfo is not a separated widget for wxSmith, it is implemented as properties of the child panes.
  * Implemented pane features (most of them accesible from quick properties panel):
    * Pane name. Destroy on close or not.
    * Standard pane positions (default, center and toolbar) support.
    * Docking and dockable positions. Dock fixed or resizable.
    * Layer, row and position.
    * Docked or floating. Floating preview is not available inside Code::Blocks. Only clicking the preview button.
    * BestSize, MinSize and MaxSize. Fixed or resizable.
    * Floating size and position.
    * Caption and caption buttons. Visible or not. A check box for minimize button is available, and it creates the proper function, but it don't work because it not implemented in wxWidgets yet.
    * Pane visibility. It is alwais shown in preview inside Code::Blocks.
    * Gripper visibility and position.
    * Pane border visibility.
  * By now, these properties are put at the top of the widget properties in the property explorer, but that will probably be changed.

* 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.

I attach the source code of the plugin. If you download and test it, please report any impression/bug/suggestion that you may see.

By the way, I want to submit this plugin to the contrib section, if dev's allow me to do that. ;)

For a very good IDE,

Ganbito.

Edit: If you want to download the source code of this plugin, just check out codeblocks svn and go to the contrib section :).
« Last Edit: November 20, 2009, 11:21:57 pm by Ganbito »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #1 on: January 23, 2009, 03:33:32 pm »
I've created a plugin wich adds wxAui items to wxSmith.
Looks awesome. Guess what: I am still using the "plain" wxNotebook in a project of mine due to the lack of wxAui support in wxSmith. I think these days are gone. I played around with this a little - very nice!!!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #2 on: January 23, 2009, 07:18:02 pm »
Cooool we need in a full set of wx controls in wxSmith. Say the trues Code::Clocks is not enough successfull due to it dosn't have a wide paletter of controls and good export to makefiles. All other problems are minor.

Full set of Data Base controls, with interactivity similar to Borland's will bring lot of users, especialy students. Just whatch on to the borland, what they are doing. They made only one mistake they don't have strong support of cossplatform development.
gcc+winXP+suse.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #3 on: January 23, 2009, 08:13:12 pm »
Wow, great contribution. I wanted to do such stuff myself but it looks like it's not necessary now :)

Maybe tomorrow if I'll have some time I'll take a look into it. I must confess hat I'd like to see this feature in the trunk code - Ganbito what do you think about that ?

Regards
   BYO



PS. Grom: Please don't spam. Write extensions yourself or keep quiet. You don't have to repeat yourself over and over again. No, Code::Blocks is great even right now. It doesn't have to compete with anything nor rapidly expand. If you don't understand this you don't understand free software.

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #4 on: January 23, 2009, 10:04:17 pm »
Thank you for your comments. I make this plugin because I'm working with wxAui classes in a project of mine but I don't want to manage them with code only.

wxAuiToolBar seems a bit difficult to integrate, but I'm sure that it can be done.

I must confess hat I'd like to see this feature in the trunk code - Ganbito what do you think about that ?

Yes, this post is a the first step of making the plugin available to codeblocks users, what I really want is to submit it to the trunk. If you review my first post:
By the way, I want to submit this plugin to the contrib section, if dev's allow me to do that. ;)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #5 on: January 24, 2009, 11:30:06 am »
Yes, this post is a the first step of making the plugin available to codeblocks users, what I really want is to submit it to the trunk. If you review my first post:

I thought rather about integrating the code into wxSmith plugin - in such case anybody havinf wxSmith plugin will also have wxAUI enabled.
But when thought about this a little bit maybe the plugin is not so god idea - it may be easier to maintain it for you.

Regards
   BYO

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #6 on: January 24, 2009, 01:16:47 pm »
I thought rather about integrating the code into wxSmith plugin - in such case anybody havinf wxSmith plugin will also have wxAUI enabled.
But when thought about this a little bit maybe the plugin is not so god idea - it may be easier to maintain it for you.

Well, I thought about it when I start the plugin and I also think that wxAui support will be best inside wxSmith plugin. But you also catch the problem: I want to maintain the code by myself, not with patchs posted in this forum, especially since the plugin is not yet complete.


Edit: Obviously, if dev's don't allow me to submit the plugin to the svn server, integrating it into wxSmith will be the best solution.
« Last Edit: January 24, 2009, 01:30:12 pm by Ganbito »

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #7 on: January 24, 2009, 05:30:46 pm »
First I want to say that this plugin (or whatever it'll be) is very nice!
I played arround a little and found it very usefull!
Sadly i too found some bugs (or it's just my incompetency?)

    Generally:      When i undock a pane i can't dock them on again
                       Edit: i've now realized that in the Option 'Aui Dockable' the Option 'Dockable(All)'
                              isn't working, instead i must select all componets seperate!
                              Could it be that in wxAuiManager\wxsAuiPaneInfoProperty.cpp line: 44 it should be
                              "PGC1.Add(_("Dockable (All)"), DockableAll);" instead of
                              "PGC1.Add(_("Dockable (All)"), Dockable);"
    wxAuiNotebook:  1) I can't select the wxAuiNotebook in the Editor
                           2) I can't change to another page by clicking on the tab
                           3) If i turn on the option 'AUI Resizable' i can't
                               change anymore the size of the wxAuiNotebook in
                               the editor!

Greets GeO

PS: Sorry for my bad english, if you found any mistake
      pls correct them, so i can learn from my mistakes!
« Last Edit: January 24, 2009, 06:45:57 pm by GeO »

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #8 on: January 24, 2009, 06:47:08 pm »
    Generally:      When i undock a pane i can't dock them on again

That is because you don't select any "Dockable" option. By now, "Dock direction" and "Dockable" options are independent, I will make that when you choose a "Dock direction", the right "Dockable" option gets checked automatically. For "Center", it will be "Dockable (All)".


                       Edit: i've now realized that in the Option 'Aui Dockable' the Option 'Dockable(All)'
                              isn't working, instead i must select all componets seperate!
                              Could it be that in wxAuiManager\wxsAuiPaneInfoProperty.cpp line: 44 it should be
                              "PGC1.Add(_("Dockable (All)"), DockableAll);" instead of
                              "PGC1.Add(_("Dockable (All)"), Dockable);"

I've have tested this a lot of times, and it work well for me.
I've also tried that change you suggest but, as the wxPGChoices work, the result is not the desired. Try it and you will see that I mean.
Code for make it working is in "PGRead" and "PGWrite" methods in the same file.

    wxAuiNotebook:  1) I can't select the wxAuiNotebook in the Editor
                           2) I can't change to another page by clicking on the tab

I'll try to fix them.

                           3) If i turn on the option 'AUI Resizable' i can't
                               change anymore the size of the wxAuiNotebook in
                               the editor!

It is not really a bug of wxSmithAui, it is just how wxAuiManager works.
I have tested using widget's size properties as paneinfo size properties, and I decided to separate them. But, if it is preferred by codeblocks users, I can join them in this way:

Widget  --> wxAuiPaneInfo
Size      --> BestSize
MinSize  --> MinSize
MaxSize --> MaxSize

What do you think?
« Last Edit: January 24, 2009, 06:57:45 pm by Ganbito »

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #9 on: January 25, 2009, 02:55:20 pm »
    Generally:      When i undock a pane i can't dock them on again

That is because you don't select any "Dockable" option. By now, "Dock direction" and "Dockable" options are independent, I will make that when you choose a "Dock direction", the right "Dockable" option gets checked automatically. For "Center", it will be "Dockable (All)".

I understand this, but i can't see any difference in the code if I check "Dockable (All)" or if I let unchecked all options!

It is not really a bug of wxSmithAui, it is just how wxAuiManager works.
I have tested using widget's size properties as paneinfo size properties, and I decided to separate them. But, if it is preferred by codeblocks users, I can join them in this way:

Widget  --> wxAuiPaneInfo
Size      --> BestSize
MinSize  --> MinSize
MaxSize --> MaxSize

What do you think?

I think it would be better to join them, because the separation of them brings alot of confusion.

Greets GeO

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #10 on: February 01, 2009, 06:35:50 pm »
Updated to version 0.6.1 beta. Mainly a bug fix release. More to come.

ADDED: Standard pane type support. When you change the standard pane type, it change the needed properties to match the standard pane type you selected. If you change any other property later, standard pane type don't change, but you get the change on the result.

    Generally:      When i undock a pane i can't dock them on again
FIXED: I misunderstood you because it works if not all were checked.

    wxAuiNotebook:  1) I can't select the wxAuiNotebook in the Editor
                           2) I can't change to another page by clicking on the tab
FIXED: Problem was the HitTest method on wxAuiNotebook, that don't work ok. I've reimplemented that method.

                           3) If i turn on the option 'AUI Resizable' i can't
                               change anymore the size of the wxAuiNotebook in
                               the editor!
FIXED.
« Last Edit: February 02, 2009, 07:27:33 pm by Ganbito »

Offline lifeofgary

  • Single posting newcomer
  • *
  • Posts: 4
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #11 on: February 01, 2009, 07:41:08 pm »

I would love to try this plugin, it exactly duplicates what I want to do create a wxaui application in codeblocks.  Unfortunately I'm new to codeblocks and am having trouble finding instructions on how to install a plugin from source.  So far I've tried opening wxSmithAui.cbp  I was asked to define the following vars (I have no idea what the correct values should be or if I'm going down the right path)  wxsmith, wxpropgrid.

A little guidance would be helpful.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #12 on: February 01, 2009, 08:14:09 pm »
Updated to version 0.6.1 beta. Mainly a bug fix release. More to come.
Taking the risk of repeating myself: That is a very nice contribution, really!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #13 on: February 01, 2009, 08:40:33 pm »
I was asked to define the following vars (I have no idea what the correct values should be or if I'm going down the right path)  wxsmith, wxpropgrid.
Just make two new global variables one for wxsmith with the path to wxsmith
("Path\to\the\c::b\source"\src\plugins\contrib\wxSmith)
and another one for wxpropgrid ("Path\to\the\c::b\source"\src\plugins\contrib\wxSmith\propgrid\contrib)

GeO

Offline lifeofgary

  • Single posting newcomer
  • *
  • Posts: 4
Re: wxSmithAui plugin: wxAui support for wxSmith
« Reply #14 on: February 01, 2009, 11:37:45 pm »
Thank you Geo!  I will try this.