From f213158c14d0a73a410f542acd442e570c6e2322 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 13 Jan 2010 01:07:51 -0600 Subject: [PATCH] Module_Parameter_Editor: Use Fl_Menu_Button instead of Fl_Choice to improve layout. --- Mixer/Module_Parameter_Editor.C | 5 +++-- Mixer/Module_Parameter_Editor.H | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Mixer/Module_Parameter_Editor.C b/Mixer/Module_Parameter_Editor.C index d36c9d5..f3589ae 100644 --- a/Mixer/Module_Parameter_Editor.C +++ b/Mixer/Module_Parameter_Editor.C @@ -26,7 +26,7 @@ #include "FL/Boxtypes.H" #include "FL/Fl_Flowpack.H" #include "FL/Fl_Labelpad_Group.H" -#include "FL/Fl_Choice.H" +#include "FL/Fl_Menu_Button.H" #include "Module.H" #include "Module_Parameter_Editor.H" #include "Controller_Module.H" @@ -68,10 +68,11 @@ Module_Parameter_Editor::Module_Parameter_Editor ( Module *module ) : Fl_Double_ { Fl_Pack *o = new Fl_Pack( 0, 0, 50, 25 ); o->type( FL_HORIZONTAL ); o->spacing( 20 ); - { Fl_Choice *o = mode_choice = new Fl_Choice( 0, 0, 200, 25 ); + { Fl_Menu_Button *o = mode_choice = new Fl_Menu_Button( 0, 0, 25, 25 ); o->add( "Knobs" ); o->add( "Horizontal Sliders" ); o->add( "Vertical Sliders" ); + o->label( NULL ); o->value( 0 ); o->when( FL_WHEN_CHANGED ); o->callback( cb_mode_handle, this ); diff --git a/Mixer/Module_Parameter_Editor.H b/Mixer/Module_Parameter_Editor.H index 471e302..663aacc 100644 --- a/Mixer/Module_Parameter_Editor.H +++ b/Mixer/Module_Parameter_Editor.H @@ -22,8 +22,8 @@ #include class Fl_Pack; class Fl_Flowpack; -class Fl_Choice; class Module; +class Fl_Menu_Button; class Module_Parameter_Editor : public Fl_Double_Window { @@ -50,7 +50,7 @@ class Module_Parameter_Editor : public Fl_Double_Window Fl_Pack *main_pack; Fl_Flowpack *control_pack; - Fl_Choice *mode_choice; + Fl_Menu_Button *mode_choice; bool _resized;