Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class strings_box

boost::ui::strings_box — Abstract widget that holds array of strings.

Synopsis

// In header: <boost/ui/strings_box.hpp>


class strings_box : public boost::ui::widget {
public:
  // types
  typedef uistring   value_type;  // String type. 
  typedef index_type size_type;   // Integral type. 

  // public member functions
  uistring at(size_type) const;
  uistring operator[](size_type) const;
  bool empty() const;
  size_type size() const;
  void clear();
  void push_back(const uistring &);
  strings_box & select(size_type);

  // private member functions
  void check_range(size_type) const;
  native_impl * get_native();
  const native_impl * get_native() const;

  // public data members
  static const size_type npos;  // Invalid index. 
};

Description

strings_box public member functions

  1. uistring at(size_type pos) const;
    Returns specified element with bounds checking.

    Throws:

    std::out_of_range If pos is an invalid index
  2. uistring operator[](size_type pos) const;
    Retuns specified element.
  3. bool empty() const;
    Checks whether the container has options.
  4. size_type size() const;
    Returns the number of options.
  5. void clear();
    Clears the contents.
  6. void push_back(const uistring & value);
    Appends the given string value to the end.
  7. strings_box & select(size_type pos);
    Selects specified element.

strings_box private member functions

  1. void check_range(size_type pos) const;
  2. native_impl * get_native();
  3. const native_impl * get_native() const;

PrevUpHomeNext