Beispiel #1
0
bool wxStatusBar::Create(wxWindow *parent,
                         wxWindowID id,
                         long style,
                         const wxString& name)
{
    if ( !CreateControl(parent, id, wxDefaultPosition, wxDefaultSize,
                        style, wxDefaultValidator, name) )
        return false;

    if ( !MSWCreateControl(STATUSCLASSNAME, wxString(),
                           wxDefaultPosition, wxDefaultSize) )
        return false;

    SetFieldsCount(1);

    // cache the DC instance used by DoUpdateStatusText:
    m_pDC = new wxClientDC(this);

    // we must refresh the frame size when the statusbar is created, because
    // its client area might change
    //
    // notice that we must post the event, not send it, as the frame doesn't
    // know that we're its status bar yet so laying it out right now wouldn't
    // work correctly, we need to wait until we return to the main loop
    PostSizeEventToParent();

    return true;
}
Beispiel #2
0
void wxHexDataPanel::Init(wxSharedPtr<wxHexData> data)
{
	m_startOffset = 0;
	m_data = data;
	m_count = data->GetLength();

	InvalidateBestSize();
	Refresh();
	PostSizeEventToParent();
}
Beispiel #3
0
wxStatusBar::~wxStatusBar()
{
    // we must refresh the frame size when the statusbar is deleted but the
    // frame is not - otherwise statusbar leaves a hole in the place it used to
    // occupy
    PostSizeEventToParent();

#if wxUSE_TOOLTIPS
    // delete existing tooltips
    for (size_t i=0; i<m_tooltips.size(); i++)
    {
        wxDELETE(m_tooltips[i]);
    }
#endif // wxUSE_TOOLTIPS

    wxDELETE(m_pDC);
}