1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-11 21:17:44 -05:00
|
|
|
// Name: wx/msw/tbar95.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxToolBar95 (Windows 95 toolbar) class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-06-13 18:54:04 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_TBAR95_H_
|
|
|
|
#define _WX_TBAR95_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "tbar95.h"
|
|
|
|
#endif
|
|
|
|
|
1999-06-13 18:54:04 -04:00
|
|
|
#if wxUSE_TOOLBAR
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
#include "wx/tbarbase.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
class WXDLLEXPORT wxToolBar95 : public wxToolBarBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-11-11 21:17:44 -05:00
|
|
|
public:
|
|
|
|
wxToolBar95() { Init(); }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
wxToolBar95(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxNO_BORDER | wxTB_HORIZONTAL,
|
|
|
|
const wxString& name = wxToolBarNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
~wxToolBar95();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxNO_BORDER | wxTB_HORIZONTAL,
|
|
|
|
const wxString& name = wxToolBarNameStr);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
// override base class virtuals
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual wxToolBarTool *AddTool(int toolIndex,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
const wxBitmap& pushedBitmap = wxNullBitmap,
|
|
|
|
bool toggle = FALSE,
|
|
|
|
long xPos = -1, long yPos = -1,
|
|
|
|
wxObject *clientData = NULL,
|
|
|
|
const wxString& helpString1 = wxEmptyString,
|
|
|
|
const wxString& helpString2 = wxEmptyString);
|
|
|
|
virtual bool AddControl(wxControl *control);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual void ClearTools();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual bool Realize() { return CreateTools(); };
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual void EnableTool(int toolIndex, bool enable);
|
|
|
|
virtual void ToggleTool(int toolIndex, bool toggle);
|
1998-11-28 08:38:40 -05:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual void SetToolBitmapSize(const wxSize& size);
|
|
|
|
virtual wxSize GetToolSize() const;
|
|
|
|
virtual wxSize GetMaxSize() const;
|
1998-08-13 06:19:16 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual bool GetToolState(int toolIndex) const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
virtual bool CreateTools();
|
|
|
|
virtual void SetRows(int nRows);
|
1998-07-27 05:47:57 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
// IMPLEMENTATION
|
|
|
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
|
|
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
void OnMouseEvent(wxMouseEvent& event);
|
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
protected:
|
1999-11-11 21:17:44 -05:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
WXHBITMAP m_hBitmap;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-11 21:17:44 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxToolBar95)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
1999-06-13 18:54:04 -04:00
|
|
|
#endif // wxUSE_TOOLBAR
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_TBAR95_H_
|