os_select
|
 |
A list of choices within a form.
An os_select
allows a user to choose from a list of os_option
objects within an os_form .
An os_select
can specify the number of os_option objects to
display at once through either a constructor or the size()
member function. If size is unspecified, the default display is one os_option
.
When only one os_option
is displayed, the os_select is rendered as a
pulldown list. When more than one os_option is
displayed at once, the os_select is rendered as a
scrollbox.
By default, only one os_option
within an os_select can be selected. Multiple
selections can be enabled through the select()
member function.
Declaration
#include <ospace/web/select.h>
class os_select : public os_element_group
Enums
enum os_select::selection
{
no_multiple, // Restricts selection to a single option.
multiple // Allows multiple options to be selected.
};
Interface
Constructor
os_select(
const string& name ,
selection select )
Constructs a selection
with name name and multiple option selection
status select (default no_multiple
).
Constructor
os_select(
const string& name ,
int size ,
selection select )
Constructs a selection
with name name , displaying
size options at once, with multiple options election status select
(default no_multiple ).
clone
/*
virtual */ os_element* clone() const
Returns a base class
pointer to a heap-based deep copy of the selection.
name
string
name() const
Returns the name.
name
os_select&
name( const string& name )
Sets the name to
name and returns a reference to the selection.
select
os_select&
select( selection select )
Sets the multiple option
selection status to select and returns a reference
to the selection.
select
int
select() const
Returns the multiple
option selection status, or os_select::no_multiple
if not set.
size
int
size() const
Returns the number of
options displayed at once.
size
os_select&
size( int size )
Sets the number of options
displayed at once to size and returns a reference
to the selection.
Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved