1998-05-21 15:02:02 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tbarsmpl.h
|
|
|
|
// Purpose: wxToolBarSimple class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_TBARSMPLH__
|
|
|
|
#define _WX_TBARSMPLH__
|
1998-05-21 15:02:02 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "tbarsmpl.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#if wxUSE_TOOLBAR
|
1998-05-21 15:02:02 +00:00
|
|
|
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/tbarbase.h"
|
|
|
|
|
1998-09-17 16:57:01 +00:00
|
|
|
class WXDLLEXPORT wxMemoryDC;
|
|
|
|
|
1999-04-14 11:56:36 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
|
1998-05-21 15:02:02 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
|
|
|
|
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
|
|
|
|
|
|
|
|
// XView can't cope properly with panels that behave like canvases
|
|
|
|
// (e.g. no scrollbars in panels)
|
|
|
|
class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxToolBarSimple)
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxToolBarSimple(void);
|
1998-07-04 15:17:59 +00:00
|
|
|
inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
1998-07-27 09:47:57 +00:00
|
|
|
long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
|
|
|
const wxString& name = wxToolBarNameStr)
|
1998-05-21 15:02:02 +00:00
|
|
|
{
|
1998-07-27 09:47:57 +00:00
|
|
|
Create(parent, id, pos, size, style, name);
|
1998-05-21 15:02:02 +00:00
|
|
|
}
|
|
|
|
~wxToolBarSimple(void);
|
|
|
|
|
1998-07-04 15:17:59 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
1998-07-27 09:47:57 +00:00
|
|
|
long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr);
|
1998-05-21 15:02:02 +00:00
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
void OnMouseEvent(wxMouseEvent& event);
|
|
|
|
void OnKillFocus(wxFocusEvent& event);
|
|
|
|
|
|
|
|
// Handle wxToolBar events
|
|
|
|
|
|
|
|
virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool);
|
1998-07-04 15:17:59 +00:00
|
|
|
virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
|
1998-05-21 15:02:02 +00:00
|
|
|
|
1998-07-04 15:17:59 +00:00
|
|
|
virtual void SpringUpButton(int index);
|
1998-05-21 15:02:02 +00:00
|
|
|
|
1999-05-09 22:17:03 +00:00
|
|
|
virtual void LayoutTools();
|
1998-07-27 09:47:57 +00:00
|
|
|
|
|
|
|
// The post-tool-addition call
|
1999-05-09 22:17:03 +00:00
|
|
|
virtual bool Realize() { LayoutTools(); return TRUE; };
|
1998-07-27 09:47:57 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
int m_currentRowsOrColumns;
|
|
|
|
long m_lastX, m_lastY;
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
1998-05-21 15:02:02 +00:00
|
|
|
};
|
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#endif // wxUSE_TOOLBAR
|
1998-05-21 15:02:02 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_TBARSMPLH__
|
1998-05-21 15:02:02 +00:00
|
|
|
|