![]() |
|
#1
|
|||
|
|||
dial displayBasically I need such a widget in my FLTK GUI: a display dial that shows different angle ranges, e.g., 20 to 30 degrees, and 48-120 degrees.., etc. FLTK has a slider dial but it can only display a single range, plus it is an input widget. I am just wondering maybe I have to use an output widget such as "label",
reshape it into a round, and write my own code to draw those ranges. But I couldn't locate any drawing functions. Any suggestions are appreciated! |
|
#2
|
||||
|
||||
|
Hello and Welcome to GIDForums maverick. I have a few questions.
Quote:
I like the sounds of this. Could be a place for a composit widget of some sort. If you could mock up an image to give me a better idea that would be nice. The drawing functions are in Fl/fl_draw.H (in 1.1.x). Thanks for coming by. This sounds like it could be an interesting project for people to follow along with. 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
|
|||
|
|||
|
Thanks Mark
Quote:
Quote:
More specifically, it is like a distribution pie chart www.rwjf.org |
|
#4
|
||||
|
||||
|
Good, you are using 1.1.x. One thing I tell everyone is to make sure your version is as current as possible. For all intensive purposes the subversion repository at www.fltk.org is 1.1.7. It is very stable and has all the updates that you can have. If you don't have subversion use one of the up to date snapshots or at the very least the 1.1.6 stable release. That will take care of most of the real aggrivating bugs.
Now for your widget. How do you want it to act? Should it read info from somewhere and display itself accordingly. Should you be able to add 'slices' as by picking them? You see where I am going with this. Give a synopsis of the widgets interaction with the user. It sounds, from your original description that it is just a display widget. By that I mean, it will get its info and divide itself accordingly based on percentages of a whole. Sometimes it could be 10 divisions sometime 3 (or whatever) and perhaps display the number in a related output widget? Using your attached example you have 6 varying divisions. Where will the percentage be displayed? Will the user be able to select a division to get feedback on the division? That sort of thing. This really does sound like an interesting widget to design. I will look around to see if I can find any examples of anything that may be helpful. But for now, the fireworks are about to start so it is out the the yard for an independence day (well, midnight here) firework show. 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
|
|||
|
|||
|
Quote:
I did a search but couldn't find any customed widget I can borrow. Maybe I'll first try drawing with OpenGL. BTW: I have one more question regarding to filechooser. I used fl_dir_chooser() to let users specify the desired diretory. Next thing I would like to do is to read all file names in that directory. I found such a function named fl_filename_list(), which returns a list of dirent structures that could contain the info I need. But looks like these structres are defined in BSD only, not on windows. Does that mean I have to write win32 APIs to handel the job? Thanks! |
|
#6
|
||||
|
||||
|
Quote:
Quote:
That's a good question. Since fl_dir_chooser() can display the files they exist in the widget. You could just see how fl_dir_chooser() gets it and see about grabbing the item in the same manner. Oddly enough, I have been working on a directory searching class for the last day or so. I use CygWin with W2K so dirent.h does exist. I guess that would fall into the Quasi-Standard group though. FLTK in it's cross platform way usually allows for everything for everyone. The Win side may just be handled elsewhere. Or does fl_filename_list() not exist with a WIN32 compiled version? Like I said, I compile mine to use CygWin (since in seems to work better on my home machine) and have my brother burn WIN32 binaries if need be. You got my interest up with is last bit though. I would like to see how it is done. One thing to note. I had some very unusual results last time I compiled for the MS not CygWin side with paths. Perhaps it is not fully implemented (although I really doubt that). 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 |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problems with a text display in a tab | maveganzones | FLTK Forum | 2 | 23-Mar-2005 03:26 |
| Displaying node attributes in an XML tree display | njp01u | MS Visual C++ / MFC Forum | 2 | 07-Feb-2005 18:42 |
| How do I display <filename>.bmp on the screen? | oriharel | MS Visual C++ / MFC Forum | 1 | 01-Dec-2004 15:51 |
| uisng php to display php | dopee | MySQL / PHP Forum | 6 | 14-May-2004 19:40 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The