1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-02-05 01:57:38 +00:00
|
|
|
// Name: wx/generic/statusbr.h
|
|
|
|
// Purpose: wxStatusBarGeneric class
|
1998-05-20 14:01:55 +00:00
|
|
|
// Author: Julian Smart
|
2000-02-05 01:57:38 +00:00
|
|
|
// Modified by: VZ at 05.02.00 to derive from wxStatusBarBase
|
1998-05-20 14:01:55 +00:00
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
2000-02-05 01:57:38 +00:00
|
|
|
// Licence: wxWindows license
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-02-05 01:57:38 +00:00
|
|
|
#ifndef _WX_GENERIC_STATUSBR_H_
|
|
|
|
#define _WX_GENERIC_STATUSBR_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "statusbr.h"
|
|
|
|
#endif
|
|
|
|
|
1999-01-04 13:52:06 +00:00
|
|
|
#include "wx/pen.h"
|
|
|
|
#include "wx/font.h"
|
2000-02-05 18:18:28 +00:00
|
|
|
#include "wx/statusbr.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-04-14 11:55:35 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-02-05 01:57:38 +00:00
|
|
|
class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
|
|
|
public:
|
2000-02-05 01:57:38 +00: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 14:01:55 +00:00
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
2000-02-05 01:57:38 +00:00
|
|
|
wxStatusBarGeneric(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
long style,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
~wxStatusBarGeneric();
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-02-05 01:57:38 +00: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 14:01:55 +00:00
|
|
|
|
1998-07-04 15:17:59 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
2000-02-05 01:57:38 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
// Create status line
|
2000-02-05 01:57:38 +00:00
|
|
|
virtual void SetFieldsCount(int number = 1,
|
|
|
|
const int *widths = (const int *) NULL);
|
|
|
|
int GetFieldsCount() const { return m_nFields; }
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
// Set status line text
|
1998-07-04 15:17:59 +00:00
|
|
|
virtual void SetStatusText(const wxString& text, int number = 0);
|
|
|
|
virtual wxString GetStatusText(int number = 0) const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
// Set status line widths
|
1998-07-08 22:09:37 +00:00
|
|
|
virtual void SetStatusWidths(int n, const int widths_field[]);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
// Get the position and size of the field's internal bounding rectangle
|
1998-12-03 10:13:41 +00:00
|
|
|
virtual bool GetFieldRect(int i, wxRect& rect) const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-02-05 01:57:38 +00: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 14:01:55 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Implementation
|
|
|
|
|
2000-02-05 01:57:38 +00: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 14:01:55 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
1998-07-08 22:09:37 +00:00
|
|
|
virtual void InitColours();
|
1998-05-20 14:01:55 +00: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-05 01:57:38 +00:00
|
|
|
private:
|
1998-05-20 14:01:55 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2000-02-05 01:57:38 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStatusBarGeneric)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2000-02-05 01:57:38 +00:00
|
|
|
// _WX_GENERIC_STATUSBR_H_
|