/usr/include/KWWidgets/vtkKWToolbar.h is in libkwwidgets1-dev 1.0.0~cvs20100930-8.
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 | /*=========================================================================
Module: $RCSfile: vtkKWToolbar.h,v $
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkKWToolbar - a frame that holds tool buttons
// .SECTION Description
// Simply a frame to hold a bunch of tools. It uses bindings to control
// the height of the frame.
// In the future we could use the object to move toolbars groups around.
#ifndef __vtkKWToolbar_h
#define __vtkKWToolbar_h
#include "vtkKWCompositeWidget.h"
class vtkKWFrame;
class vtkKWRadioButton;
class vtkKWToolbarInternals;
class KWWidgets_EXPORT vtkKWToolbar : public vtkKWCompositeWidget
{
public:
static vtkKWToolbar* New();
vtkTypeRevisionMacro(vtkKWToolbar, vtkKWCompositeWidget);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Returns the main frame of the toolbar.
// This should be used as the parent of all the widgets in the toolbar.
vtkGetObjectMacro(Frame, vtkKWFrame);
// Description:
// Determines whether the toolbar is resizable.
virtual void SetResizable(int);
vtkGetMacro(Resizable, int);
vtkBooleanMacro(Resizable, int);
// Description:
// Set/Get the name of the toolbar. This is optional but certainly
// useful if this toolbar is meant to be added to a vtkKWToolbarSet
vtkGetStringMacro(Name);
vtkSetStringMacro(Name);
// Description:
// Add a widget to the toolbar, insert a widget before 'location' (or at
// beginning of list if 'location' is not found)
virtual void AddWidget(vtkKWWidget* widget);
virtual void InsertWidget(vtkKWWidget* location, vtkKWWidget* widget);
// Description:
// Add a separator to the toolbar, insert a separator before 'location' (or at
// beginning of list if 'location' is not found)
virtual void AddSeparator();
virtual void InsertSeparator(vtkKWWidget* location);
// Description:
// Query widgets
virtual int HasWidget(vtkKWWidget* widget);
virtual int GetNumberOfWidgets();
// Description:
// Remove a widget (or all) from the toolbar
virtual void RemoveWidget(vtkKWWidget* widget);
virtual void RemoveAllWidgets();
// Description:
// Retrieve a widget given its name. The name is looked up in common Tk
// options like -label, -text, -image, -selectimage
virtual vtkKWWidget* GetWidget(const char *name);
// Description:
// Retrieve the nth- widget
virtual vtkKWWidget* GetNthWidget(int rank);
// Description:
// Set/Get widget visibility
virtual void SetWidgetVisibility(vtkKWWidget *widget, int val);
virtual int GetWidgetVisibility(vtkKWWidget *widget);
// Description:
// Create and add a specific type of widget.
// Note: for radiobutton, the variable_name should be the same for
// each radiobutton in the set of radiobuttons.
// for checkbutton, this is only optional (can be NULL)
vtkKWWidget* AddRadioButtonImage(int value,
const char *image_name,
const char *select_image_name,
const char *variable_name,
vtkObject *object,
const char *method,
const char *help = 0);
vtkKWWidget* AddCheckButtonImage(const char *image_name,
const char *select_image_name,
const char *variable_name,
vtkObject *object,
const char *method,
const char *help = 0);
// Description:
// Update/refresh the widgets layout/aspect
virtual void UpdateWidgets();
// Description:
// Update/refresh the toolbar layout/aspect (does not include the widgets)
virtual void Update();
// Description:
// Set/Get the aspect of the toolbar (flat or 3D GUI style, or unchanged)
// The static GlobalToolbarAspect member can be set so that all toolbars
// are rendered using the same aspect.
//BTX
enum
{
ToolbarAspectRelief = 0,
ToolbarAspectFlat = 1,
ToolbarAspectUnChanged
};
//ETX
vtkGetMacro(ToolbarAspect, int);
virtual void SetToolbarAspect(int);
virtual void SetToolbarAspectToFlat();
virtual void SetToolbarAspectToRelief();
virtual void SetToolbarAspectToUnChanged();
static int GetGlobalToolbarAspect();
static void SetGlobalToolbarAspect(int val);
static void SetGlobalToolbarAspectToFlat();
static void SetGlobalToolbarAspectToRelief();
static void SetGlobalToolbarAspectToUnChanged();
// Description:
// Set/Get the aspect of the widgets (flat, 3D GUI style, or unchanged)
// The static GlobalWidgetsAspect member can be set so that all widgets
// are rendered using the same aspect.
//BTX
enum
{
WidgetsAspectRelief = 0,
WidgetsAspectFlat = 1,
WidgetsAspectUnChanged
};
//ETX
vtkGetMacro(WidgetsAspect, int);
virtual void SetWidgetsAspect(int);
virtual void SetWidgetsAspectToFlat();
virtual void SetWidgetsAspectToRelief();
virtual void SetWidgetsAspectToUnChanged();
static int GetGlobalWidgetsAspect();
static void SetGlobalWidgetsAspect(int val);
static void SetGlobalWidgetsAspectToFlat();
static void SetGlobalWidgetsAspectToRelief();
static void SetGlobalWidgetsAspectToUnChanged();
// Description:
// Set/Get the padding that will be applied around each widget.
// (default to 0 on Windows, 1 otherwise).
virtual void SetWidgetsPadX(int);
vtkGetMacro(WidgetsPadX, int);
virtual void SetWidgetsPadY(int);
vtkGetMacro(WidgetsPadY, int);
// Description:
// Set/Get the padding that will be applied inside each widget.
// (default to 0 on Windows, 1 otherwise).
virtual void SetWidgetsInternalPadX(int);
vtkGetMacro(WidgetsInternalPadX, int);
virtual void SetWidgetsInternalPadY(int);
vtkGetMacro(WidgetsInternalPadY, int);
// Description:
// Set/Get the additional internal padding that will be applied around
// each widget when WidgetsAspect is On (default to 1).
virtual void SetWidgetsFlatAdditionalPadX(int);
vtkGetMacro(WidgetsFlatAdditionalPadX, int);
virtual void SetWidgetsFlatAdditionalPadY(int);
vtkGetMacro(WidgetsFlatAdditionalPadY, int);
// Description:
// Set/Get the additional internal padding that will be applied inside
// each widget when WidgetsAspect is On (default to 1).
virtual void SetWidgetsFlatAdditionalInternalPadX(int);
vtkGetMacro(WidgetsFlatAdditionalInternalPadX, int);
virtual void SetWidgetsFlatAdditionalInternalPadY(int);
vtkGetMacro(WidgetsFlatAdditionalInternalPadY, int);
// Description:
// Schedule the widget to resize itself, or resize it right away
virtual void ScheduleResize();
virtual void Resize();
// Description:
// Update the "enable" state of the object and its internal parts.
// Depending on different Ivars (Enabled, the application's
// Limited Edition Mode, etc.), the "enable" state of the object is updated
// and propagated to its internal parts subwidgets. This will, for example,
// enable disable parts of the widget UI, enable disable the visibility
// of 3D widgets, etc.
virtual void UpdateEnableState();
// Description:
// Some constants
//BTX
static const char *ToolbarAspectRegKey;
static const char *WidgetsAspectRegKey;
//ETX
protected:
vtkKWToolbar();
~vtkKWToolbar();
// Description:
// Create the widget.
virtual void CreateWidget();
int Expanding;
vtkKWFrame *Frame;
vtkKWFrame *Handle;
void ConstrainWidgetsLayout();
void UpdateWidgetsLayout();
void UpdateWidgetsAspect();
void UpdateToolbarFrameAspect();
//BTX
// PIMPL Encapsulation for STL containers
vtkKWToolbarInternals *Internals;
//ETX
int WidgetsPadX;
int WidgetsPadY;
int WidgetsFlatAdditionalPadX;
int WidgetsFlatAdditionalPadY;
int WidgetsInternalPadX;
int WidgetsInternalPadY;
int WidgetsFlatAdditionalInternalPadX;
int WidgetsFlatAdditionalInternalPadY;
int ToolbarAspect;
int WidgetsAspect;
int Resizable;
vtkKWRadioButton *DefaultOptionsWidget;
char *Name;
// Description:
// Bind/Unbind events.
virtual void Bind();
virtual void UnBind();
private:
vtkKWToolbar(const vtkKWToolbar&); // Not implemented
void operator=(const vtkKWToolbar&); // Not implemented
};
#endif
|