Skip to content

WxAUI

wxAUI is a set classes for writing a customizable application interface with built-in docking, floatable panes and a flexible MDI-like interface.

Warning

Since version 0.9.3, wxAUI has been integrated with the wxWidgets source code.

Simple example

MainFrame::MainFrame(const wxString& title) :
        wxFrame(NULL, ID_MAINFRAME, title, /* wxDefaultPosition */wxPoint(0, 0),
                wxSize(MAINFRAME_WIDTH, MAINFRAME_HEIGHT), DEFAULT_WINDOW_STYLE)
{
    // TODO: User's initialize code.
    Centre();
    createAui();
}
// ...
MainFrame::~MainFrame()
{
    // TODO: User's release code.
    _aui_manager.UnInit();
}
// ...
void MainFrame::createAui()
{
    wxPoint const FRAME_POSITION = GetPosition(); // You should be called Centre() method.
    wxSize const FRAME_SIZE = GetSize();

    _aui_manager.SetManagedWindow(this);
    // { // Create aui widgets.
    _channels_panel = new ChannelsPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
    wxAuiPaneInfo info;
    info.name = wxT("Channels");
    info.caption = wxT("Channels");
    info.Float();
    info.FloatingPosition(FRAME_POSITION.x + FRAME_SIZE.x, FRAME_POSITION.y);
    // info.FloatingSize(100, 300);
    // }
    _aui_manager.AddPane(_channels_panel, info);
    //OR:
    //_aui_manager.AddPane(_channels_panel, wxLEFT, wxT("Caption"));
    _aui_manager.Update();
}

Frame 중심에 위치할 widget(wxPanel)은 parent widget(위의 예제에서는 MainFrame class)wxSizer를 사용하여 직접 추가하지 말고 아래와 같이 wxAuiManager에 직접 추가해야 한다.

_media_panel = new MediaPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
_aui_manager.AddPane(_media_panel, wxCENTER, wxT("main"));

Category

  • wxAuiManager 1
  • wxAuiManagerEvent
  • wxAuiDefaultTabArt
  • wxAuiToolBarEvent
  • wxAuiToolBarItem
  • wxAuiToolBarArt
  • wxAuiDefaultToolBarArt
  • wxAuiToolBar
  • wxAuiNotebook
  • wxAuiTabContainerButton
  • wxAuiTabContainer
  • wxAuiTabArt
  • wxAuiSimpleTabArt
  • wxAuiDockArt
  • wxAuiPaneInfo

Download

  • Wxaui-0.9.tar.gz

See also

Favorite site

References


  1. 기존 wxFrameManager는 wxAuiManager로 변경되었다.