/usr/include/wx-2.6/wx/deprecated/tbarsmpl.h is in wx2.6-headers 2.6.3.2.2-5ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | /////////////////////////////////////////////////////////////////////////////
// Name: wx/deprecated/tbarsmpl.h
// Purpose: wxToolBarSimple class
// Author: Julian Smart
// Modified by: VZ on 14.12.99 during wxToolBar classes reorganization
// Created: 01/02/97
// RCS-ID: $Id: tbarsmpl.h,v 1.3 2004/09/27 19:24:30 ABX Exp $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TBARSMPLH__
#define _WX_TBARSMPLH__
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "tbarsmpl.h"
#endif
#include "wx/tbarbase.h"
#include "wx/deprecated/setup.h"
#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_SIMPLE
class WXDLLEXPORT wxMemoryDC;
// ----------------------------------------------------------------------------
// wxToolBarSimple is a generic toolbar implementation in pure wxWidgets
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_DEPRECATED wxToolBarSimple : public wxToolBarBase
{
public:
// ctors and dtor
wxToolBarSimple() { Init(); }
wxToolBarSimple(wxWindow *parent,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr)
{
Init();
Create(parent, winid, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr);
virtual ~wxToolBarSimple();
// override/implement base class virtuals
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
virtual bool Realize();
virtual void SetRows(int nRows);
// implementation from now on
// --------------------------
// SCROLLING: this has to be copied from wxScrolledWindow since
// wxToolBarBase inherits from wxControl. This could have been put into
// wxToolBarSimple, but we might want any derived toolbar class to be
// scrollable.
// Number of pixels per user unit (0 or -1 for no scrollbar)
// Length of virtual canvas in user units
virtual void SetScrollbars(int horizontal, int vertical,
int x_length, int y_length,
int x_pos = 0, int y_pos = 0);
// Physically scroll the window
virtual void Scroll(int x_pos, int y_pos);
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
virtual void AdjustScrollbars();
// Prepare the DC by translating it according to the current scroll position
virtual void PrepareDC(wxDC& dc);
int GetScrollPageSize(int orient) const ;
void SetScrollPageSize(int orient, int pageSize);
// Get the view start
virtual void ViewStart(int *x, int *y) const;
// Actual size in pixels when scrolling is taken into account
virtual void GetVirtualSize(int *x, int *y) const;
int CalcScrollInc(wxScrollEvent& event);
// event handlers
void OnPaint(wxPaintEvent& event);
void OnSize(wxSizeEvent& event);
void OnMouseEvent(wxMouseEvent& event);
void OnKillFocus(wxFocusEvent& event);
void OnScroll(wxScrollEvent& event);
protected:
// common part of all ctors
void Init();
// implement base class pure virtuals
virtual wxToolBarToolBase *DoAddTool
(
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
wxItemKind kind,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *clientData = NULL,
wxCoord xPos = wxDefaultCoord,
wxCoord yPos = wxDefaultCoord
);
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int winid,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled,
wxItemKind kind,
wxObject *clientData,
const wxString& shortHelp,
const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control);
// helpers
void DrawTool(wxToolBarToolBase *tool);
virtual void DrawTool(wxDC& dc, wxToolBarToolBase *tool);
virtual void SpringUpButton(int index);
int m_currentRowsOrColumns;
int m_pressedTool, m_currentTool;
wxCoord m_lastX, m_lastY;
wxCoord m_maxWidth, m_maxHeight;
wxCoord m_xPos, m_yPos;
// scrolling data
int m_xScrollPixelsPerLine;
int m_yScrollPixelsPerLine;
bool m_xScrollingEnabled;
bool m_yScrollingEnabled;
int m_xScrollPosition;
int m_yScrollPosition;
int m_xScrollLines;
int m_yScrollLines;
int m_xScrollLinesPerPage;
int m_yScrollLinesPerPage;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarSimple)
};
#endif // wxUSE_TOOLBAR_SIMPLE
#endif
// _WX_TBARSMPLH__
|