Re: [fltk.general] Code into Fl_group ?
I have a button that allows me to upload a specific object in a Fl_group named test: Fl_Button {} { label {Show Voice Parameters} callback {ADnoteVoice-position(541,35);test- add(ADnoteVoice);ADnoteVoice-show();} xywh {5 400 170 25} labelsize 12 } This code run well. The problem is: I want the object loads automatically without the need to click on the this button . I have tested this Fl_Group test { label {VOICE PARAMETERS} open xywh {540 5 768 922} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {ADnoteVoice-position(541,35);test- add(ADnoteVoice);ADnoteVoice-show();}. The compilation is alright, but nothing occur. } What is wrong ? Impossible to say: you have not provided enough information in your post, nor enough context to make sense of the fluid fragments. Can you take another stab at explaining? Also, a more complete (by which I mean complete enough to compile and test) fluid or C++ example that exhibits the feature you are asking about would help clarify the question. It sounds to me as if you are asking about how to add widgets to a group, but it surely can not be that straightforward, so I guess there's something more to it than that... How are you generating these fluid files? If you are in fluid then surely you can just drag the widgets you want into the group as you edit it? This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Fl_Sys_Menu_Bar not honouring programmatic updates to check boxes
I have an app that, in its menu structure, has some FL_MENU_TOGGLE entries that show a check mark... Now, depending on various happenings within the code, these check marks may be set or cleared programmatically at runtime, using e.g. item-set(); and item-clear(); All well and good - except on OSX where I am using Fl_Sys_Menu_Bar, where the changes to the state of the toggles are never shown by the menus... Anyone else seeing this? Is there a workaround? How do I cause the Fl_Sys_Menu_Bar to be refreshed to reflect the actual state? I guess this may be a bug? Or is this Just The Way Things Are on OSX and we are stuck with it? (Replying to my own post here...) I took a brief look at this, and it does seem as if the Fl_Sys_Menu_Bar on OSX does not get updated to reflect the changes caused by the Fl_Menu_Item::set(),clear() and set_only() methods, in its current form. Not sure how to make that work (it is beyond my OSX-fu skills) but I guess it might be possible to sledgehammer it by triggering a call to convertToMenuBar(...) which would tear down and then rebuild the entire Fl_Sys_Menu_Bar. Sounds a bit heavy-handed, but should work and mean that the state is reported correctly... Anyway, that looks like something that I can do by deriving my own class from Fl_Sys_Menu_Bar and adding a few new methods to test it, so I'll maybe take a stab at that later. (No OSX machines in this office, so can't test now!) -- Ian This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Fl_Sys_Menu_Bar not honouring programmatic updates to check boxes
On 7 Feb 2013, at 11:03, MacArthur, Ian (Selex ES, UK) wrote: I have an app that, in its menu structure, has some FL_MENU_TOGGLE entries that show a check mark... Now, depending on various happenings within the code, these check marks may be set or cleared programmatically at runtime, using e.g. item-set(); and item-clear(); All well and good - except on OSX where I am using Fl_Sys_Menu_Bar, where the changes to the state of the toggles are never shown by the menus... I took a brief look at this, and it does seem as if the Fl_Sys_Menu_Bar on OSX does not get updated to reflect the changes caused by the Fl_Menu_Item::set(),clear() and set_only() methods, in its current form. Not sure how to make that work (it is beyond my OSX-fu skills) but I guess it might be possible to sledgehammer it by triggering a call to convertToMenuBar(...) which would tear down and then rebuild the entire Fl_Sys_Menu_Bar. Sounds a bit heavy-handed, but should work and mean that the state is reported correctly... Anyway, that looks like something that I can do by deriving my own class from Fl_Sys_Menu_Bar and adding a few new methods to test it, so I'll maybe take a stab at that later. (No OSX machines in this office, so can't test now!) OK - outcomes... Didn't need to do anything clever in the end; just a bit of a nasty hack instead! Turns out that calling Fl_Sys_Menu_Bar::replace(); will cause OSX to tear down and rebuild the menu structure, and thus make it reflect the current state of the check marks and so forth. So, just pick a menu entry, then rename it to itself, and... Something like this: // Apple / OSX specific hack to force the menu to be rebuilt // NOT needed on win32/linux... int idx = mb1-find_index(File/item 1); mb1-replace(idx, item 1); // end of menu rebuild hack... Seems to work just fine. As a workaround. A proper fix would be nice though! Cheers, -- Ian ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk