25 #ifndef WITEMSELECTION_H
26 #define WITEMSELECTION_H
33 #include <boost/tuple/tuple.hpp>
36 #include <boost/shared_ptr.hpp>
39 #include <boost/signals2/signal.hpp>
42 #include <boost/enable_shared_from_this.hpp>
45 #include "WSharedSequenceContainer.h"
46 #include "WItemSelectionItem.h"
57 class WItemSelection:
public boost::enable_shared_from_this< WItemSelection >,
65 typedef boost::shared_ptr< WItemSelection >
SPtr;
70 typedef boost::shared_ptr< const WItemSelection >
ConstSPtr;
128 static boost::shared_ptr< WItemSelectionItem >
Item( std::string name, std::string description =
"",
const char** icon = NULL )
130 return boost::shared_ptr< WItemSelectionItem >(
new WItemSelectionItem( name, description, icon ) );
141 void addItem( std::string name, std::string description =
"",
const char** icon = NULL );
148 void addItem( boost::shared_ptr< WItemSelectionItem > item );
153 #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.