25 #ifndef WITEMSELECTION_H
26 #define WITEMSELECTION_H
32 #include <boost/tuple/tuple.hpp>
33 #include <boost/shared_ptr.hpp>
34 #include <boost/signals2/signal.hpp>
35 #include <boost/enable_shared_from_this.hpp>
37 #include "WSharedSequenceContainer.h"
38 #include "WItemSelectionItem.h"
49 class WItemSelection:
public boost::enable_shared_from_this< WItemSelection >,
57 typedef boost::shared_ptr< WItemSelection >
SPtr;
62 typedef boost::shared_ptr< const WItemSelection >
ConstSPtr;
120 static boost::shared_ptr< WItemSelectionItem >
Item( std::string name, std::string description =
"",
const char** icon = NULL )
122 return boost::shared_ptr< WItemSelectionItem >(
new WItemSelectionItem( name, description, icon ) );
133 void addItem( std::string name, std::string description =
"",
const char** icon = NULL );
140 void addItem( boost::shared_ptr< WItemSelectionItem > item );
145 #endif // WITEMSELECTION_H
void addItem(std::string name, std::string description="", const char **icon=NULL)
Convenience method to add a new item.
boost::shared_ptr< WItemSelection > SPtr
Convenience typedef for a boost::shared_ptr< WItemSelection >
This class provides a common interface for thread-safe access to sequence containers (list...
virtual WItemSelector getSelectorAll()
Creates an default selection (all items selected).
virtual WItemSelector getSelectorNone()
Creates an default selection (no items selected).
static boost::shared_ptr< WItemSelectionItem > Item(std::string name, std::string description="", const char **icon=NULL)
Convenience method to create a new item.
virtual WItemSelector getSelector(size_t item)
Creates an default selection (a specified items selected).
virtual ~WItemSelection()
Destructor.
virtual WItemSelector getSelectorLast()
Creates an default selection (last item selected).
A class containing a list of named items.
This class represents a subset of a WItemSelection.
virtual WItemSelector getSelectorFirst()
Creates an default selection (first item selected).
boost::shared_ptr< const WItemSelection > ConstSPtr
Convenience typedef for a boost::shared_ptr< const WItemSelection >
Class for keeping a single named item in a WItemSelection.
WItemSelection()
Default constructor.