I hope that we will discuss here things related to wxSmith :).
First of all I'll try to explain how wxSmith works :D
Waiting for any questions (related to wxSmith of course :wink:)
I am interested but my still struggle to compile my codeblock properly. After I success the code::blocks ,compilation , I shall try to have a look on the code before asking question. Hope that you won't mind if it is silly question .
I'm onboard. Successfully compiled C::B-wx2.6.0 and wxSmith. As per my other posts, I'd like to see some kind of outline for the projects and items to tackle. Also, to look at other RADs to form a common basis for implementation.
What problems is cyberkoa having with the compile?
I think I missed it, but where could I download wxSmith?
When you CVS checkout of C::B, make sure you get all revisions (if no matching revision, use most recent one). The wxSmith project is in the ...\codeblocks\src\plugins\contrib\wxSmith dir.
Thanks, I didn't see it :)
Ok, here are basics about wxSmith (I'll try to prepare some moredetailed doc, but need some time).
Main plugin's class is wxSmith - it's purpose is to: initialize and shutdown plugin (as all plugins shoud ;) ), process global events and signals inside plugin. These currently are: events from Code::Blocks and notifications from resource browser. I'll add other features (widget selection and event handler creation should also get thoiugh this I think). Other purpose of wxSmith class is to keep wxsProject class for each cbProject one. This association can be found using wxSmith::GetSmithProject and wxSmith::GetCBProject members. Currently it has also pointer to resource browser tree but it will be changed to singleton object soon.
Each cbProject has associated wxsProject class - associations are updated automatically so there's no need to care about that. wxsProject can be in three states - NotBinded (wxsProject has not been connected with cbPrject - it's set for a short time just after creation), NotWxsProject (set when there's no wxSmith configuration inside project) and Integrated (associated cbPrject use wxxSmith). Each wxsProject has list of different resources (currently only dialogs). These are automatically read from wxSmith's 'private' directory called of course 'wxsmith' - currently it must be located in same dir where C::B's .cbp file is found. wxSmith data is stored inside 'wxsmith/wxsmith.cfg' file - it's just a list of resources and files which handle them.
Resource is represented throughclass derived from wxsResource. I've decided to place these classes inside 'resources' directory. Currently there's one called wxsDialogRes. It can load and save xrc-like files.
Dialog is made of wxsWidget and wxsContainer classes (wxsContainer is derived from wxsWidget but adds abilities to handle child widgets). wxsWidget is the biggest class in wxSmith (maybe even too big but most of it's features can be just skipped in case of usual widgets). I'll deescribe each feature a little bit:
* Preview system - these are member functions operating on preview. MyCreatePreview() should create widget's preview and MyUpdate should update it's content, MyDeletePreview() should delete preview - but simple delete operator is enough. Currently change of any property value causes all dialog to be recreated (I tried to recreate or update separate widgets only but it didn't worked properly)
* Properties system - wxsWidget class has PropertiesObject (class: wxsProperties) - this object keeps list of all properties and manages them automatically. It is handling many default properties (like size, id etc) - this will be described later. If non-deefautl property should be added - this can be made by overriding wxsWidget::CreateObjectProperties function (wxample inside wxsButton class :) ).
* Default properties - all dedfautls are kept inside protected BaseParams variable (type: wxsWidgetBaseParams). Derived class can choose properties which are really used by passing pType param to constructor). It will mask properties shown inside properties window and all default values saved to and readeed from Xml.
* Xml saving / loading - XmlLoad loads whole tree structure for widget, XmlSave saves it. By deefault base params are laded and saved. To load/save other parametrs, MyXmlLoad and MyXmlSave can be overriden. Inside these funnctions XmlGetXXX and XmlSetXXX function can be used to read/save non-default properties.
* Code generation - currently not fully developed. GetProducingCode - this should produce code creating given widget, GetFinalizingCode - code add after creating children of this widget (may be usefull inside sizers etc) GetDeclarationCode - code declaring variable for this widget.
* Support for additional widget - I tried to add feature which would allow to use non-standard widgets. These could be supplied in library or even a source code for them could be given. It won't be developen now so should be considered as a dead code ;)
Each widget shoud have it's manager - such manager should be able to create and delete widget. There could be more managers currently loaded, but all shuold be registered insided wxsWidgetFactory class.
wxsWidgetFactory is a main clas producing and deleting widgets. All widget object MUST be created through it and MUST be deleted usind wxsWidgetFactory::Kill() function. wxsWidgetFactory is a singleton object.
Hope this will clarify a little bit how my plugin works. If You have any questions: just ask :)
Quote from: DreadNot
What problems is cyberkoa having with the compile?
I manage to compile C::B using wxwidgets-2.4.2 but when I run from windows explorer , it give the common error "the program is causing error" and never able to run.
I try to run from C::B , then choose target "src" , it gives the same problem also .
I have try to reinstall MingW , reinstall wx-widgets2.4.2 , delete CVS and redownload again , recompile wxwidgets , then compile C::B . It give me the same problem .. :cry:
Still do not hv idea what had happened bcos I try again to follow exactly the way in wiki to set up also give me the same problem.
I am not sure whether do I need to register the DLL file or not ?
cyberkoa: Remember that in TortoiseCVS you can "update special", and pick a specific TAG (C::B version) to use. It's better if you work on the 1.0beta-final, so at least we can be sure that it's not C::B source code that's causing the problems. (OH - and delete all the plugin dlls from both the devel and output subdirectories).
OK! So now that I've got everything compiling (for now & until a new CVS), how do I make a really cool 8) screenshot of the C::B running the wxSmith plugin? When I ran it, all I got was blank screens.
1. I created a wxWidgets project, but nothing shows (blank) in the Project tree (disturbing).
2. Nothing in Symbols and Watches.
3. I see the Resource tab with Property and Events tabs. The top has "Resources->wxWidgets application". Properties and Events are blank.
4. I see the Widgets tab at the bottom of the screen and it displays the basics.
Now what?
Hi, there's one thing currently missing inside plugin - there's currently no abitily to automatically expand C::B project to use wxSmith. But You can open wxSmith - it got one dialog where You can test wxSmith :) (Just click on in inside resource tree on the left side)
I just made a semi-decently-looking-but-not-yet-way-cool screenshot:
(http://www.utdallas.edu/~atescomp/Images/wxSmith001.jpg)
How about that! Now, give me an easy action item so I can get up to speed helping code this thing.
OK how about fixing the scrollbar in the properties? We need an horizontal scrollbar there. And if you can fix the length of those input boxes, even better. Being sticked to the right doesn't look fine.
Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)
Quote from: rickg22OK how about fixing the scrollbar in the properties? We need an horizontal scrollbar there. And if you can fix the length of those input boxes, even better.
Tried to fix that and I think I've made it. There were two problems with that: long names of styles - I have just cut them and put '...' at the end, but I think that it should be changed. Any Ideas ? :). Second problem was that properties panel has been stretching edit boxes changing their minimum size. Now it's fixed, should work fine.
If anybody has any idea how to improove properties panel I would be grateful :) (Maybe wxPropertiesPanel should be some solution but it currently works under wx 2.6 - not officially supporteed in C::B)
Quote from: rickg22Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)
Someone could help here. I'm poor graphic designe so I'm waiting for Your arts (or maybe if You wanna some B&W child-style buttons I will do this :wink: ). In fact each widget / sizer / dialog etc. should have two icons - first (big one about 32x32) for buttons inside widgets palette, second one - (small 16x16) inside resource tree. I've thought about these images before and wxSmith has currently structures which could hold a bit of art :).
I've also started working on easier widget definition system. Look at defwidgets/wxscheckbox.cpp and .h - I think that it should be something like this (It hasn't been finished so curently there's no ability to add wxChecckBox but I'll fix that soon)
Quote from: byo
If anybody has any idea how to improove properties panel I would be grateful :) (Maybe wxPropertiesPanel should be some solution but it currently works under wx 2.6 - not officially supporteed in C::B)
Maybe we could try converting wxPropertiesPanel to 2.4.2 :D (hope it's not hard *gulp*)
Quote from: byo
Quote from: rickg22Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)
Someone could help here. I'm poor graphic designe so I'm waiting for Your arts
Why not just grab upCase's? :wink:
Quote from: rickg22cyberkoa: Remember that in TortoiseCVS you can "update special", and pick a specific TAG (C::B version) to use. It's better if you work on the 1.0beta-final, so at least we can be sure that it's not C::B source code that's causing the problems. (OH - and delete all the plugin dlls from both the devel and output subdirectories).
I already manage to compile in the my company's PC and run CB properly after getting the hints from madrav that need to run update.bat after finish compiling .
I am now trying at my Laptop .. hopefully everything is ok.
Perhaps we should make a wiki article about compiling codeblocks for windows :)
i just compiled wxsmith using wxWidgets 2.6.0 dll's
and tried to run it with my build of C::B, which uses wxWidgets 2.4.2 dll's,
and C::B crashes during start, when i remove the wxsmith addin, C::B starts normal.
Can someone confirm this behaviour plz ?
i'm not shure, if it's necessary to build C::B using wx260 in order to run wxsmith ?
thanks,
tiwag
You must compile both C::B and wxSmith with same version of wxWidgets. Currently I'm using wx 2.4 and I don't know if it will work properly uunder wx 2.6
Got one question - If i've added new Event Handler through wxWindow::PushEventHandler function it is not deletet automatically when widget is. Tried to do it through EVT_CLOSE but this is not generated for widgets. Any idea how to do it automatically ? Maybe creating one global event handler for all widgets but in such case there woul be need to create mapping wxWindow -> wxsWidget ans I think it's not a good Idea. Additional handler can also be removed while deleting preview but it may cause some realy bad errors
You may want to look at wxWindow::RemoveEventHandler() and use it in the widget's dtor...
Yiannis.
Quote from: byoYou must compile both C::B and wxSmith with same version of wxWidgets. Currently I'm using wx 2.4 and I don't know if it will work properly uunder wx 2.6
Thanks for the info,
OK i'll try it with the newest cvs version to compile with wx242,
the one version i got from cvs a few days ago wasn't able to compile with wx242,
a few methods only available in wx260 had been used, if i remember correctly.
--tiwag
[edit]
to make a long story short:
fresh download from cvs,
built wxsmith with wx242,
updated codeblocks build,
it runs without issues,
now i have to find out how it works ... ;-)
byo, just a note until I write a proper "developer's guide" :oops:
When you 're using event handlers for C::B generated events (like EVT_PROJECT_OPEN, etc) always call event.Skip() on the event object. It seems that you don't do this now and when I load the wxSmith plugin, most event handlers in the event handling chain don't see those events.
Yiannis.
Quote from: mandrav
When you 're using event handlers for C::B generated events (like EVT_PROJECT_OPEN, etc) always call event.Skip() on the event object.
:oops: Didn't noticed that. Will fix soon (just need to fix incompatibilities with new eeditor system :) )
No problem. It's my fault anyway:
Quotejust a note until I write a proper "developer's guide"
Quotejust need to fix incompatibilities with new eeditor system
Did you see it? Any comments?
Yiannis.
Have currently some problems :( , will post everything on http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=375
:)
You do that and will get them fixed ;)
Yiannis.
Quote from: DreadNotOK! So now that I've got everything compiling (for now & until a new CVS), how do I make a really cool 8) screenshot of the C::B running the wxSmith plugin? When I ran it, all I got was blank screens.
1. I created a wxWidgets project, but nothing shows (blank) in the Project tree (disturbing).
2. Nothing in Symbols and Watches.
3. I see the Resource tab with Property and Events tabs. The top has "Resources->wxWidgets application". Properties and Events are blank.
4. I see the Widgets tab at the bottom of the screen and it displays the basics.
Now what?
I also have the CB compiled and wxSmith compiled.
CB using : 1.0 beta-final
CB source : from CVS (still in MDI interface , verson on 26May2005)
wxwidgets version : 2.4.2
When I run the compiled version CB , I have the same sympthon as Deadnot
As byo mentioned , there is still no function to create a new wxSmith project.
So , I open WxSmith.cbp , and I and get the same screenshot as Deadnot.
I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .
Any idea ? Anyway , I just curious only. I put more attention to the wxSmith source code study .
Quote from: cyberkoa
I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .
Any idea ? Anyway , I just curious only. I put more attention to the wxSmith source code study .
Hmm, I don't have any watches. Can You post here their names ? Maybe I've addeed something to wrong tree ;)
By the way - I've updated to wxNotebook interface - it should be available in anonymous cvs in few hours
I will get back to one of previous posts about iconized buttons in palette window
Quote from: rickg22Why not just grab upCase's? :wink:
I don't se anywhere source for wxRapid, don't want to fetch from exe using some brute attempt ;).
But maybe anybody would like to help and create some nice-looking ones :D I would be grateful :D
I remember how actual C::B logo was created and I believe that there are some people here who could handle this work :D
Quote from: byoQuote from: cyberkoa
I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .
Any idea ? Anyway , I just curious only. I put more attention to the wxSmith source code study .
Hmm, I don't have any watches. Can You post here their names ? Maybe I've addeed something to wrong tree ;)
sorry, I make mistake :oops: not the watches , but the symbols . Meaning , there is no symbols appear under tab "Symbol" (if I run in the developing version of CB)
no problem in CB final-beta-1.0
Quote from: byoBy the way - I've updated to wxNotebook interface - it should be available in anonymous cvs in few hours
I shall update later .
Hi ,byo.
I have tried to add more information in the resources tree for each node , I have added in
widget.cpp
void wxsWidget::BuildTree(wxTreeCtrl* Tree,wxTreeItemId Id,int Index)
{
wxString Name = GetInfo().Name;
Name = Name.Append(" - ");
Name = Name.Append(GetBaseParams().VarNotStored?
GetBaseParams().VarName:GetBaseParams().IdName);
....
}
My intention is to add more detail for each resources rather than only showing the class name like "wxButton" etc .
My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.
In the source you mention "True if widget's variable won't be stored inside main window" , can you explain more on this, I thought it indicates whether the widget have variable name key in ? Sorry if this is a silly question because I just get to know wxwidgets 2 months ago...
Quote from: cyberkoavoid wxsWidget::BuildTree(wxTreeCtrl* Tree,wxTreeItemId Id,int Index)
{
wxString Name = GetInfo().Name;
Name = Name.Append(" - ");
Name = Name.Append(GetBaseParams().VarNotStored?
GetBaseParams().VarName:GetBaseParams().IdName);
....
}
thx for advice - will updae soon :)
Quote from: cyberkoa
My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.
I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that :oops: :)
QuoteMeaning , there is no symbols appear under tab "Symbol" (if I run in the developing version of CB)
This must have to do with some events processed by wxSmith plugin, not being skipped (event.Skip()) so that they can be processed by other plugins too.
I mentioned it before and byo said he would look into it.
Yiannis.
Hey byo,
Your thread already reached the third page. Maybe I should create a different forum for wxSmith? It seems like it's gonna be busy :mrgreen:
Yiannis.
Quote from: mandravYour thread already reached the third page. Maybe I should create a different forum for wxSmith? It seems like it's gonna be busy :mrgreen:
Hmm, I'm just wondering why RAD tool is such popular. New forum ? Maybe after reaching 4th or 5th page ;) will se how long it would take to reach that - if would be reached fast, this would mean that new forum is a must ;)
QuoteThis must have to do with some events processed by wxSmith plugin, not being skipped (event.Skip()) so that they can be processed by other plugins too.
I mentioned it before and byo said he would look into it.
Yep, already fixed, in CVS but... i frorgot to add some files to repository :oops: so You may not be able to compile :( Just wait a minute and it will be there
This ought to be in the readme. Whenever you create a new file, add it to CVS immediately ;-)
Quote from: cyberkoa
My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.
I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that :oops: :)[/quote]
Thx,understood. The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.
Still studying the source code.. shall ask question when see something not understand .. thx
QuoteQuote from: cyberkoaQuote from: cyberkoa
My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.
I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that :oops: :)
Thx,understood. The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.
Still studying the source code.. shall ask question when see something not understand .. thx :D
Okay guys, in case you didn't notice, I just created a new "RAD Plugins development" forum 8). You're free to expand your wxSmith questions in other threads. Just insert "Wxsmith: " before the specific question.
Quote from: cyberkoaThx,understood. The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.
Hmm, not exackly. The flag indicating whether dialgo uses XRC or should be inside dialog resource, not one widget.
Maybe will describe with a bit of code (example what would be generated from wxSmith;) ):
1). One widget with VarNotStored = false
class MyDialog: public wxDialog
{
public:
MyDialog(...)
{
Widget = new wxStaticText(this,-1,"Hello world");
}
protected:
wxStaticText* Widget;
}
2). One widget with VarNotStoredd = true
class MyDialog: public wxDialog
{
public:
MyDialog(...)
{
wxStaticText* Widget;
Widget = new wxStaticText(this,-1,"Hello world");
}
}
So if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.
Hope I've explained this now :)
Quote from: rickg22Okay guys, in case you didn't notice, I just created a new "RAD Plugins development" forum 8). You're free to expand your wxSmith questions in other threads. Just insert "Wxsmith: " before the specific question.
Thx for new forum :) It should be easier to work now :D
Uh... shouldn't you change the name to IsMember or something?
Quote from: rickg22Uh... shouldn't you change the name to IsMember or something?
Thx for advice, should think more before coding ;)
Quote from: byoQuote from: cyberkoaThx,understood. The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.
Hmm, not exackly. The flag indicating whether dialgo uses XRC or should be inside dialog resource, not one widget.
Maybe will describe with a bit of code (example what would be generated from wxSmith;) ):
1). One widget with VarNotStored = false
class MyDialog: public wxDialog
{
public:
MyDialog(...)
{
Widget = new wxStaticText(this,-1,"Hello world");
}
protected:
wxStaticText* Widget;
}
2). One widget with VarNotStoredd = true
class MyDialog: public wxDialog
{
public:
MyDialog(...)
{
wxStaticText* Widget;
Widget = new wxStaticText(this,-1,"Hello world");
}
}
So if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.
Hope I've explained this now :)
Ok, totally understand. I think the best language to communicate among programmers is computer language :lol: :lol:
Quote from: rickg22Uh... shouldn't you change the name to IsMember or something?
A good recommentation, I think.
QuoteSo if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.
Isn't the local variable still available to other member functions due to the "this" linkup (just not as a member)? Otherwise, the var would be an invalid memory location--as it is released at the end of the function automatically (scope, delete is implied)--and the active dialog would continue pointing to these released memory locations (it doesn't since the pointer's reference counter > 0). Isn't there a mechanism to step throught the widgets of a window? Or is "VarNotStored" simply a way to separate direct access to widgets from indirect access, so that the programmer can concentrate on the direct items?
I agree the "isMember" might be a better var name.
Above was mine.
Quote from: AnonymousIsn't the local variable still available to other member functions due to the "this" linkup (just not as a member)? Otherwise, the var would be an invalid memory location--as it is released at the end of the function automatically (scope, delete is implied)--and the active dialog would continue pointing to these released memory locations (it doesn't since the pointer's reference counter > 0). Isn't there a mechanism to step throught the widgets of a window? Or is "VarNotStored" simply a way to separate direct access to widgets from indirect access, so that the programmer can concentrate on the direct items?
I agree the "isMember" might be a better var name.
Hmm these variables will be actually pointers to real widgets. And these widgets could be later found through FindWindow() or something like this.
Hmm, and another thing.
I currently have hard times during my study (need to pass all these exams etc. etc. ) so wxSmith won't be updated regularly :(
Hope You won't be angry :oops:
hehe lol :P Don't worry byo! School must always go first. Open source is a HOBBY (Blasphemy! :shock: lol :lol: )
Hi!
Quote from: byoHmm, and another thing.
I currently have hard times during my study (need to pass all these exams etc. etc. ) so wxSmith won't be updated regularly :(
Hope You won't be angry :oops:
Don't worry: It doesn't get any better -> Next there comes a job :D
Anyway: Good luck for your exams!
BTW: About the icons I used in wxRapid, I have to confess I snatched them from wxGlade :oops:
upCASE: Any copyrighting problem with those? Should we add a license regarding the icons or something?
I don;t think there is a copyright problem, because wxGlade is open source to. just mention the name some where in a file and you ar finished (I didn't look in the license of them yet.)
I'm git'n school'ed here too!
But, I believe this project is sooo very important as open source due to the lack of alternatives in other IDEs.
I'll be studying this project and hopefully be contributing over time.
Thanks for answering the question. I made a mistake on the implied delete operator. The delete is not implied at the end of the function--I was thinking "auto_ptr", which is not necessary. From the wxWidgets site, I understand how the memory is released for the widgets through the parent-child relationship and the close event handler.
Please excuse my ignorance if this is obvious to others as I'm new to wxWidget and unfamiliar with the specifics on memory allocation / deallocation on these object.
the student nowadays is very expert in C++ ! 8)
I am studing the wxSmith source code. byo , if you do not mind , I shall try to write some code on the defwidget for combobox , meaning add in additional widget option and submit those code to you for checking. If you feel that it is helpful , you may modify and commit to CVS . However, I have to mention earlier , I have just start using C++ a few months ago after 6 years never touching it until I found the wxwidgets.
I've review the latest wxSmith. There was some question about the display for properties a while back. Other than not emulating VC++, why not model the display on VC++ and use a row and column style display (wxGrid with wxGridCell... types) where row labels are the property name and the column displays the value(s) with an elipse button [don't know how to do] on items that expand to dialogs when more info is required or multiple selection are required (like style parameters), combobox selections for mutually exclusive items, and true/false combobox selections to replace checkboxes. This could:
1) allow the user to size the rowlabel and value columns removing concern about long labels and
2) let us setup the parameter display using a single standard resource for all widget types (a constant boolean array for each widget type would specify the parameters to display and record, another array could represent default values for each parameter).
Quote from: cyberkoathe student nowadays is very expert in C++ ! 8)
I am studing the wxSmith source code. byo , if you do not mind , I shall try to write some code on the defwidget for combobox , meaning add in additional widget option and submit those code to you for checking. If you feel that it is helpful , you may modify and commit to CVS . However, I have to mention earlier , I have just start using C++ a few months ago after 6 years never touching it because I found the wxwidgets.
Hmm, Waiting for Your job :). But must say that some parts of code are not finished yet (f.ex. events sytem) and update of this code will be needed soon :).
Thx for Your interesting. Hmm, One of my idedas was to create RAD tyool which could be easily extended with new sets of widgets :).
Quote from: DreadNotI've review the latest wxSmith. There was some question about the display for properties a while back. Other than not emulating VC++, why not model the display on VC++ and use a row and column style display (wxGrid with wxGridCell... types) where row labels are the property name and the column displays the value(s) with an elipse button [don't know how to do] on items that expand to dialogs when more info is required or multiple selection are required (like style parameters), combobox selections for mutually exclusive items, and true/false combobox selections to replace checkboxes. This could:
1) allow the user to size the rowlabel and value columns removing concern about long labels and
2) let us setup the parameter display using a single standard resource for all widget types (a constant boolean array for each widget type would specify the parameters to display and record, another array could represent default values for each parameter).
http://www.geocities.com/jmsalli/propertygrid/ - it has already been done i think :). But need to wait for compatibility with wx 2.6. Hmm, maybe it has already been done, haven't read forum for some time :oops:
Dunno, we need some brave warrior who dares compile C::B CVS with wx2.6. Thou shalt slay the red bug dragon! :P
Quote from: rickg22Dunno, we need some brave warrior who dares compile C::B CVS with wx2.6. Thou shalt slay the red bug dragon! :P
hi rick,
do you want a compiled version of C::B using wx2.6 ?
i can upload it somewhere for you if you want.
but you also can easily build it yourself, following the readme-wx2.6.0,
i've done it and found no serious problems.
i'm using several installed versions of wx in parallel, and should finally update the wiki-section regarding this, as you requested from me.
sorry, but i didn't find time till now, but i promise it for the week-end.
-tiwag
[addendum]
i've just read:
wxWidgets v2.6.1 has been releasedThis release is a major bug-fix release. Many bugs in almost every port have been fixed, including compilation and
GUI drawing problems.[/list:u]
http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?p=10367#10367
YAY! :D 'Bout time! Well the problem is that my mingw directory tree has the wx2.4 files... i have to see how to adapt it to compile with wx2.6.1. Maybe this weekend i'll have time to test (ugh, more hours of meddling with the settings and compiling).
Quote from: rickg22..Well the problem is that my mingw directory tree has the wx2.4 files...
i know that troubles, had the same in the past :( .
That was the reason, why i figured out how to avoid this. :D
i will prepare the description how you can easy have multiple wxwidgets-versions and/or several different setups in parallel 8)
if you want to have a quick solution, here
Build CodeBlocks wxmsw261you can download the wxwidgets-build-batchfile
and an updated codeblocks project file for wxmsw 2.6.1.
for this config i've used : set WXDIR=D:\wx261
steps:
download wxmsw-2.6.1 and unzip it to WXDIR
copy the batchfile wxwidgets-build-batchfile to WXDIR
(update the pathes if necessary)
run the wxwidgets-build-batchfile
check out a clean version of codeblocks from cvs
copy the codeblocks project file
(update the include / lib pathes if necessary)
open the project and build codeblocks
run the update.bat
copy these files to your codeblocks "output" directory
"D:\wx261\lib\gcc_dll\wxmsw26_gcc_cb.dll"
"D:\wx261\lib\gcc_dll\wxmsw26_stc_gcc_cb.dll"
now you can run "output\codeblocks.exe"[/list:u]
Quote from: [edit] for the unlikely case, that the above is too much for you,
you can download my binary version too
Quotesorry, removed from web
enjoy
-tiwag
Quote from: byo
Hmm, Waiting for Your job :). But must say that some parts of code are not finished yet (f.ex. events sytem) and update of this code will be needed soon :).
Thx for Your interesting. Hmm, One of my idedas was to create RAD tyool which could be easily extended with new sets of widgets :).
It is my pleasure, in fact I learned a lot from reading your code :D . I have to admit that I am not able to write it from scratch but I try my best to add in some codes with my weak C++.
Quote from: byo
http://www.geocities.com/jmsalli/propertygrid/ - it has already been done i think :). But need to wait for compatibility with wx 2.6. Hmm, maybe it has already been done, haven't read forum for some time :oops:
Unfortunately, I tried to compile in wx-2.4.2 but failed. I did go in further to check the problem.
I already almost understand how to add in new code to support new widget , I shall start with
1. XML load
2. XML save
Still planning on writing the code for keeping the selection list for combobox. Hope that I can at least load a combo box :oops:
I have also compiled with wx2.6 (actually, the only compile). I have a separate project dir for wx outside mingw so that I can switch (if needed, as necessary). The compile is much like tiwag describes. Updating to 2.6.1 now...
OK. All compiled and no place to go. The wx2.6.1 compiled fine. C::B set to use wx2.6.1 compiled fine. wxSmith compiled fine. However, I still see the same problem in the Workspace area--no workspace/project tree is displayed.
EDIT: See other recent post about the compile.
Hi, just want to update my status on trying to add combobox in the wxSmith.
I have start to write the code for wxComboBox , the XML loading code. I refer to other widgets's code to add in appropriate code in defwidgets.cpp/h, creating combobox.cpp/h . The most difficult part is on the combobox selection .
I have refer the help file bundled with wxWidgets 2.6.1 and found that wxComboxBox have 2 constructors , the main different is one of it use wxString choices[] and other use wxArrayString as selection.
I have decided to use the wxArrayString approach since it looks easier. After coding an special function to load selection to wxArrayString, and get ready to have a final compilation, the code could not compiled !! Finally , I found out , in wxwidgets-2.4.2 , only have 1 constructor for wxcombo , I am refering to the latest documentation (2.6.1) to code , hahaha .. .
Therefore , now is in the status to recode all in wxString choices []
:cry:
One thing need to mention is , it seems like there is no engine (code) to allow the wxwidgets's properties to be edited by poping up another dialog , I believe in wxcombo's selection we need that. And in fact , a lot of cases we need that such as color selection.
Maybe , it comes to a stage to upgrade the properties engine.
Another update .
I have managed to load a wxCombox and show on the design screen.
However, the combo box shows no item. I have debugged in my code and confirm that I manage to load the items from the XML file.
In BuidExtVars member function , I have created a new function to load a series of strings into a ArrayString. I believe something have missed out.
byo , how is extra variables that defined in the BuildExtVars() be assigned to the widget creation function ? May you explain in short because I have read the source code but not so understand.
Here is the screenshot for wxComboBox added.
(http://i19.photobucket.com/albums/b190/cyberkoa/wxsmith.jpg)
Code that I have written
1. Loading from XRC file
2. Saving to XRC file
Function that still not done
1. Edit the list in the combo box , need the decision from byo on the revamp on the properties manager.
However, I found that there are a few strange thing
1. widget editor does not reponse to mouse click event
2. When I do a preview, the combobox does not contain anything but in the widget editor , I can see the list using the keyboard up/down cursor.
I shall look into the event handling for the widget editor soon.
I have settle the problem that I mentioned previously
- widget editor does not reponse to mouse click event
- When I do a preview, the combobox does not contain anything but in the widget editor , I can see the list using the keyboard up/down cursor.
However, there is still a minor problem on the mouse click event on combobox
- when I click on textbox contained in the combo box , the widget selection event seem like not taken place but if I press on the pull down button , the widget selection is taken place.
it seems that byo is too busy ... keep up the good work cyberkoa.
Good work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?
Yiannis.
Quote from: code1101it seems that byo is too busy ... keep up the good work cyberkoa.
Thanks :D just trying my best, still catching up with C++ that I hv stop using for 6 years.
Quote from: mandravGood work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?
Yiannis.
Thanks for the offer :D I am willing to take a try if byo agrees. By the way, I shall send my code to byo to have a look first .
Still a beginner in developing project on CVS :oops:
Quote from: cyberkoaQuote from: code1101it seems that byo is too busy ... keep up the good work cyberkoa.
Thanks :D just trying my best, still catching up with C++ that I hv stop using for 6 years.
Quote from: mandravGood work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?
Yiannis.
Thanks for the offer :D I am willing to take a try if byo agrees. By the way, I shall send my code to byo to have a look first .
Still a beginner in developing project on CVS :oops:
Hello, everyone. It's been a while since I've been here because of these sleepless books-full nights and terrible exams-like days. Just give me few more days and I'll be back :D.
Cyberoka: BIG THX for Youre work. Cna You send me the source ? And maybe some description of problems You have with this widget.
and don't worry - I'm CVS-beginner too (started using it after gaining access to CodeBlocks' CVS). Buty If You don't mind I would like to work now like mandrav and rigkg22 at the beginning of their cooperation - You could send me the sourcee and I put this into CVS :). Hope it will change soon - I just need to get back to this project and prepare for new Coder :). And now ... argh, back to books :?
I'd say we give cyberkoa cvs access. Just download TortoiseCVS, it's as easy as my avatar look lol :P
Anyway, byo, cyberkoa, e-mail is also a good way to communicate when you get CVS access.
Quote from: byo
Hello, everyone. It's been a while since I've been here because of these sleepless books-full nights and terrible exams-like days. Just give me few more days and I'll be back :D.
Cyberoka: BIG THX for Youre work. Cna You send me the source ? And maybe some description of problems You have with this widget.
and don't worry - I'm CVS-beginner too (started using it after gaining access to CodeBlocks' CVS). Buty If You don't mind I would like to work now like mandrav and rigkg22 at the beginning of their cooperation - You could send me the sourcee and I put this into CVS :). Hope it will change soon - I just need to get back to this project and prepare for new Coder :). And now ... argh, back to books :?
any kind of cooperation that will be fine for me , in fact I hv learned a lot from reading the wxSmith code, still have a lot to learn :)
Let me do some final cleaning of the source code before post it up .
One thing need to mention , my Code::Blocks CVS is not the latest update because the latest update revamp the interface which affect some plugin coding. My Code::Blocks CVS version should be somewhere on early of June.
I shall post it after going back home , and write some description on the problem that I encounter.
Here are the files
http://us.f1f.yahoofs.com/bc/96491ee4_m418d23c5/bc/wxSmith-Combobox.zip?bfA3juCBjIkFen5d
Basically, it includes 2 new files , wxscombobox.h and wxscombobox.cpp , and others modified files.
One thing I have left out is the releasing memory usage of the wxArrayString that used in the wxscombobox , which I think should put in the destructor of each widgets class.
I do not change the original macro in defwidgets.h that have the blank destructor because I think this changes involve the change of the engine should decided by byo.
Feel free to modify it if you feel those code is not correct or uncomplete.
I only coded the XML load and XML save , other function like AddProperty is not coded yet.
Thanks.
Quote from: byoCyberoka: BIG THX for Youre work. Cna You send me the source ?
Quote from: CyberokaHere are the files (link)
:roll: Someone needs to be given access to CVS... :lol:
Finally , I manage to come in this forum :o
Ok , I have finished the code for wxListBox , and I have made icons for wxCombobox and wxListBox , which is the new feature introduced by byo in the latest CVS.
Let me summarize my changes and enhancement
1. Add in wxListBox
2. Modified a macro in wxdefwidget.h , to add in destructors evDestroy() function. This is to release the memory used by wxArrayString.
3. I have made icons for wxCombox and wxListBox , I have no sense of art dunno looks ok or not :oops:
My discovery and suggestion
1. The default selection for wxComboBox and wxListBox , since they are defined as Int property , there is not upper bound checking. Could it be better if we can design in such a way that we can choose to show the property in different form such as a combo box to limit the default selection to number of choices.
Finally, how can I commit the changes to CVS using Tortoise CVS? :oops:
I am not familiar with CVS , I just want to update to the wxSmith branch .
QuoteFinally, how can I commit the changes to CVS using Tortoise CVS?
First, add in CVS any new files you 've created (if any). To do this, select the new files, right-click and select "Add" from the tortoise menu.
Then, just right-click in the wxSmith top-folder (in a white space) and select "Commit". Fill the message log describing your changes and press OK :)
Yiannis.
I have a problem to commit the changes because Tortoise CVS is using anonymous to log on every time I tried to commit .
I have tried a few way including recheck out the CVS using my sourceforge ID ..
or do I need to recheck out a fresh copy first ? :(
cyberkoa: Yes, you need to Checkout a fresh copy with your sourceforge account.
I still having problem to commit to CVS ,
And I am rushing back to my home country Malaysia tomorrow morning , therefore, I have send my source to byo and hope that he can help to commit the changes.
Since I will be at my home country the next two weeks, I can't help much in wxSmith at these moment.
See you all then .. :)
Quote from: cyberkoaI still having problem to commit to CVS ,
And I am rushing back to my home country Malaysia tomorrow morning , therefore, I have send my source to byo and hope that he can help to commit the changes.
Since I will be at my home country the next two weeks, I can't help much in wxSmith at these moment.
See you all then .. :)
Got new sources, will put it into CVS as soon as possible :)
BTW: First attempt to generate code on-the-fly was made :) There are still some bugs but it seems to be working :D
As we can see, C::B has been branched. And because wxSmith hasn't got any release yet, I've decided to develop it under HEAD branch. It means switching to wxWidgets 2.6.1, and what follows, fighting many incompatibilities between different wxWidgts versions inside wxSmith. Hope that change to wx 2.6 is permament ;)
Quote from: byoHope that change to wx 2.6 is permament ;)
That's the point of branching :)
The VERSION_1_0 branch will only accept bug-fixes. Feel free to experiment in the main trunk (HEAD).
Yiannis.
I have problem with one bug after migrating to docking panels.
New Notebook page added to Manager for wxSmith uses wxSplitterWindow, but after startup andafter docking Manager, sash position is set to 0 or sth like that (top window and sash are hidden). I used additional wxPanel with one sizer as background window for page but it didn't work out. The only way to see both panels is to use SetSashGravity and manipulate with size of manager.
Any ideas ?
Try memorizing the splitter position and restore it on docking (i just hope there's an event for that :P ). For startup, use a configmanager variable.
Quote from: byoI have problem with one bug after migrating to docking panels.
New Notebook page added to Manager for wxSmith uses wxSplitterWindow, but after startup andafter docking Manager, sash position is set to 0 or sth like that (top window and sash are hidden). I used additional wxPanel with one sizer as background window for page but it didn't work out. The only way to see both panels is to use SetSashGravity and manipulate with size of manager.
Any ideas ?
That was the exact erroneous behaviour I got when used wxDockit with the project manager which also uses a wxSplitterWindow.
The sash would move to position -22 hiding the open files list and the sash itself.
This turned out to be a bug of wxDockit, which I fixed and documented. When the layout was updated, wxDockit would first launch the wxEVT_LAYOUT_CHANGE and then actually perform the layout. I 've corrected it in the wxDockit sources in our CVS and everything started working fine.
I haven't checked wxSmith's code for a while, but are you using a wxSplitterWindow directly?
You might want to use a wxSplitPanel, created by Rick (in xtra_classes.h). See projectmanager.cpp for how it is used...
[edit]
Also, check out EditorManager::RefreshOpenFilesTree() which is called when the layout changes (it could be called by OnSize). This is what keeps the sash in sync after layout.
[/edit]
Yiannis.
I have extended my home leave for extra 2 weeks, still at Malaysia now.
byo , I think you already fix the bugs you mentioned right ? since I want to see the new version of CB , I hv downloaded the latest CVS and compile the latest version . I hv tried CVS dated 26/7/2005 still got problem but 27/7/2005 it seems like ok.
mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.
so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1
Quote from: cyberkoa on July 28, 2005, 03:24:21 PM
mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.
so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1
Uncheck "Settings->Environment->Allow only one running instance" ;)
Yiannis.
Quote from: mandrav on July 28, 2005, 03:53:05 PM
Quote from: cyberkoa on July 28, 2005, 03:24:21 PM
mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.
so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1
Uncheck "Settings->Environment->Allow only one running instance" ;)
Yiannis.
Perhaps we should have that disabled by default... anyway. You could present a dialog box asking if you want to run anyway.
Yes, I was asking myself what was the problem since in the final beta had no multiple instance settings.
Quote from: zieQ on July 28, 2005, 06:19:10 PM
Yes, I was asking myself what was the problem since in the final beta had no multiple instance settings.
People used to find it annoying because the last instance's settings are actually saved. So you might edit options in an instance and another instance overwrite them...
So we added an option for it.
Yiannis.
Guys i have a question
How stable is wxsmith right now?
I want to edit some of the Codeblocks dialogs... can it be done currently? Or do I have to grab another resource editor?
Quote from: rickg22 on July 29, 2005, 06:44:16 AM
Guys i have a question
How stable is wxsmith right now?
I want to edit some of the Codeblocks dialogs... can it be done currently? Or do I have to grab another resource editor?
Unfortunately wxSmith isn't ready for bigger job yet. Currently it doesn't support many standard widgets (I hope that cyberkoa will help me with this :), he has already started working on it).
And stability... sometimes it crashes (when deleting widgets) but I have some problems with debugging - C::B has problems with paths (when running not in debug mode it runs properly but when running in debug it says there's no C::B executable) and I can't load symbol tables from wxSmith's dll, even after add-symbols... in gdb, backtrace doesn't show any function names (maybe anyone could help me with this)
OK here's how. I'm not speaking from experience, but rather from what Yiannis told me.
1) Add a breakpoint after loading the plugins in app.cpp.
2) Run.
3) After you reach the plugins, add the symbol tables for the plugins dlls.
What I do to debug C::B plugins is:
1) open app.cpp, position the cursor on HideSplashScreen() in CodeBlocksApp::InitFrame() (currently line 180)
2) press F4 (starts debugging and breaks on the above line).
When it breaks, the plugins have loaded so any breakpoints you set in plugins, will be valid.
Debug :)
Yiannis.
Quote from: byo on July 30, 2005, 09:56:54 AM
Unfortunately wxSmith isn't ready for bigger job yet. Currently it doesn't support many standard widgets (I hope that cyberkoa will help me with this :), he has already started working on it).
And stability... sometimes it crashes (when deleting widgets) but I have some problems with debugging - C::B has problems with paths (when running not in debug mode it runs properly but when running in debug it says there's no C::B executable) and I can't load symbol tables from wxSmith's dll, even after add-symbols... in gdb, backtrace doesn't show any function names (maybe anyone could help me with this)
Ok, let me handle on the standard widgets , I will try my best !
The debugging technique provided by rick and mandrav is very useful ..
Now is still reading the source code of code generation by byo ..
Next monday I will back to Mexico , will start on the development again ... :D
Quote from: rickg22 on July 29, 2005, 06:44:16 AM
I want to edit some of the Codeblocks dialogs...
in the last time i use more and more often wxFormBuilder
it's almost as good as DialogBlocks, but free and open source.
http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=2615
http://software-libre.org/download.php/232/wxFB-20050710-win32-installer.exe
The developer of wxFormBuilder himself posted a few times,
that he is using CodeBlocks and wxFormBuilder together and
reaches very good results with it.
wow :shock:
Nice, and quite impressive 8)
You saved me from installing Dev-Cpp, thanks man :lol:
Heh, I see so many lovely apps :lol:
And I just hope that anyone will use my plugin ;)
Quote from: byo on August 06, 2005, 04:18:43 PM
And I just hope that anyone will use my plugin ;)
Build it, and they will come :lol:
Hi, just a small list of features which were added recently:
- Drag Points - to move and size widgets with mouse :)
- Changed to wxPropertyGrid for editing properties - there are still some things to code but most of conversion has been done (there's still possibility to use old properties system - just need to add __NO_PROPGRGID to defines - but I haven't tested if it still works ;))
- Support for Dialogs, Frames and Panels
- Code generation on-the-fly (but not all objects generate valid code - f.ex. gridsizer)
All changes are in HEAD branch - I'll check if it will work also with VERSION_1_0 and if so, I'll update sources :D.
Unfortunately wx 2.6 needed (required by wxPropertyGrid)
Quote from: byo on August 09, 2005, 11:04:04 PM
Hi, just a small list of features which were added recently:
- Drag Points - to move and size widgets with mouse :)
- Changed to wxPropertyGrid for editing properties - there are still some things to code but most of conversion has been done (there's still possibility to use old properties system - just need to add __NO_PROPGRGID to defines - but I haven't tested if it still works ;))
- Support for Dialogs, Frames and Panels
- Code generation on-the-fly (but not all objects generate valid code - f.ex. gridsizer)
All changes are in HEAD branch - I'll check if it will work also with VERSION_1_0 and if so, I'll update sources :D.
Unfortunately wx 2.6 needed (required by wxPropertyGrid)
o .. great , when will it be commited to CVS ? Looking forward to see the screen shot ...:)
I guess it'll be committed when the CVS server goes back online :P (scheduled downtime)
I've put all into CVS before server went down 8) It should be availale right now (server is responding) :D
Finally I got the latest CVS running, and see the wxSmith with wxPropertyGrid , cool ! :shock:
And the resizing feature , cool! :shock:
There are something I found out when I do some rough testing
1. The default selection for wxListBox and wxComboBox are missing - I will look into it today
2. When I click radio button (Insert) at widgets pallete , it seems like going into an infinate loop. - I will try to look into it later
I tested it yesterday midnight , have no time to look into the problem above.
Quote from: cyberkoa on August 12, 2005, 06:31:29 PM
Finally I got the latest CVS running, and see the wxSmith with wxPropertyGrid , cool ! :shock:
And the resizing feature , cool! :shock:
There are something I found out when I do some rough testing
1. The default selection for wxListBox and wxComboBox are missing - I will look into it today
2. When I click radio button (Insert) at widgets pallete , it seems like going into an infinate loop. - I will try to look into it later
I tested it yesterday midnight , have no time to look into the problem above.
Thx for info - I'll se what's going on with all those bugs ;)
BTW. The default property - work in progress ;) It was inside standard properties window but I'll try to fix that soon.
I am coding a new widget wxBitMapButton , still in the progress to understand the wxSmith source with propgrid, hope to get it up as soon as possible.
byo , do I need to add a new property specially for the file path , or just leave it as string first ?
Quote from: cyberkoa on August 16, 2005, 08:07:34 PM
I am coding a new widget wxBitMapButton , still in the progress to understand the wxSmith source with propgrid, hope to get it up as soon as possible.
byo , do I need to add a new property specially for the file path , or just leave it as string first ?
Hi, there can be a problem with wxBitmapButton because wxSmith doesn't handle creating bitmaps yet. But maybe You'll add support for this ;) But remember to keep compatibility with original XRC structure :)
At the beginning I propose using simple string for bitmap because it's very probably that it will be changed in future.
hi, I have coded the following but not commited to CVS (refer to attacehment)
One thing to mention in my development, wxradiobox is not derived from wxControlWithItems , therefore I could not make use of the existing stringlistproperty macro . Moreover , it has not Append Function , therefore , choices cannot be added dynamically.
I guess wxdatepickerctrl may have a default date attribute in XRC but I am not sure.
I try to use the DialogsBlocks and in their wxdatepickerctrl have a default value in the properties editor.
I am searching and reading the defintaion of XRC file format but seems like it is still not very clear for some of the controls.
[attachment deleted by admin]
Hi, I've checked wxRadioBox already - it need additional properties to be created (I can take care of it). Hmm, can You commit these widgets with this crashable RadioBox ?
If you notice in the XRC sourcecode, the handlers for the distinct classes do all the processing to create new objects. Why not use the xrc code in the first place (or at least copy from it)?
Quote from: byo on August 25, 2005, 11:27:51 AM
Hi, I've checked wxRadioBox already - it need additional properties to be created (I can take care of it). Hmm, can You commit these widgets with this crashable RadioBox ?
I shall commit to CVS later because the development PC is at my house and I am now at office.
I have modified .cbp to suit my development environment (wxwidgets folder name , the library folder name etc... )
maybe you need to add in those files in your project manually
Modified
=====
One more thing to mention , the spinctrl work fine but have a little problem , I try to look into the source code of wxSmith but could not find the cause (a bit complicated). I guess is the wxwidgets problem , the DoGetSize function in wx/msw/spinctrl.cpp maybe return the wrong position.
The problem is very simple , spinctrl consists of 1 spinbutton and 1 textbox at the left .
When we select the spinctrl , the indication outline is drawn at the wrong position , which the left top corner at the left top corner of the spinbutton.
I found that I could not commit to CVS :( the error message given by TortiseCVS is as below
Quote
In C:\projects\codeblocks\codeblocks\src\plugins\contrib\wxSmith\defwidgets: "C:\Program Files\TortoiseCVS\cvs.exe" "-q" "add" "wxsdatepickerctrl.cpp" "wxsdatepickerctrl.h" "wxsradiobox.cpp" "wxsradiobox.h" "wxsradiobutton.cpp" "wxsradiobutton.h" "wxsscrollbar.cpp" "wxsscrollbar.h" "wxsspinbutton.cpp" "wxsspinbutton.h" "wxsspinctrl.cpp" "wxsspinctrl.h" "wxstreectrl.cpp" "wxstreectrl.h"
CVSROOT=:pserver:cyberkoa@cvs.sourceforge.net:/cvsroot/codeblocks
cvs [server aborted]: "add" requires write access to the repository
Error, CVS operation failed
Steps that I do :
1. select those files that I would like to add to CVS
2. Right Click > CVS Add ...
Click OK
3. ===Starting processing ==== , error message show...
Could it because of the CVS access authority problem ? Or maybe I need to open certain port at my BroadBand Router/Firewall ..
AFAIK, sourceforge.net allows CVS-write access only with ssh-based authentication, but I could be wrong...
Yiannis.
No you are right. pserver is only for read-only access on sourceforge. Developer should use SSH. cyberkoa, make a patch to save your modification before the new ssh checkout ;)
o .. ok thanks .. here already midnight .. tomorrow evening I will get it done
Quote from: cyberkoa on August 26, 2005, 01:33:07 AM
One more thing to mention , the spinctrl work fine but have a little problem , I try to look into the source code of wxSmith but could not find the cause (a bit complicated). I guess is the wxwidgets problem , the DoGetSize function in wx/msw/spinctrl.cpp maybe return the wrong position.
The problem is very simple , spinctrl consists of 1 spinbutton and 1 textbox at the left .
When we select the spinctrl , the indication outline is drawn at the wrong position , which the left top corner at the left top corner of the spinbutton.
I've found this problem already. It can be seen even in wxListBox - corners are shifted 1 or 2 pixels. As I remember there's event TODO in source code. I'll try to find a solution.
BTW. I have removed custom variables from my .cbp file - they're set up globally so I've no problem with different directories. So I propose to remove them from .cbp file
Quote from: rickg22 on August 25, 2005, 05:19:55 PM
If you notice in the XRC sourcecode, the handlers for the distinct classes do all the processing to create new objects. Why not use the xrc code in the first place (or at least copy from it)?
I usually base on xrc source when adding new widgets (hope cyberkoa do the same ;) ) but it's architecture is different from wxSmith's one. So it may be used to solve some incompatibility problems but unfortunately not as a base of source code :(
I have just successfully commit the changes to CVS :)
Basically, I have added in the following controls (including icons)
1. wxdatepickerctrl
2. wxradiobox
3. wxradiobutton
4. wxscrollbar
5. wxspinctrl
6. wxspinbutton
7. wxtreectrl
I refer to the xrc output of wxGlade to code most of the controls except those not in wxGlade.
And the styles , I refer to the Help file of wxwidgets-2.6.1 .
hi , byo , seems like our time could not meet in the IM .. Just some update from my side
Initially I would like to try to do some enhancement on the widget editor such as Pop up menu , but I can see you are doing some major changes in the code , so I stop the research .
Instead , I try to see any additional new widget that I can add , and I am doing 1 of them , ie, wxStaticLine.
I manage to add it , however, there is a problem where when we try to add , it cannot be seen because it takes the default size (very size) , user can only select it from the TreeViewCtrl .
Therefore, I try to hard code a minimum size (wxSize(10,10)) in the creation code and it shows with a viewable size , but have one problem , it cannot be resized !? :shock:
I have looked into the code but I think it is better I do not alter the code of resizing because you are still doing major changes in the code of this layer.
QuoteI manage to add it , however, there is a problem where when we try to add , it cannot be seen because it takes the default size (very size) , user can only select it from the TreeViewCtrl .
Therefore, I try to hard code a minimum size (wxSize(10,10)) in the creation code and it shows with a viewable size , but have one problem , it cannot be resized
I think I know the reason already :) , still checking where is the suitable place to initialize the size.
Hi, currently I can not help, I'll be inaccessible for one week.
About editor's updates: I've notices many bugs when running wxSmith on Linux. Most of changes were made to add cross-platform compatibility (there's no such thing like transparent window on wxGTK - or it doesn't work and there's no such thing like correct refresh order on wxMSW, and more and more... huh, weird things). And I guess it will change a little bit. But if You'll add something I'll keep it in source :) So any experiments are welcome :D
Small announcement:
wxSmith is able to handle colour and font properties for default widgets so it can produce more artistic resources ;)
Some screenshoots in attachments :)
[attachment deleted by admin]
Hi Byo, I want to compile wxSmith with Unicode support but that isn't possible...
I get the following error:
defwidgets\wxsspinctrl.cpp:23:1: pasting "LL" and "L"0"" does not give a valid preprocessing token
defwidgets\wxsspinctrl.cpp: In member function `virtual void wxsSpinCtrl::BuildExtVars()':
defwidgets\wxsspinctrl.cpp:23: error: `LL' undeclared (first use this function)
defwidgets\wxsspinctrl.cpp:23: error: (Each undeclared identifier is reported only once for each function it appears in.)
Quote from: mispunt on September 20, 2005, 08:35:43 AM
Hi Byo, I want to compile wxSmith with Unicode support but that isn't possible...
My mistake - I haven't compiled wxSmith with unicode support lately. Just wait a minute wand it will be fixed ;)
EDIT: Fixeed version is in CVS :)
It seems like is my mistake , thx byo for fixing it :oops:
i wanted to learn how to work with wxSmith and tried to make a dialog with buttons.
on Button Click a wxTextCtrl should be updated with a new text.
1.) typo in wxButton->SetToolTip
then i noticed, that when i want to set a Tooltip for the Button, there is a typo.
It should insert a wxButton->SetToolTip() member function call,
but it inserts a wxButton->SetToolTop() instead,
which leads to a compiler error of course.
2.) EVENT Handling
i tried to use an event handling function for my button,
everything looks fine, there is an DECLARE_EVENT_TABLE() in the class definition
and an EVENT_TABLE in the implementation file. The app builds fine without errors
but the button-event handler function never gets called !?!
maybe you have an example and/or some documentation how this should work ?
Quote from: tiwag on October 06, 2005, 05:13:48 PM
i wanted to learn how to work with wxSmith and tried to make a dialog with buttons.
on Button Click a wxTextCtrl should be updated with a new text.
1.) typo in wxButton->SetToolTip
then i noticed, that when i want to set a Tooltip for the Button, there is a typo.
It should insert a wxButton->SetToolTip() member function call,
but it inserts a wxButton->SetToolTop() instead,
which leads to a compiler error of course.
2.) EVENT Handling
i tried to use an event handling function for my button,
everything looks fine, there is an DECLARE_EVENT_TABLE() in the class definition
and an EVENT_TABLE in the implementation file. The app builds fine without errors
but the button-event handler function never gets called !?!
maybe you have an example and/or some documentation how this should work ?
Heh, You've found two bugs. Huh, wxSmith doesn't recognize properly if dialog loads from xrc or not :/
I'll try to fix those bugs today :)
Quote from: byo
Heh, You've found two bugs. Huh, wxSmith doesn't recognize properly if dialog loads from xrc or not
8)
pleaseprovide a
some documentation * which code does wxSmith generate and
* where does it update the code,
* where can i add my custom code
* ...
and a
sample project in any case
so that a newbie can at least make a look how it *should* work,
thanks a lot, i'm shure wxSmith will be a great tool soon !
Quote from: tiwag on October 06, 2005, 06:32:00 PM
please
provide a some documentation
* which code does wxSmith generate and
* where does it update the code,
* where can i add my custom code
* ...
and a sample project in any case
so that a newbie can at least make a look how it *should* work,
I'll write something in wiki but first some bugs are waiting ;)
And there will be wxSmith wizard so creating wxSmith apps will be created just in few clicks :)
Yeah, but I vote for the things that tiwag ask, before those wizards with some dogs or clips :P
Quote from: byo
...Heh, You've found two bugs ... I'll try to fix those bugs ...
fine, the event-handler is called now, thanks !
but now it crashes everytime, when i click on something of the created dialog-resource
-------------------
Error occured on Friday, October 7, 2005 at 15:03:46.
D:\Programme\CodeBlocks\codeblocks.exe caused an Access Violation at location 0153cef2 in module D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll Reading from location 00000020.
Registers:
eax=0147ad80 ebx=00b76848 ecx=01437f30 edx=00000020 esi=016120f0 edi=0022f2d8
eip=0153cef2 esp=0022f098 ebp=0022f140 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
Call stack:
0153CEF2 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153CEF2 GetSDKVersionMinor
0153D2E5 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153D2E5 GetSDKVersionMinor
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
0152C086 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0152C086 GetSDKVersionMinor
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
01526297 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01526297
01523596 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523596
01523068 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523068
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
1010D7E6 D:\TOOLS\wxmsw26_gcc_cb.dll:1010D7E6 _ZN8wxWindow16HandleMouseEventEjiij
1010FF59 D:\TOOLS\wxmsw26_gcc_cb.dll:1010FF59 _ZN8wxWindow13MSWWindowProcEjjl
10108B20 D:\TOOLS\wxmsw26_gcc_cb.dll:10108B20 _Z9wxWndProcP6HWND__jjl@16
77D18734 C:\WINDOWS\system32\USER32.dll:77D18734 GetDC
77D18816 C:\WINDOWS\system32\USER32.dll:77D18816 GetDC
77D189CD C:\WINDOWS\system32\USER32.dll:77D189CD GetWindowLongW
77D18A10 C:\WINDOWS\system32\USER32.dll:77D18A10 DispatchMessageW
77D2E097 C:\WINDOWS\system32\USER32.dll:77D2E097 IsDialogMessageW
77D3C6AB C:\WINDOWS\system32\USER32.dll:77D3C6AB IsDialogMessageA
1010803E D:\TOOLS\wxmsw26_gcc_cb.dll:1010803E _ZN8wxWindow17MSWProcessMessageEP6tagMSG
100E85B4 D:\TOOLS\wxmsw26_gcc_cb.dll:100E85B4 _ZN11wxEventLoop17PreProcessMessageEP6tagMSG
100E84F9 D:\TOOLS\wxmsw26_gcc_cb.dll:100E84F9 _ZN11wxEventLoop14ProcessMessageEP6tagMSG
100E8AE4 D:\TOOLS\wxmsw26_gcc_cb.dll:100E8AE4 _ZN11wxEventLoop8DispatchEv
100E8880 D:\TOOLS\wxmsw26_gcc_cb.dll:100E8880 _ZN11wxEventLoop3RunEv
101823DE D:\TOOLS\wxmsw26_gcc_cb.dll:101823DE _ZN9wxAppBase8MainLoopEv
004039AC D:\Programme\CodeBlocks\codeblocks.exe:004039AC
1004318F D:\TOOLS\wxmsw26_gcc_cb.dll:1004318F _Z14wxUninitializev
100B077C D:\TOOLS\wxmsw26_gcc_cb.dll:100B077C _Z7wxEntryP11HINSTANCE__S0_Pci
0040138A D:\Programme\CodeBlocks\codeblocks.exe:0040138A
0044669A D:\Programme\CodeBlocks\codeblocks.exe:0044669A
004011E7 D:\Programme\CodeBlocks\codeblocks.exe:004011E7
00401238 D:\Programme\CodeBlocks\codeblocks.exe:00401238
7C816D4F C:\WINDOWS\system32\kernel32.dll:7C816D4F RegisterWaitForInputIdle
-------------------
Error occured on Friday, October 7, 2005 at 15:09:01.
D:\Programme\CodeBlocks\codeblocks.exe caused an Access Violation at location 00000000 Reading from location 00000000.
Registers:
eax=00000000 ebx=00b76848 ecx=0148cf58 edx=0148a110 esi=016120f0 edi=0022f48c
eip=00000000 esp=0022f228 ebp=0022f244 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
Call stack:
00000000
015B1989 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:015B1989 GetSDKVersionMinor
0153CEDB D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153CEDB GetSDKVersionMinor
0153D2E5 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153D2E5 GetSDKVersionMinor
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
0152C086 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0152C086 GetSDKVersionMinor
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
01526297 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01526297
01523596 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523596
01523068 D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523068
100A77A8 D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49 D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
1010D7E6 D:\TOOLS\wxmsw26_gcc_cb.dll:1010D7E6 _ZN8wxWindow16HandleMouseEventEjiij
1010FF59 D:\TOOLS\wxmsw26_gcc_cb.dll:1010FF59 _ZN8wxWindow13MSWWindowProcEjjl
10108B20 D:\TOOLS\wxmsw26_gcc_cb.dll:10108B20 _Z9wxWndProcP6HWND__jjl@16
77D18734 C:\WINDOWS\system32\USER32.dll:77D18734 GetDC
77D18816 C:\WINDOWS\system32\USER32.dll:77D18816 GetDC
77D189CD C:\WINDOWS\system32\USER32.dll:77D189CD GetWindowLongW
77D196C7 C:\WINDOWS\system32\USER32.dll:77D196C7 DispatchMessageA
100E8515 D:\TOOLS\wxmsw26_gcc_cb.dll:100E8515 _ZN11wxEventLoop14ProcessMessageEP6tagMSG
100E8AE4 D:\TOOLS\wxmsw26_gcc_cb.dll:100E8AE4 _ZN11wxEventLoop8DispatchEv
100E8880 D:\TOOLS\wxmsw26_gcc_cb.dll:100E8880 _ZN11wxEventLoop3RunEv
101823DE D:\TOOLS\wxmsw26_gcc_cb.dll:101823DE _ZN9wxAppBase8MainLoopEv
004039AC D:\Programme\CodeBlocks\codeblocks.exe:004039AC
1004318F D:\TOOLS\wxmsw26_gcc_cb.dll:1004318F _Z14wxUninitializev
100B077C D:\TOOLS\wxmsw26_gcc_cb.dll:100B077C _Z7wxEntryP11HINSTANCE__S0_Pci
0040138A D:\Programme\CodeBlocks\codeblocks.exe:0040138A
0044669A D:\Programme\CodeBlocks\codeblocks.exe:0044669A
004011E7 D:\Programme\CodeBlocks\codeblocks.exe:004011E7
00401238 D:\Programme\CodeBlocks\codeblocks.exe:00401238
7C816D4F C:\WINDOWS\system32\kernel32.dll:7C816D4F RegisterWaitForInputIdle
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?
Quote from: rickg22 on October 07, 2005, 05:37:23 PM
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?
Whoops :oops:
I had lot of work to do this weekend and I must have missed something important :(
EDIT: Bugs fixed :)
I added a XRC Dialog, and here is the code produced.
//(*Initialize(XRCtest)
wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
//*)
Here is the error produced. This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)
Any idea what can cause this? BTW good job on the wxSmith. It has some issues with repainting when dragging. It changes the area to black. Still good job.
jmccay
Quote from: jmccay on October 27, 2005, 03:22:20 AM
I added a XRC Dialog, and here is the code produced.
//(*Initialize(XRCtest)
wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
//*)
Here is the error produced. This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)
Any idea what can cause this? BTW good job on the wxSmith. It has some issues with repainting when dragging. It changes the area to black. Still good job.
jmccay
Yop, I know this bug, Please select FlexGridSizer and unselect "Is Member" property and it should work fine :) I forgot to remove this bug before RC2 :oops:
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers". I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.
jmccay
Quote from: jmccay on October 28, 2005, 03:54:07 AM
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers". I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.
jmccay
Thx for starting it :)
I've almost written wxSmith "Hello world tutorial" :). Maybe i'll fill empty Tutorial section :)
Hi,
Why "code completion" don't work with the "wxSmith" variables ?
when I put this
.
.
.
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
StatusBar1. (don't show the properties of this object)
.
.
.
This is the wrong forum for this question, but ..
Your code is wrong, and so code completion cannot parse it. When you enter
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
the correct reference is
StatusBar1->something
not
StatusBar1.something
Notice the pointer ref "->" rather than the direct ref "."
Ringo
I know that, but not work with -> too.
It's very difficult to program with GUI interfaces, without these tricks.
I know about that problem. But I can not force reparsing of files in any way from plugin (I hope I'm wrong and somebody shows me the solution).
I work this way: I always keep the header file open, when I have to write some part of the code I press Ctrl+S (Save All) - this forces all files to be reparsed.
Quote from: MaikoID on October 17, 2008, 03:02:16 PM
It's very difficult to program with GUI interfaces, without these tricks.
Hmm, maybe little bit harder than usual but I wouldn't label it "difficult". It's very useful and I like completion a lot but it may make you to lazy. Side effect: unfortunately more bugs and more time spent on finding them (that's real-life example).
Regards
BYO
In the name of God
hello, while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?
(please also pay attention to the 2nd part of this post, may be it is a new idea that could be implemented in adoring wxsmith):)
=====
more details :
Quotethe only way to let the buttons and other stuff appear in this situation is to right click on the item and choose"send back" ,by using this method
when you run the application when you move your mouse cursor over a place that the item is located! by the time the mouse hovers on the item it shows up! meaning , that all of the items are invisible until you move the cursor over the object/item you have used in the form!
by the way please notice that , when you use "sendBack" on an item in this situation (using a bitmap as background of your application), you can not just click on that item easily! i mean for example you place a button on your form!(on a bitmap picture),and you send it back, then you want to add sth to the code specific to the button!(for example wana add a new function or write Close(),what ever you like), wana double click on it and then expect seeing the source code page turned up! but to your surrprise nothing works again !(from properties pane, you cant use a new handler!i dont know Why!?!!)
i really would like o know the cause , and how to fix it if possible, and if there is noway for it now, i would really appreciate implementing such a functionality in WxSmith .
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?
would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
==================
And also , is there any way to insert a flash object and make it function as button! lets say using a flash button in wxsmith, sth just like bitmap button! if not can you implement such a thing in adoring Wxsmith?
and is it possible to merge an Object again , sth like a bitmap , a piece of picture to the wxpanel , so that it just doesn't get in way when adding buttons , and other wxstuff ? !
tanx
hi byo,
for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...
they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...
greetings from asturias
[attachment deleted by admin]
Quote from: Master on October 20, 2008, 06:42:11 AM
hello, while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?
Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:
void SomeFrame::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc( this );
dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).
Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?
would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.
Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a flash button in wxsmith, sth just like bitmap button! if not can you implement such a thing in adoring Wxsmith?
Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.
And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".
BTW. Why this post is "in the name of God" ?
Regards
BYO
Quote from: nausea on October 22, 2008, 09:24:21 PM
hi byo,
for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...
they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...
greetings from asturias
Thanks for the icons. They look better than mine you can expect them in the repository soon :)
BYO
Quote from: byo on October 24, 2008, 11:24:55 PM
Quote from: Master on October 20, 2008, 06:42:11 AM
hello, while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?
Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:
void SomeFrame::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc( this );
dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}
Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).
Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?
would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.
Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a flash button in wxsmith, sth just like bitmap button! if not can you implement such a thing in adoring Wxsmith?
Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.
And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".
BTW. Why this post is "in the name of God" ?
Regards
BYO
tanx byo for your help , the reason , i posted such a thing here was that , i thought , they could be implemented in Wxsmith ! why ? cuz again i though they are a must have and you forgot to add them to the Wxsmith project !!
well by saying the flash buttons , i mean a button made using some flash button creation software such as Armada flash suit or adobe Flash Cs3!( i wonder if you saw KmPlayer, the latest version, it uses such buttons if think!), so that you can use them in your project !the mouse hovers,and it changes ! you know that !
(if again these things need to use plugins , tell me please! )
and That "In the name of God" it my habit !when ever im badly in need of sth and i hope everything goes ok , i start my work (rather start coding a new project or ask new stuff) with the name of God .
again Byo many tanx, and im sorry if my post was no related to this topic , please consider them as some suggestion on improving Wxsmith! ( ive seen these stuff in VS, so i thought i could be a good idea to implement them in WxSmith too !)
Quote from: Master on October 26, 2008, 04:59:08 PM
well by saying the flash buttons , i mean a button made using some flash button creation software such as Armada flash suit or adobe Flash Cs3!( i wonder if you saw KmPlayer, the latest version, it uses such buttons if think!), so that you can use them in your project !the mouse hovers,and it changes ! you know that !
(if again these things need to use plugins , tell me please! )
Usually you won't need such huge products like flash to do this. Everything is alreay available. For the reference I attach project with simple "button-like" item which changes colour when mouse is over it. The project is made on linux but source and header files should work fine on windows too. Just need to create new project.
KmPlayer is definitely not using flash. That would equal to using plane to buy some vegetables in a shop on the other side of the street.
Anyway, we should if you want to continue this conversation, please add new topic into other group.
Regards
BYO
[attachment deleted by admin]
Hello all!
I'm and experienced developer but I'm new to Code::Blocks and wxWidgets, so please be indulgent with me (at least the first few questions :D )
I've been looking at the wxWidgets sample code and found a quite useful widget for a project I have in mind: wxFilePicker. Unfortunately it seems that this widget is not available/supported in wxSmith; am I right? or am I missing something?
If I'm doing something wrong I'd be thankful if you could point me to the appropriate documentation.
Thanks in advance!
PS: Just in case it matters, I'm using Code::Blocks 8.02 and wxWidgets 2.8 under Kubuntu 8.10
Quote from: kakaroto on November 03, 2008, 03:27:05 AM
I've been looking at the wxWidgets sample code and found a quite useful widget for a project I have in mind: wxFilePicker. Unfortunately it seems that this widget is not available/supported in wxSmith; am I right? or am I missing something?
Unfortunately there's no support for wxFilePickerCtrl in wxSmith now. But if you only want to show file-choose dialog there's wxFileDialog object which can be used instead. More info on this class can be found here (http://"http://docs.wxwidgets.org/stable/wx_wxfiledialog.html#wxfiledialog").
I don't remember exactly whether it was supported on the 8.02 release. If it was not, I can only suggest some newer nightly build ;)
Regards
BYO
Hi byo,
Is it possible to set the default border, placement and proportion when placing widgets? For instance I usually use 3 dialog unit borders with a proportion of 0. It can be a pain to place all my widgets then go through them all, changing these values.
While I am asking is there any way to convert a wxSmith project to use xrc?
Thanks,
Les
Hi
I read in Jan 2006 (http://forums.next.codeblocks.org/index.php?topic=1987.0 (http://forums.next.codeblocks.org/index.php?topic=1987.0)) a reference to cut, copy and paste. Is this features going to be implemented. It would be an extremely useful features that is missing from an otherwise excellent application. I am using Code::Blocks with wxSmith extensively and encouraging many of my colleagues to do so. The lack of cut, copy & paste is slowing their migration (from an M$ product) and does slow my development often.
If there is feature request system that I have missed, please kick me in the right direction.
Keep up the good work.
Copy/paste works for me. Select the items, hit ctrl-C, got to your target, hit ctrl-V.
You have to be a little careful what you select. Fro instance if you select a sizer, the sizer and all of it's contents will be copied. When pasting, be aware of what inser mode you are using (before, after, into etc).
Les
I hope wxSmith can write code like this:
[attachment deleted by admin]
Here have some question about wxSmith.
It's seem like bug:
http://forums.next.codeblocks.org/index.php/topic,10040.msg69882.html#msg69882
http://forums.next.codeblocks.org/index.php/topic,10051.0.html
Quote from: Loaden on February 05, 2009, 10:29:35 AM
I hope wxSmith can write code like this:
There's one problem with enums - if you mix two or more resources in one aplication you may have ids that are same. Let's take an example:
Theres one resource of type wxDialog - it has button with id of value let's say 10. Now we would like to add separate wxPanel resource into that dialog. This resource may also have button with id of value 10. If event handling occurs there's confusion because event handling is filtered through ids.
I decided to switch to static const long time ago (there were enums before) because:
- Static members are not created per instance of class. They are global so the total extra memory requirement for them is up to few hundred bytes per application.
- These members are initialized using wxNewId() function which is said to create unique ids in whole application scope which allows to mix multiple resources simultaneously in one window
Regards
BYO
Quote from: byo on February 05, 2009, 11:34:03 PM
Quote from: Loaden on February 05, 2009, 10:29:35 AM
I hope wxSmith can write code like this:
There's one problem with enums - if you mix two or more resources in one aplication you may have ids that are same.
I see.
but why can not set all control id to wxID_ANY? or wxID_* ? i think this is a bug.
DialogBlocks not have this question. it's support wxID_* in every control.
And i hope wxSmith can offer more option, to let's user choice.
example: _("") or _T(""), because more application not support I18N.
example: const static id OR enums id.
Final, there have some question:
http://forums.next.codeblocks.org/index.php/topic,10040.msg69882.html#msg69882
I can't set size. it's not work.
I found it's always call 'SetSizeHints'.
Index: src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp (revision 5440)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp (working copy)
@@ -215,7 +215,7 @@
Codef(_T("%sFit(%O);\n"),ChildAccessPrefix.c_str());
}
- Codef(_T("%sSetSizeHints(%O);\n"),ChildAccessPrefix.c_str());
+ //Codef(_T("%sSetSizeHints(%O);\n"),ChildAccessPrefix.c_str());
}
}(http://forums.next.codeblocks.org/index.php?action=dlattach;topic=10040.0;attach=3128)
thanks!!
I want set Frame size like wxSize(700, 500), and all control resize self to fit Frame's size.
But now, parent size must fit controls.
Hi,
A few days ago, I posted almost the same message as this on "General" forum.
But I think that forum is not appropriate to post this kind of message,
so let me post it on this board again.
I have a request for auto-generated codes by wxSmith.
I'm testing a frame which has fixed size.
I created a new frame based wxSmith project by the wizard, then deleted the
MenuBar1 and the StatusBar1 which are automatically added by default.
The followings are the codes of frame constructor in this situation.
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
//(*Initialize(SizeTestFrame)
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
//*)
}
Next, I unchecked the [Default size] checkbox in the property editor, then set
Width to 300 and Height to 200. The codes of constructor was changed as follows.
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
//(*Initialize(SizeTestFrame)
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
SetClientSize(wxSize(300,200));
//*)
}
After that, I placed a BoxSizer into the Frame on the GUI designer screen.
Then the frame was shrunk to very small size, and the constructor codes are
changed:
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
//(*Initialize(SizeTestFrame)
wxBoxSizer* BoxSizer1;
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
SetClientSize(wxSize(300,200));
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
SetSizer(BoxSizer1);
BoxSizer1->SetSizeHints(this);
//*)
}
This means the size setting by SetClientSize(wxSize(300,200)); is ignored.
So I added SetClientSize(wxSize(300,200)); again after the auto-generated codes
by manual as follows:
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
//(*Initialize(SizeTestFrame)
wxBoxSizer* BoxSizer1;
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
SetClientSize(wxSize(300,200));
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
SetSizer(BoxSizer1);
BoxSizer1->SetSizeHints(this);
//*)
SetClientSize(wxSize(300,200));
}
Then the frame was shown at the expected size on runtime.
But the frame is still shrunk on the GUI designer even clicking " Show preview"
button.
Although I guess it might be a kind of spec or bug of wxWidgets, but I think
it's better that wxSmith places SetClientSize(wxSize(x, y)); at the end of the
auto-generated codes of constructor, and it's reflected in the GUI designer
screen.
In addition, I think it affects the usability of the GUI designer. Actually,
it's rather difficult for me to place a widgets on the exact position in the
narrow space.
That's my request.
I would be happy if this issue is resolved.
Regards,
hirofield
Hi. I have a minor problem when using wxSmith (C::B 2.8.10, newest nightly builds).
The listed events in "Events Window" for wxSlider are wxEVT_COMMAND_SCROLL + (_TOP, _BOTTOM, etc). They works almost fine, except when I want to add a handler for wxEVT_COMMAND_SLIDER_UPDATED event. wxEVT_COMMAND_SLIDER_UPDATED event handler can be triggered when mouse drags the thumb, but wxEVT_COMMAND_SCROLL_XXXX's can't.
So if there is a solution please tell me. Thanks in advance.
As workaround (until the wxEVT_COMMAND_SLIDER_UPDATED) is added you can use wxEVT_SCROLL_THUMBTRACK to fetch any event generated by tracking the slider with the mouse and wxEVT_SCROLL_CHANGED to fetch also events triggered by the keyboard or by clicking next to the slider (this event is also triggered by mouse-dragging, but only after releasing the mouse-button).
Anyway the wxEVT_COMMAND_SLIDER_UPDATED will most likely be added soon.
Thanks for reporting.
EDIT:
Just added it in my local copy, will commit this later.
Quote from: jens on December 18, 2009, 07:18:29 AM
Just added it in my local copy, will commit this later.
Done (svn r5986).
Quote from: jens on December 18, 2009, 02:33:38 PM
Quote from: jens on December 18, 2009, 07:18:29 AM
Just added it in my local copy, will commit this later.
Done (svn r5986).
Thanks. Excellent Efficiency :lol:
Hi Guys,
I added a new feature to wxSmith and posted a patch on 2/2. I probably should have announced it here sooner. The description from Berlios:
-----------
The patch was made against SVN version 6130, 2/2/10. 2010-Feb-02 21:33 cryogen
This patch adds the ability to insert code to create an image for a toolbar button or menu item. Previously you could only use an image path or wxArtProvidor. In my case, I wanted to use images embedded using wxInclude, via the wxMEMORY_BITMAP() macro. You can now insert code such as "wxMEMORY_BITMAP(save_left)" into the new field to have wxSmith create an entry such as:
ToolBarItem2 = ToolBar1->AddTool(ID_TB_SAVEUNSELECTED, _("Save Unselected"), wxMEMORY_BITMAP(save_left), wxNullBitmap, wxITEM_NORMAL, .....
Any code that returns a valid wxBitmap will work.
The Extra Code option doesn't work for these situations as it inserts the extra code after the call to Append() or Realize(), which is too late.
The patch also includes a couple of spelling corrections.
-----------
What this does is adds the fields seen here at bottom:
(http://cryogen.byethost24.com/wxSmithImageEd.png)
so that you can insert code as described above. This removes the limitation imposed by wxSmith preventing the entry of code to generate the bitmap. I hope you find it useful. You can find it as patch 2921 at https://developer.berlios.de/patch/?group_id=5358 (https://developer.berlios.de/patch/?group_id=5358).
Cheers,
Cryo.
Hi again,
I thought you could download patches from Berlios but apparently not, so it's attached.
Cheers,
Cryo.
[attachment deleted by admin]