![]() |
|
#1
|
|||
|
|||
Fluid + class derived from Fl_WindowHi, first of all sorry for my poor english
I'm trying to build a gui interface with fluid (v 1.1.4). It's a new class that is derived from Fl_Window (I mean: class myWindow : public Fl_Window). What i have done: 1- declaration (include Fl_Window) 2- class (myWindow and subclass Fl_Window) 3- method (constructor) 4- code That's all right. Now the problem is that I want fluid to build that window graphically. But fluid doesn't show me the window to put widgets on it. Only if I add a new window, but that is not what I want (I don't want to have two windows). I hope I have explained me well and also that there's a way to do this IGA |
|
#2
|
||||
|
||||
|
Hello and Welcome to GIDForums IGA.
A few things. Is there a particular reason you are still using 1.1.4? If you aren't locked in (say for work or school) I would really recomend upgrading to 1.1.7. While not quirk free it is very solid and can be found at fltk.org or fltk.net where I think they have very up to date devpacks. As far as your fluid question. I know exactly what you are talking about. It really is not as big a deal as it sounds since groups and windows are so closely related. Here is an example fluid project that helped me get a grip on this same thing with fluid. Fluid is a bit restrictive in some ways but this code, which may have been originally posted by Greg E in the fltk newsgroups, should answer your question. Code:
The latest version of fluid has many updates as well as a better class builder and a sytax highlighter in the editor so if you can get updated. If you have svn you can grab the latest source and build for your platform. Well, I hope this is what you were looking for. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#3
|
|||
|
|||
|
Yes, that is what I was looking for, thank you.
But I'm only half convinced, because after all I'm having two Fl_Groups... Well, I hope next fluid releases will improve that... I'm a Debian gnu/linux user. So I just type apt-get fltk and I've fltk libraries and fluid running You said version 1.1.7? That version isn't on fltk.org (fltk.net is now down). Should I install svn and get that version? Or can I have syntax highlighting with 1.1.6? Well, I will try Thank you again, IGA |
|
#4
|
||||
|
||||
|
Quote:
Quote:
Do'h, 1.1.6 is the latest released version. The 1.1.7 in located in the subversion repo. I could have been a little clearer on that. Is there anything else you find disturbing/enlightening while using fluid? I have a laundry list started and have been working on a different design to fluid. It will eventually start showing up in the /Applications line at fltk.org but as I am still doing core design nothing is avalable yet. I would love to hear from any Fluid UI Builder users out there. What you like and what you dislike. I use fluid for almost everything I do with FLTK and really like the tool. I really should just start a thread for that and get my wants/desires list together but for now, feel free to let me know how you use fluid and things that would make it easier to do what you want. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#5
|
|||
|
|||
|
Hi again.
Now I'm using version 1.1.7 (get it with svn). It has sintax highlighting and also the undo command! I was building the project like you said. But just now I have discovered a new thing: New->Code->Widget Class... And I think it's exactly what I was looking for! It creates automatically the constructors and put all the resizes and customization of the window in it. Well, now I have to rebuild my project I'm not an expert fluid user (nor an expert fltk user), but I can contribute to your list two things. First, very usefull the shell command, but the errors aren't shown in the shell window that opens. And second, when a callback is created, the inline function (i.e. cb_Open_i) isn't created as 'inline'. I hope you understand my poor english IGA |
|
#6
|
|||
|
|||
|
I have done a quick test and I think it has a bug :_(
What I have: 1 // don't need to include Fl_Window, Widget class does it automatically 2 Widget Class (in c++ tab: class Fl_Window and name myWindow) 3 // don't need any constructors, widget class does it for me 4 Menu_Bar 5 Submenu 6 MenuItem And when I put some code into the menuitem's callback and try to write code, then it gives me a segmentation fault. Well, it must be a bug... What should I do now? Should I tell this the fltk team? IGA |
|
#7
|
||||
|
||||
|
Before you jump on the bug bandwagon post your code here and we can go over it. Many times it is some silly simple thing that fluid assumes you knew you should do. Unfortunately sometimes it is a few tabs over and a layer or two deep.
Glad you got up to speed with the svn version though. You really will be happier for it. Post your code using the markup tags: [c++] // your code here [/c++] or the generic (no highlighting) code markup for the fluid project file by using code not c++. I will take a look as many times fluids little quirks cause the problem. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#8
|
|||
|
|||
|
Ok, but I have done the same before using the widget class and it works, so I thought it was a bug...
Here it is: Code:
CPP / C++ / C Code:
Hope you can help me... again IGA |
|
#9
|
||||
|
||||
|
Well that didn't work out very well for me. I can't write the code from your fluid project file (fluid crashes horribly) most likely to do with the internationalization stuff. I can almost compile your examples from your outputted code though. There is no AreaFile.hh though and I get errors because of the gettext stuff in the menu's. I'll do a little reading tonight and see if I can't come up with something. I should be able to modify your code enough to compile it though.
Disclaimer, I know very little about cross platform stuff as it is but the cross language support is, well, like reading a foreign tongue. I'll let you know how I make out. If you haven't already do a search of the fltk newsgroups and see if you can't find any relevent threads or articles. There may be a problem, I just want to do a little digging first. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#10
|
|||
|
|||
|
I have found the same problem with another widget:
http://www.fltk.org/str.php?L805 But it seems to be fixed... Perhaps it's not in the new widget_class... I think it has only to do with the callback code, because in my computer it crashes only when I put some code and it's ok when I leave it blank. IGA |
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FLTK && fluid In Motion | cable_guy_67 | FLTK Forum | 4 | 20-Mar-2008 03:52 |
| GIMcontacts - a gim fltk fluid venture | cable_guy_67 | FLTK Forum | 0 | 14-Feb-2005 14:18 |
| Error C2146: syntax error : missing ',' before identifier 'C4' | mattchew008 | C++ Forum | 2 | 19-Dec-2004 06:06 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 03:38 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The