Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class frame

boost::ui::frame — Top level widget that hosts other widgets and supports menu bar.

Synopsis

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


class frame : public boost::ui::window {
public:
  // construct/copy/destruct
  explicit frame(const uistring &);
  frame();

  // public member functions
  ui::menu_bar menu_bar();
  ui::status_bar status_bar();

  // private member functions
  detail_impl * get_impl();
};

Description

Usage example:

class my_frame : public ui::frame
{
    typedef my_frame this_type;

public:
    my_frame() : ui::frame("Frame example")
    {
        ui::button(*this, "&Close this frame")
            .on_press(&this_type::on_close, this);

        menu_bar()
            << ( ui::menu("&File")
                << ui::menu::item("&Quit")
                    .on_press(&this_type::on_close, this)
            )
            ;

        status_bar().text("Ready");
    }

private:
    void on_close()
    {
        close();
    }
};

void run_frame()
{
    my_frame().show_modal();
}

See Also:

Window (Wikipedia)

frame public construct/copy/destruct

  1. explicit frame(const uistring & title);
    Creates frame with the title.
  2. frame();

frame public member functions

  1. ui::menu_bar menu_bar();
    Returns menu bar.

    If menu bar wasn't created, creates menu bar.

  2. ui::status_bar status_bar();
    Returns status bar.

    If status bar wasn't created, creates status bar.

frame private member functions

  1. detail_impl * get_impl();

PrevUpHomeNext