/usr/include/fox-1.6/FXRulerView.h is in libfox-1.6-dev 1.6.50-1.
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 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | /********************************************************************************
* *
* R u l e r V i e w W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXRulerView.h,v 1.15 2006/01/28 20:29:30 fox Exp $ *
********************************************************************************/
#ifndef FXRULERVIEW_H
#define FXRULERVIEW_H
#ifndef FXSCROLLAREA_H
#include "FXScrollArea.h"
#endif
namespace FX {
class FXRuler;
class FXFrame;
/**
* The Ruler View provides viewing of a document with rulers.
* It is intended to be subclassed in order to draw actual contents
* and provide editing behavior for the document.
* The ruler view itself simply manages the geometry of the document
* being edited, and coordinates the movement of the ruler displays
* as the document is being scrolled.
*/
class FXRulerView : public FXScrollArea {
FXDECLARE(FXRulerView)
protected:
FXRuler *hruler; // Horizontal ruler
FXRuler *vruler; // Vertical ruler
FXFrame *filler; // Corner thingy
FXColor docColor; // Color of document
FXString tip; // Tooltip text
FXString help; // Help text
protected:
FXRulerView();
virtual void moveContents(FXint x,FXint y);
virtual void drawBackground(FXDCWindow& dc);
virtual void drawContents(FXDCWindow& dc);
private:
FXRulerView(const FXRulerView&);
FXRulerView &operator=(const FXRulerView&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onMotion(FXObject*,FXSelector,void*);
long onCmdSetHelp(FXObject*,FXSelector,void*);
long onCmdGetHelp(FXObject*,FXSelector,void*);
long onCmdSetTip(FXObject*,FXSelector,void*);
long onCmdGetTip(FXObject*,FXSelector,void*);
long onQueryHelp(FXObject*,FXSelector,void*);
long onQueryTip(FXObject*,FXSelector,void*);
long onDocChanged(FXObject*,FXSelector,void*);
public:
enum {
ID_HRULER=FXScrollArea::ID_LAST,
ID_VRULER,
ID_LAST
};
public:
/// Construct a rulerview window
FXRulerView(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
/// Return viewport height
virtual FXint getViewportHeight();
/// Return viewport width
virtual FXint getViewportWidth();
/// Return content width
virtual FXint getContentWidth();
/// Return content height
virtual FXint getContentHeight();
/// Perform layout
virtual void layout();
/// Return a pointer to the horizontal ruler
FXRuler* horizontalRuler() const { return hruler; }
/// Return a pointer to the vertical ruler
FXRuler* verticalRuler() const { return vruler; }
/// Get document position X
FXint getDocumentX() const;
/// Get document position Y
FXint getDocumentY() const;
/// Set document width
void setDocumentWidth(FXint w,FXbool notify=FALSE);
/// Get document width
FXint getDocumentWidth() const;
/// Set document height
void setDocumentHeight(FXint h,FXbool notify=FALSE);
/// Get document height
FXint getDocumentHeight() const;
/// Set the current document color
void setDocumentColor(FXColor clr);
/// Get the current document color
FXColor getDocumentColor() const { return docColor; }
/// Change edge spacing around document
void setHEdgeSpacing(FXint es,FXbool notify=FALSE);
void setVEdgeSpacing(FXint es,FXbool notify=FALSE);
/// Return edge spacing
FXint getHEdgeSpacing() const;
FXint getVEdgeSpacing() const;
/// Change horizontal lower margin
void setHMarginLower(FXint marg,FXbool notify=FALSE);
/// Change horizontal upper margin
void setHMarginUpper(FXint marg,FXbool notify=FALSE);
/// Get horizontal lower margin
FXint getHMarginLower() const;
/// Get horizontal upper margin
FXint getHMarginUpper() const;
/// Change vertical lower margin
void setVMarginLower(FXint marg,FXbool notify=FALSE);
/// Change vertical upper margin
void setVMarginUpper(FXint marg,FXbool notify=FALSE);
/// Get vertical lower margin
FXint getVMarginLower() const;
/// Get vertical upper margin
FXint getVMarginUpper() const;
/// Set horizontal alignment; the default is RULER_ALIGN_NORMAL
void setHAlignment(FXuint align,FXbool notify=FALSE);
/// Return horizontal alignment
FXuint getHAlignment() const;
/// Set vertical alignment; the default is RULER_ALIGN_NORMAL
void setVAlignment(FXuint align,FXbool notify=FALSE);
/// Return vertical alignment
FXuint getVAlignment() const;
/// Set X arrow position, relative to document position
void setArrowPosX(FXint x);
/// Set X arrow position, relative to document position
void setArrowPosY(FXint y);
/// Get X arrow position in document
FXint getArrowPosX() const;
/// Get Y arrow position in document
FXint getArrowPosY() const;
/// Set the horizontal ruler font
void setHRulerFont(FXFont *fnt,FXbool notify=FALSE);
/// Get the horizontal ruler font
FXFont* getHRulerFont() const;
/// Set the vertical ruler font
void setVRulerFont(FXFont *fnt,FXbool notify=FALSE);
/// Get the vertical ruler font
FXFont* getVRulerFont() const;
/// Change document number placement
void setHNumberTicks(FXint ticks,FXbool notify=FALSE);
void setVNumberTicks(FXint ticks,FXbool notify=FALSE);
/// Return document number placement
FXint getHNumberTicks() const;
FXint getVNumberTicks() const;
/// Change document major ticks
void setHMajorTicks(FXint ticks,FXbool notify=FALSE);
void setVMajorTicks(FXint ticks,FXbool notify=FALSE);
/// Return document major ticks
FXint getHMajorTicks() const;
FXint getVMajorTicks() const;
/// Change document medium ticks
void setHMediumTicks(FXint ticks,FXbool notify=FALSE);
void setVMediumTicks(FXint ticks,FXbool notify=FALSE);
/// Return document medium ticks
FXint getHMediumTicks() const;
FXint getVMediumTicks() const;
/// Change document tiny ticks
void setHTinyTicks(FXint ticks,FXbool notify=FALSE);
void setVTinyTicks(FXint ticks,FXbool notify=FALSE);
/// Return document tiny ticks
FXint getHTinyTicks() const;
FXint getVTinyTicks() const;
/// Change pixel per tick spacing
void setHPixelPerTick(FXdouble space,FXbool notify=FALSE);
void setVPixelPerTick(FXdouble space,FXbool notify=FALSE);
/// Return pixel per tick spacing
FXdouble getHPixelPerTick() const;
FXdouble getVPixelPerTick() const;
/// Set ruler style
void setHRulerStyle(FXuint style);
void setVRulerStyle(FXuint style);
/// Get ruler style
FXuint getHRulerStyle() const;
FXuint getVRulerStyle() const;
/// Set the status line help text for the ruler view
void setHelpText(const FXString& text){ help=text; }
/// Get the status line help text for the ruler view
const FXString& getHelpText() const { return help; }
/// Set the tool tip message for the ruler view
void setTipText(const FXString& text){ tip=text; }
/// Get the tool tip message for the ruler view
const FXString& getTipText() const { return tip; }
/// Save list to a stream
virtual void save(FXStream& store) const;
/// Load list from a stream
virtual void load(FXStream& store);
/// Destroy
virtual ~FXRulerView();
};
}
#endif
|