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$
|
2003-03-17 10:34:04 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
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
|
|
|
|
2002-08-31 11:29:13 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1998-05-20 14:01:55 +00:00
|
|
|
#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:
|
2002-09-04 13:16:46 +00:00
|
|
|
wxStatusBarGeneric() { Init(); }
|
2000-02-05 01:57:38 +00:00
|
|
|
wxStatusBarGeneric(wxWindow *parent,
|
2003-03-21 02:58:55 +00:00
|
|
|
wxWindowID winid,
|
2000-02-05 01:57:38 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
2002-09-04 13:16:46 +00:00
|
|
|
Init();
|
|
|
|
|
2003-03-21 02:58:55 +00:00
|
|
|
Create(parent, winid, pos, size, style, name);
|
1998-05-20 14:01:55 +00:00
|
|
|
}
|
2000-02-05 01:57:38 +00:00
|
|
|
wxStatusBarGeneric(wxWindow *parent,
|
2003-03-21 02:58:55 +00:00
|
|
|
wxWindowID winid,
|
2002-09-04 13:16:46 +00:00
|
|
|
long style,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
2000-02-05 01:57:38 +00:00
|
|
|
{
|
2002-09-04 13:16:46 +00:00
|
|
|
Init();
|
|
|
|
|
2003-03-21 02:58:55 +00:00
|
|
|
Create(parent, winid, style, name);
|
2000-02-05 01:57:38 +00:00
|
|
|
}
|
|
|
|
|
2002-09-04 13:16:46 +00:00
|
|
|
virtual ~wxStatusBarGeneric();
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2003-03-21 02:58:55 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID winid,
|
2000-02-05 01:57:38 +00:00
|
|
|
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
|
|
|
|
const wxSize& WXUNUSED(size) = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
2003-03-21 02:58:55 +00:00
|
|
|
return Create(parent, winid, style, name);
|
2000-02-05 01:57:38 +00:00
|
|
|
}
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2003-03-21 02:58:55 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID winid,
|
2001-05-02 19:48:15 +00:00
|
|
|
long style,
|
2000-02-05 01:57:38 +00:00
|
|
|
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);
|
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);
|
2002-12-04 14:11:26 +00:00
|
|
|
|
|
|
|
void OnLeftDown(wxMouseEvent& event);
|
|
|
|
void OnRightDown(wxMouseEvent& event);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
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:
|
2002-09-04 13:16:46 +00:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
2002-06-30 23:53:58 +00:00
|
|
|
wxArrayString m_statusStrings;
|
2002-09-04 13:16:46 +00:00
|
|
|
|
2002-12-04 14:11:26 +00:00
|
|
|
// the last known width of the client rect (used to rebuild cache)
|
|
|
|
int m_lastClientWidth;
|
2002-09-04 13:16:46 +00:00
|
|
|
// the widths of the status bar panes in pixels
|
|
|
|
wxArrayInt m_widthsAbs;
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
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_
|
2002-06-30 23:53:58 +00:00
|
|
|
|
|
|
|
// vi:sts=4:sw=4:et
|