Documentation

  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_Input_Choice


Class Hierarchy

Include Files

    #include <FL/Fl_Input_Choice.H>
    


Plastic and normal Fl::scheme()s.

Description

A combination of the input widget and a menu button. The user can either type into the input area, or use the menu button chooser on the right, which loads the input area with predefined text. Normally it is drawn with an inset box and a white background.

The application can directly access both the input and menu widgets directly, using the menubutton() and input() accessor methods.

Methods

Fl_Input_Choice::Fl_Input_Choice(int x, int y, int w, int h, const char *label = 0)

Creates a new Fl_Input_Choice widget using the given position, size, and label string.

virtual Fl_Input_Choice::~Fl_Input_Choice()

Destroys the widget and any value associated with it.

void Fl_Input_Choice::add(const char *s)

Adds an item to the menu.

void Fl_Input_Choice::clear()

Removes all items from the menu.

Fl_Input *Fl_Input_Choice::input()

Returns a reference to the internal Fl_Input widget.

void Fl_Input_Choice::menu(const Fl_Menu_Item *m)
const Fl_Menu_Item *menu()

Gets or sets the Fl_Menu_Item array used for the menu.

Fl_Menu_Button *Fl_Input_Choice::menubutton()

Returns a reference to the internal Fl_Menu_Button widget.

void Fl_Input_Choice::value(const char *s)
void Fl_Input_Choice::value(int v)
const char *Fl_Input_Choice::value() const

Sets or returns the input widget's current contents. The second form sets the contents using the index into the menu which you can set as an integer. Setting the value effectively 'chooses' this menu item, and sets it as the new input text, deleting the previous text.


User Comments [ Add Comment ]

From greg.ercolano, 02:54 Jan 31, 2007 (score=3)

Fl_Input_Choice was added in FLTK 1.1.7, so you no longer have to download it from my website as a separate widget.

Note too that there's a simple test program in the fltk test directory, eg. fltk/test/input_choice.cxx.


Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2015 by Bill Spitzak and others. This project is hosted by Seriss Corporation. Please report site problems to 'erco@seriss.com'.