1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-02-04 20:57:38 -05:00
|
|
|
// Name: wx/generic/statusbr.h
|
|
|
|
// Purpose: wxStatusBarGeneric class
|
1998-05-20 10:01:55 -04:00
|
|
|
// Author: Julian Smart
|
2000-02-04 20:57:38 -05:00
|
|
|
// Modified by: VZ at 05.02.00 to derive from wxStatusBarBase
|
1998-05-20 10:01:55 -04:00
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
2000-02-04 20:57:38 -05:00
|
|
|
// Licence: wxWindows license
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
#ifndef _WX_GENERIC_STATUSBR_H_
|
|
|
|
#define _WX_GENERIC_STATUSBR_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "statusbr.h"
|
|
|
|
#endif
|
|
|
|
|
1999-01-04 08:52:06 -05:00
|
|
|
#include "wx/pen.h"
|
|
|
|
#include "wx/font.h"
|
2000-02-05 13:18:28 -05:00
|
|
|
#include "wx/statusbr.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-04-14 07:55:35 -04:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
public:
|
2000-02-04 20:57:38 -05:00
|
|
|
wxStatusBarGeneric();
|
|
|
|
wxStatusBarGeneric(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
2000-02-04 20:57:38 -05:00
|
|
|
wxStatusBarGeneric(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
long style,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
~wxStatusBarGeneric();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
|
|
|
|
const wxSize& WXUNUSED(size) = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
|
|
|
return Create(parent, id, style, name);
|
|
|
|
}
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
2000-02-04 20:57:38 -05:00
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Create status line
|
2000-02-04 20:57:38 -05:00
|
|
|
virtual void SetFieldsCount(int number = 1,
|
|
|
|
const int *widths = (const int *) NULL);
|
|
|
|
int GetFieldsCount() const { return m_nFields; }
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Set status line text
|
1998-07-04 11:17:59 -04:00
|
|
|
virtual void SetStatusText(const wxString& text, int number = 0);
|
|
|
|
virtual wxString GetStatusText(int number = 0) const;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Set status line widths
|
1998-07-08 18:09:37 -04:00
|
|
|
virtual void SetStatusWidths(int n, const int widths_field[]);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Get the position and size of the field's internal bounding rectangle
|
1998-12-03 05:13:41 -05:00
|
|
|
virtual bool GetFieldRect(int i, wxRect& rect) const;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
// sets the minimal vertical size of the status bar
|
|
|
|
virtual void SetMinHeight(int height);
|
|
|
|
|
|
|
|
virtual int GetBorderX() const { return m_borderX; }
|
|
|
|
virtual int GetBorderY() const { return m_borderY; }
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Implementation
|
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
virtual void DrawFieldText(wxDC& dc, int i);
|
|
|
|
virtual void DrawField(wxDC& dc, int i);
|
|
|
|
|
|
|
|
void SetBorderX(int x);
|
|
|
|
void SetBorderY(int y);
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
1998-07-08 18:09:37 -04:00
|
|
|
virtual void InitColours();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Responds to colour changes
|
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
wxString * m_statusStrings;
|
|
|
|
int m_borderX;
|
|
|
|
int m_borderY;
|
|
|
|
wxFont m_defaultStatusBarFont;
|
|
|
|
wxPen m_mediumShadowPen;
|
|
|
|
wxPen m_hilightPen;
|
|
|
|
|
2000-02-04 20:57:38 -05:00
|
|
|
private:
|
1998-05-20 10:01:55 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
2000-02-04 20:57:38 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStatusBarGeneric)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2000-02-04 20:57:38 -05:00
|
|
|
// _WX_GENERIC_STATUSBR_H_
|