Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Manager class. More...
#include <ilviews/manager/manager.h>
Public Member Functions | |
IlvManager (IlvDisplay *display, int layers=2, IlBoolean useacc=IlTrue, IlUShort maxInList=30, IlUShort maxInNode=30) | |
Constructor. | |
virtual | ~IlvManager () |
Destructor. | |
IlvMgrView * | getView (const IlvView *v) const |
Returns the IlvMrgView of a manager view. | |
Optimizing Drawing Tasks | |
void | abortReDraws () |
Resets the invalidated regions. | |
void | addAfter (const IlvGraphic *g) |
Resets the invalidated regions. | |
void | addBefore (const IlvGraphic *g) |
Resets the invalidated regions. | |
void | disableRedrawTask () |
Deactivates the lazy redraw mechanism. | |
virtual void | flushRedraw () |
Performs the actual redraw of invalid regions. | |
IlvReDrawMode | getReDrawMode () const |
Returns the redraw mode of the manager. | |
void | initReDraws () |
Initializes the manager so that calls to IlvManager::invalidateRegion can begin. | |
void | invalidateRegion (const IlvRegionUpdater &updater, const IlvGraphic *g=0) |
Updates the invalidated region. | |
void | invalidateRegion (const IlvView *view, const IlvRect &rect) |
Invalidates a rectangle in a manager view. | |
void | invalidateRegion (const IlvRect &rect) |
Invalidates a rectangle. | |
void | invalidateRegion (const IlvGraphic *object) |
Invalidates the bounding box of a graphic object. | |
IlBoolean | isInvalidating () const |
Indicates whether the manager is in a phase of invalidating regions. | |
void | reDrawViews (IlBoolean erase=IlTrue) |
Draws the invalidated regions. | |
void | setReDrawMode (IlvReDrawMode reDrawMode) |
Sets the redraw mode of the manager. | |
Managing Accelerators | |
void | addAccelerator (IlvManagerAccelerator *) |
Adds an accelerator to the manager. | |
void | addAccelerator (IlvManagerAcceleratorAction f, IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0, IlAny userArg=0, IlUShort optModifiers=0) |
Adds an accelerator to the manager. | |
IlvManagerAccelerator * | getAccelerator (IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0) |
Adds an accelerator to the manager. | |
IlBoolean | getAccelerator (IlvManagerAcceleratorAction *f, IlAny *userArg, IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0) |
Gets an accelerator action matching an event description. | |
IlvManagerEventHook * | getEventHooks () const |
Adds an accelerator to the manager. | |
IlBoolean | handleEventHooks (IlvEvent &event, IlvView *view) |
Adds an accelerator to the manager. | |
virtual void | handleInput (IlvEvent &event, IlvView *view) |
Adds an accelerator to the manager. | |
IlBoolean | installEventHook (const IlvManagerEventHook *hook) |
Installs an event hook on the manager. | |
void | removeAccelerator (IlvManagerAccelerator *) |
Adds an accelerator to the manager. | |
void | removeAccelerator (IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0) |
Removes the accelerator matching the event description. | |
void | removeAccelerators () |
Removes all accelerators. | |
IlvManagerEventHook * | removeEventHook (const IlvManagerEventHook *hook) |
Removes and returns an event hook installed on the manager. | |
virtual IlBoolean | shortCut (IlvEvent &event, IlvView *view) |
Dispatches an incoming event to manager accelerators. | |
Managing Undo | |
virtual void | addCommand (IlvCommand *command) |
Appends a new command to the command queue. | |
void | forgetUndo () |
Resets the undo command queue. | |
IlvCommandHistory * | getCommandHistory () const |
Returns the object which handles the stack of commands. | |
IlBoolean | isUndoEnabled () const |
Indicates whether the manager lets you undo commands. | |
virtual void | reDo (IlBoolean unused) |
Executes again the last canceled command. | |
virtual void | repeat () |
Executes again the last command. | |
void | setUndoEnabled (IlBoolean enable) |
Enables or disables the possibility of undoing commands in the manager. | |
virtual void | unDo () |
Cancels the most recent command, leaving manager objects as they were before the previous command was applied. | |
Managing Object Layers | |
int | addLayer (IlvManagerLayer *layer, int position=-1) |
Adds a layer to the manager. | |
void | addLayer (int position=-1, IlUShort maxInList=30, IlUShort maxInNode=30) |
Adds a layer to the manager. | |
int | getLayer (const IlvGraphic *object) const |
Returns the manager layer containing a given graphic object. | |
int | getLayerIndex (const IlvManagerLayer *) const |
Returns the index of a manager layer instance. | |
IlvManagerLayer * | getManagerLayer (int i) const |
Returns the IlvManagerLayer instance from its index. | |
IlvManagerLayer * | getManagerLayer (const IlvGraphic *object) const |
Returns the IlvManagerLayer instance of a graphic object. | |
IlvManagerLayer * | getManagerLayer (const char *layerName) const |
Adds a layer to the manager. | |
int | getNumLayers () const |
Returns the number of manager layers. | |
IlBoolean | isSelectable (int layer) const |
Indicates if a manager layer allows the selection of its graphic objects. | |
IlBoolean | isVisible (const IlvView *view, int layer) const |
Indicates the visibility of a layer in a manager view. | |
IlBoolean | isVisible (int layer) const |
Indicates whether a layer is considered visible by the manager. | |
virtual void | moveLayer (int from, int to, IlBoolean redraw=IlTrue) |
Adds a layer to the manager. | |
virtual void | pop (IlvGraphic *object, IlBoolean redraw=IlTrue) |
Moves a graphic object higher in the drawing stacking order. | |
virtual void | push (IlvGraphic *object, IlBoolean redraw=IlTrue) |
Moves a graphic object lower in the drawing stacking order. | |
IlvManagerLayer * | removeLayer (IlvManagerLayer *) |
Adds a layer to the manager. | |
void | removeLayer (int layer=-1) |
Removes a layer from the manager. | |
IlvManagerLayer * | replaceLayer (IlvManagerLayer *newLayer, int index) |
Adds a layer to the manager. | |
void | setLayer (IlvGraphic *object, int layer, IlBoolean redraw=IlTrue) |
Moves a graphic object to a given manager layer. | |
IlvManagerLayerFactory * | setManagerLayerFactory (IlvManagerLayerFactory *) |
Adds a layer to the manager. | |
void | setNumLayers (int numLayers) |
Sets the number of manager layers. | |
void | setSelectable (int layer, IlBoolean selectable) |
Enables or disables the selection of graphic objects in a manager layer. | |
void | setVisible (const IlvView *view, int layer, IlBoolean visible) |
Sets the visibility of a layer for a manager view. | |
void | setVisible (int layer, IlBoolean visible) |
Sets the visibility of a layer for the manager. | |
void | swapLayers (int layer1, int layer2, IlBoolean redraw=IlTrue) |
Swaps the contents of two manager layers. | |
Managing SmartSets | |
virtual IlBoolean | addSmartSet (IlvSmartSet *set, IlBoolean redraw=IlTrue) |
Adds a smartset to the manager. | |
virtual IlvSmartSet * | duplicateSmartSet (IlvSmartSet *set, IlvPos dx=0, IlvPos dy=0) |
Makes a copy of a smartset. | |
IlvSmartSet * | getSmartSet (const char *name) const |
Gets a smartset by its name. | |
virtual IlBoolean | removeSmartSet (IlvSmartSet *set) |
Removes a smartset from the manager. | |
Object Alignment | |
virtual void | align (IlvPosition alignment, IlBoolean redraw=IlTrue) |
Aligns the selected objects. | |
virtual void | makeColumn (IlvDim spacing=0, IlBoolean redraw=IlTrue) |
Arranges the selected graphic objects in a column. | |
virtual void | makeRow (IlvDim spacing=0, IlBoolean redraw=IlTrue) |
Arranges the selected graphic objects in a row. | |
virtual void | sameHeight (IlBoolean redraw=IlTrue) |
Resizes the selected graphic objects to the same height. | |
virtual void | sameWidth (IlBoolean redraw=IlTrue) |
Resizes the selected graphic objects to the same width. | |
General Purpose Methods | |
IlvGraphic *const * | allContains (int layer, const IlvPoint &p, const IlvView *view, IlUInt &count) const |
Returns all graphic objects containing a given point in a layer. | |
IlvGraphic *const * | allContains (const IlvPoint &p, const IlvView *view, IlUInt &count) const |
Returns all graphic objects containing a given point. | |
IlvGraphic *const * | allInside (int layer, IlUInt &count, const IlvRect &rect, const IlvTransformer *t=0) const |
Returns all graphic objects of a layer located in a rectangle. | |
IlvGraphic *const * | allInside (IlUInt &count, const IlvRect &rect, const IlvTransformer *t=0) const |
Returns all graphic objects located in a rectangle. | |
IlvGraphic *const * | allIntersects (int layer, IlUInt &count, const IlvRect &rect, const IlvTransformer *t=0) const |
Returns all graphic objects of a layer intersecting a rectangle. | |
IlvGraphic *const * | allIntersects (IlUInt &count, const IlvRect &rect, const IlvTransformer *t=0) const |
Returns all graphic objects intersecting a rectangle. | |
void | computeBBox (IlvRect &bbox, const IlvView *view) const |
Computes the bounding box of all the objects. | |
void | computeBBox (IlvRect &bbox, const IlvTransformer *t=0) const |
Computes the bounding box of all the objects stored in all the visible layers. | |
virtual void | contentsChanged () |
Called automatically by the manager each time objects are created, removed, moved, or resized in the manager. | |
IlvGraphic * | filteredLastContains (int layer, const IlvPoint &p, const IlvView *view, const IlvGraphicFilter &f) const |
Returns the graphic object containing a given point in a layer. | |
IlvGraphic * | filteredLastContains (const IlvPoint &p, const IlvView *view, const IlvGraphicFilter &f) const |
Returns the graphic object containing a given point. | |
IlvGraphic * | firstIntersects (int layer, const IlvRegion &tr, const IlvTransformer *t) const |
Returns the first object of a layer intersecting a region. | |
IlvGraphic * | firstIntersects (const IlvRect &r) |
Returns all graphic objects containing a given point in a layer. | |
IlvGraphic * | firstIntersects (const IlvRegion &tr, const IlvTransformer *t) const |
Returns the first object intersecting a region. | |
IlUInt | getCardinal (int layer) const |
Returns the number of graphic objects in a layer. | |
IlUInt | getCardinal () const |
Returns the number of graphic objects. | |
IlvDisplay * | getDisplay () const |
Returns the display. | |
const char * | getName () const |
Returns the name of the manager. | |
virtual IlvGraphic *const * | getObjects (int layer, IlUInt &count) const |
Returns the graphic objects stored in a manager layer. | |
virtual IlvGraphic *const * | getObjects (IlUInt &count) const |
Returns the graphic objects stored in the manager. | |
IlvPalette * | getPalette () const |
Returns the manager palette. | |
IlBoolean | isModified () const |
Indicates whether the manager contents have been modified. | |
IlvGraphic * | lastContains (int layer, const IlvPoint &p, const IlvView *view) const |
Returns the graphic object containing a given point in a layer. | |
virtual IlvGraphic * | lastContains (const IlvPoint &p, const IlvView *view) const |
Returns the graphic object containing a given point. | |
IlvGraphic *const * | objects (IlUInt &count) const |
Returns all graphic objects containing a given point in a layer. | |
void | setCleanFunction (IlvApplyObject func) |
Sets a function to be called when an object is removed from the manager. | |
void | setModified (IlBoolean value) |
Sets the modification status of the manager. | |
virtual void | setName (const char *name) |
Sets the name of the manager. | |
Applying Functions to Located Objects | |
void | applyInside (IlvApplyObject func, IlAny arg, const IlvRect &rect, const IlvTransformer *t=0, IlBoolean redraw=IlTrue) |
Applies a user function to graphic objects located in a rectangle. | |
void | applyInside (int layer, IlvApplyObject func, IlAny arg, const IlvRect &rect, const IlvTransformer *t=0, IlBoolean redraw=IlTrue) |
Applies a user function to objects of a layer located in a rectangle. | |
void | applyIntersects (IlvApplyObject func, IlAny arg, const IlvRect &rect, const IlvTransformer *t=0, IlBoolean redraw=IlTrue) |
Applies a user function to graphic objects intersecting a rectangle. | |
void | applyIntersects (int layer, IlvApplyObject func, IlAny arg, const IlvRect &rect, const IlvTransformer *t=0, IlBoolean redraw=IlTrue) |
Applies a user function to objects of a layer intersecting a rectangle. | |
Applying Functions to Objects | |
virtual void | applyToObject (IlvGraphic *object, IlvApplyObject func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to a graphic object. | |
virtual void | applyToObjects (int layer, IlvApplyFunction func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to the graphic objects of a manager layer. | |
virtual void | applyToObjects (int layer, IlvApplyObject func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to all graphic objects of a manager layer. | |
virtual void | applyToObjects (IlUInt count, IlvGraphic *const *objects, IlvApplyFunction func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to a set of graphic objects. | |
virtual void | applyToObjects (IlUInt count, IlvGraphic *const *objects, IlvApplyObject func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to a set of graphic objects. | |
IlBoolean | isInApply () const |
Indicates if an applyTo...() method is being executed. | |
Managing Selections | |
void | applyToSelections (IlvApplyObject func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to the selected graphic objects. | |
virtual void | deleteSelections (IlBoolean redraw=IlTrue) |
Removes the selected objects from the manager and deletes them if undo is disabled. | |
virtual void | deSelectAll (IlBoolean redraw=IlTrue) |
Deselects the selected graphic objects. | |
virtual void | duplicate (IlvPos dx=0, IlvPos dy=0) |
Duplicates the selected graphic objects. | |
IlvDrawSelection * | getSelection (const IlvGraphic *object) const |
Returns the selection object of a graphic object. | |
IlvManagerSelectionHook * | getSelectionHooks () const |
Applies a user function to the selected graphic objects. | |
IlvGraphic *const * | getSelections (IlUInt &count) const |
Returns the selected graphic objects. | |
IlBoolean | installSelectionHook (const IlvManagerSelectionHook *hook) |
Sets a selection hook on the manager. | |
IlBoolean | isSelected (const IlvGraphic *obj) const |
Indicates if a graphic object is selected. | |
IlUInt | numberOfSelections () const |
Returns the number of selected graphic objects. | |
IlvManagerSelectionHook * | removeSelectionHook (const IlvManagerSelectionHook *hook) |
Removes the selection hook from the manager, if it is installed. | |
virtual void | selectAll (IlBoolean redraw=IlTrue) |
Selects all the objects of the manager. | |
IlvMakeSelection | setMakeSelection (IlvMakeSelection func) |
Sets the function that creates a selection object for a graphic object. | |
virtual void | setSelected (IlvGraphic *object, IlBoolean selected=IlTrue, IlBoolean redraw=IlTrue) |
Selects or deselects a graphic object. | |
IlvGraphic *const * | sortObjects (IlvGraphic *const *objs, IlUInt count) const |
Sorts a set of object. | |
Tag Management | |
void | applyToTaggedObjects (const IlSymbol *tag, IlvApplyObject func, IlAny arg, IlBoolean redraw=IlTrue) |
Applies a user function to all graphic objects associated with a given tag. | |
IlvGraphic *const * | getTaggedObjects (const IlSymbol *tag, IlUInt &count) const |
Returns the graphic objects associated with a given tag. | |
void | removeTaggedObjects (const IlSymbol *tag, IlBoolean redraw=IlTrue) |
Removes graphic objects associated with a given tag. | |
void | setTaggedObjectsSelected (const IlSymbol *tag, IlBoolean selected=IlTrue, IlBoolean redraw=IlTrue) |
Selects or deselects the graphic objects associated with a given tag. | |
Draw, Redraw and Group Objects | |
void | bufferedDraw (IlvView *view, const IlvGraphic *object) const |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
void | bufferedDraw (IlvView *view, const IlvRegion ®ion) const |
Redraws a region of a manager view by means of a temporary pixmap. | |
void | bufferedDraw (IlvView *view, const IlvRect &rect) const |
Redraws a rectangular area of a manager view by means of a temporary pixmap. | |
void | draw () const |
Draws the contents of the manager. | |
void | draw (int layer, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) const |
Draws the contents of a manager layer in a destination port. | |
void | draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) const |
Draws the contents of a manager in a destination port. | |
virtual void | draw (IlvView *view, IlBoolean erase, const IlvRegion *clip=0) const |
Draws the graphic objects of the manager in a manager view. | |
virtual void | eraseRegion (IlvView *view, const IlvRegion ®ion) const |
Erases a region of a manager view. | |
IlAny | getClientData () const |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
virtual IlvGraphicSet * | group (IlUInt count, IlvGraphic *const *objects) |
Groups several graphic objects. | |
void | installDrawHook (IlvManagerDrawHook *hook) |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
void | reDraw (IlUInt count, const IlvGraphic *const *objects, IlBoolean erase=IlTrue) const |
Draws a set of graphic objects in all manager views. | |
void | reDraw (const IlvGraphic *object, IlBoolean erase=IlTrue) const |
Draws a graphic object in all manager views. | |
void | reDraw () const |
Erases all manager views and draws the contents of the manager. | |
void | removeDrawHook (IlvManagerDrawHook *hook) |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
void | setClientData (IlAny data) |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
virtual void | unGroup (IlvGraphic *object, IlBoolean undoCommand=IlTrue) |
Ungroups the graphic objects of a graphic set. | |
virtual void | viewResized (const IlvView *, IlvRect &) |
Draws a graphic object in a manager view by means of a temporary pixmap. | |
Callback Management | |
void | callCallback (IlvGraphic *object) |
Registers a callback and its name. | |
virtual void | callCallbacks (const IlSymbol *callbackName, IlvGraphic *) |
Registers a callback and its name. | |
IlvGraphicCallback | getCallback (const IlSymbol *cbName) const |
Registers a callback and its name. | |
const IlAList * | getCallbackNames () const |
Registers a callback and its name. | |
void | registerCallback (const char *callbackName, IlvGraphicCallback callback) |
Registers a callback and its name. | |
void | removeCallback (const char *callbackName) |
Registers a callback and its name. | |
void | unregisterCallback (const char *callbackName) |
Removes the callback function registered with the specified name from the callback list. | |
Cutting and Pasting | |
virtual char * | copy (IlUInt &count) |
Saves all the selected graphic objects in a string. | |
void | copyToClipboard () |
Saves the selected graphic objects in the clipboard. | |
virtual char * | cut (IlUInt &count) |
Saves the selected graphic objects in a string and then deletes them. | |
void | cutToClipboard () |
Saves the selected graphic objects in the clipboard and deletes them. | |
virtual void | paste (const IlvView *view, const char *str, IlvPoint &location) |
Reads graphic objects from a string. | |
void | pasteFromClipboard (const IlvView *view, IlvPoint &location) |
Reads graphic objects from the clipboard and adds them to the manager. | |
Input and Output Methods | |
virtual IlvManagerInputFile * | createInputFile (ILVSTDPREF istream &stream) |
Creates an IlvManagerInputFile from an input stream. | |
virtual IlvManagerInputFile * | createInputFile (istream &stream) |
Creates an IlvManagerInputFile from an input stream. | |
virtual IlvManagerOutputFile * | createOutputFile (ILVSTDPREF ostream &stream) const |
Creates an IlvManagerInputFile from an input stream. | |
virtual IlvManagerOutputFile * | createOutputFile (ostream &stream) const |
Creates an IlvManagerOutputFile from an output stream. | |
virtual void | read (const char *filename) |
Loads an Rogue Wave Views data file. | |
virtual void | read (ILVSTDPREF istream &stream) |
Creates an IlvManagerInputFile from an input stream. | |
virtual void | read (istream &stream) |
Reads a set of graphic objects from the specified input stream. | |
virtual void | save (ILVSTDPREF ostream &stream) const |
Creates an IlvManagerInputFile from an input stream. | |
virtual void | save (ostream &stream) const |
Saves all the graphic objects in an output stream. | |
Associating an Interactor with an Object or View | |
virtual IlBoolean | dispatchToObjects (IlvEvent &, IlvView *) |
Dispatches an event to the appropriate graphic objects. | |
virtual IlBoolean | gadgetShortCut (IlvEvent &) |
Dispatches an event to the appropriate graphic objects. | |
IlvManagerViewInteractor * | getInteractor (const IlvView *view) const |
Returns the view interactor associated with a manager view. | |
IlvManagerObjectInteractor * | getObjectInteractor (const IlvGraphic *object) const |
The object interactor associated with a graphic object. | |
void | pushInteractor (IlvManagerViewInteractor *e) |
Dispatches an event to the appropriate graphic objects. | |
void | removeInteractor (const IlvView *view) |
Removes the view interactor from a manager view. | |
void | setInteractor (IlvManagerViewInteractor *i, const IlvView *view=0) |
Sets a view interactor on a manager view. | |
IlBoolean | setObjectInteractor (IlvGraphic *object, IlvManagerObjectInteractor *i) |
Sets an object interactor on a graphic object. | |
Object Creation Interactors | |
IlvPalette * | getCreatorPalette () const |
Gets the default palette used to create graphic objects interactively. | |
int | getInsertionLayer () const |
Gets the default layer used to store the graphic objects created interactively. | |
void | setCreatorPalette (IlvPalette *palette) |
Sets the default palette used to create new graphic objects interactively. | |
void | setInsertionLayer (int layer=-1) |
Sets the layer where new objects created interactively using the predefined interactors will be stored. | |
Managing Double Buffering | |
IlvBitmap * | getDoubleBufferingBitmap (const IlvView *) const |
Indicates whether double buffering is used for a manager view. | |
IlvManagerDblBufferHandler * | getDoubleBufferingHandler () const |
Indicates whether double buffering is used for a manager view. | |
IlBoolean | isDoubleBuffering (const IlvView *view) const |
Indicates whether double buffering is used for a manager view. | |
virtual void | setBackground (IlvView *view, IlvColor *color, IlvBitmap *bitmap=0) |
Sets the background of a manager view. | |
IlBoolean | setDoubleBuffering (const IlvView *view, IlBoolean useDB, IlBoolean tmp=IlFalse) |
Enables or disables double buffering for a manager view. | |
void | setDoubleBufferingColor (IlvColor *color) |
Indicates whether double buffering is used for a manager view. | |
void | setDoubleBufferingHandler (IlvManagerDblBufferHandler *) |
Indicates whether double buffering is used for a manager view. | |
Grid Management | |
IlvManagerGrid * | getGrid (const IlvView *view) const |
Returns the manager grid associated with a manager view. | |
void | setGrid (IlvView *const view, IlvManagerGrid *grid) |
Sets a manager grid on a manager view. | |
void | snapToGrid (const IlvView *view, IlvPoint &p) const |
Moves a given point to the closest grid point on a manager view. | |
IlBoolean | transformThroughGrid (const IlvView *view, IlvPoint &p) const |
Transforms and moves a given point on a manager view to the closest grid point in the manager coordinate system. | |
Managing View Hooks | |
IlvLink * | getViewHookList (const IlvView *view) const |
Gets the view hooks of a manager view. | |
IlvManagerViewHook *const * | getViewHooks (const IlvView *view, IlUInt &count) const |
Gets the view hooks of a manager view. | |
void | installViewHook (const IlvManagerViewHook *hook) |
Adds a view hook to the manager. | |
void | removeViewHook (const IlvManagerViewHook *hook) |
Removes a view hook from the manager. | |
Manipulating Objects | |
void | moveObject (IlvGraphic *object, IlvPos x, IlvPos y, IlBoolean redraw=IlTrue) |
Moves a graphic object. | |
virtual void | reshapeObject (IlvGraphic *object, const IlvRect &bbox, IlBoolean redraw=IlTrue) |
Resizes a graphic object to fit in a rectangle. | |
virtual void | translateObject (IlvGraphic *object, IlvPos dx, IlvPos dy, IlBoolean redraw=IlTrue) |
Translates a graphic object. | |
Object Properties | |
| |
virtual void | addObject (const char *name, IlvGraphic *object, IlBoolean redraw=IlTrue, int layer=-1) |
Adds a graphic object to a manager, and then names the object. | |
virtual void | addObject (IlvGraphic *object, IlBoolean redraw=IlTrue, int layer=-1) |
Adds an object to the manager. | |
virtual void | deleteAll (int layer, IlBoolean destroy, IlBoolean redraw) |
Removes all the objects stored in a specified layer of the manager. | |
virtual void | deleteAll (IlBoolean destroy, IlBoolean redraw) |
Removes all the graphic objects from the manager. | |
IlvGraphic * | firstIntersects (int layer, const IlvRect &r) |
Adds a graphic object to a manager, and then names the object. | |
IlvEditableFilter * | getEditableFilter () const |
Adds a graphic object to a manager, and then names the object. | |
IlvGraphic * | getObject (const char *name) const |
Gets a graphic object by its name. | |
const char * | getObjectName (const IlvGraphic *object) const |
Returns the name of a graphic object. | |
IlvGraphic *const * | getPersistentObjects (IlUInt &count) const |
Adds a graphic object to a manager, and then names the object. | |
virtual void | installAccelerators () |
Adds a graphic object to a manager, and then names the object. | |
IlBoolean | isASelection (const IlvGraphic *object) const |
Indicates if a graphic object is a selection object. | |
IlBoolean | isEditable (const IlvGraphic *object, const IlvView *) const |
Adds a graphic object to a manager, and then names the object. | |
IlBoolean | isEditable (const IlvGraphic *object) const |
Indicates whether a graphic object can be edited. | |
IlBoolean | isManaged (const IlvGraphic *object) const |
Indicates whether a graphic object is stored by the manager. | |
IlBoolean | isMoveable (const IlvGraphic *object) const |
Indicates if a graphic object can be moved. | |
IlBoolean | isResizeable (const IlvGraphic *object) const |
Indicates if a graphic object can be resized. | |
virtual IlBoolean | isSelectable (const IlvGraphic *obj) const |
Indicates if a graphic object can be selected. | |
IlBoolean | isVisible (const IlvGraphic *g, IlvView *view) const |
Indicates whether a graphic object is visible in a manager view. | |
IlBoolean | isVisible (const IlvGraphic *object) const |
Indicates whether a graphic object is visible. | |
IlvGraphic *const * | objects (int layer, IlUInt &count) const |
Adds a graphic object to a manager, and then names the object. | |
virtual IlBoolean | removeObject (IlvGraphic *object, IlBoolean redraw=IlTrue, IlBoolean destroyIt=IlTrue) |
Removes a graphic object from the manager set. | |
void | setEditable (IlvGraphic *object, IlBoolean editable) |
Indicates whether a graphic object can be edited. | |
IlvEditableFilter * | setEditableFilter (IlvEditableFilter *) |
Adds a graphic object to a manager, and then names the object. | |
void | setMoveable (IlvGraphic *object, IlBoolean moveable) |
Sets the moveability of a graphic object. | |
virtual IlBoolean | setObjectName (IlvGraphic *object, const char *name) |
Sets the name of a graphic object in the manager. | |
void | setResizeable (IlvGraphic *object, IlBoolean resizable) |
Sets a graphic object as resizable or not resizable. | |
virtual void | setSelectable (IlvGraphic *object, IlBoolean selectable) |
Sets a graphic object as selectable or not selectable. | |
void | setVisible (IlvGraphic *object, IlBoolean visible, IlBoolean redraw=IlFalse) |
Sets the visibility of a graphic object in the manager to visible. The method calls the IlvManagerViewHook::contentsChanged member function of the hook objects that are linked to the manager. This member function does not redraw the bounding box of the object. | |
IlvDrawSelection * | whichSelection (const IlvPoint &p, const IlvView *view) const |
Returns the selection object located at the given location. | |
static IlvManager * | getManager (const IlvGraphic *object) |
Gets the manager holding a given graphic object. | |
Binding Views to a Manager | |
| |
virtual void | addTransformer (const IlvView *view, IlvTransformer *t=0) |
Composes a manager view transformer with another transformer. | |
virtual void | addView (IlvView *view) |
Adds a view to the manager. | |
IlBoolean | allowEnsureVisible () const |
Composes a manager view transformer with another transformer. | |
void | allowEnsureVisible (IlBoolean v) |
Composes a manager view transformer with another transformer. | |
void | ensureVisible (IlvView *view, const IlvRect &rect) |
Translates the contents of a manager view in order to make a given rectangle visible. | |
void | ensureVisible (IlvView *view, const IlvPoint &point) |
Translates the contents of a manager view in order to make a given location visible. | |
void | fitToContents (IlvView *view) |
Resizes a manager view to fit the bounding box of the graphic objects. | |
void | fitTransformerToContents (const IlvView *view, IlBoolean redraw=IlTrue, IlBoolean ratio=IlFalse) |
Rescales the contents of a manager view to fit in the view. | |
IlvView * | getFirstView () const |
Returns the first view associated with the manager. | |
IlvTransformer * | getTransformer (const IlvView *view) const |
Returns the transformer associated with a manager view. | |
IlvView ** | getViews (IlUInt &count) const |
Returns the array of views associated with the manager. | |
IlBoolean | isKeepingAspectRatio (const IlvView *view) const |
Indicates whether a manager view preserves the x/y ratio. | |
virtual IlBoolean | removeView (IlvView *view) |
Removes a view from the manager view list. | |
void | rotateView (const IlvView *view, const IlvPoint &point, IlFloat angle, IlBoolean redraw=IlTrue) |
Rotates the contents of a manager view. | |
void | setKeepingAspectRatio (const IlvView *view, IlBoolean ratio=IlTrue, IlBoolean redraw=IlTrue) const |
Sets or unsets the automatic preservation of the x/y ratio in a manager view. | |
virtual void | setTransformer (const IlvView *view, IlvTransformer *t=0) |
Sets a transformer to a manager view. | |
void | translateView (const IlvView *view, IlvPos dx, IlvPos dy, IlBoolean redraw=IlTrue) |
Scroll the contents of a manager. | |
void | zoomView (const IlvView *view, const IlvPoint &point, IlFloat scalex, IlFloat scaley, IlBoolean redraw=IlTrue) |
Zoom the contents of a manager view. | |
static IlvManager * | Get (const IlvView *view) |
Returns the manager connected to the specified view, if any. | |
static void | Set (IlvView *view, IlvManager *manager) |
Composes a manager view transformer with another transformer. |
Manager class.
Library: ilvmgr
An IlvManager
holds and manages a set of graphic objects. These objects can appear in superimposed layers. The display can take place in one or several views of the IlvView
class. A graphic transformation can be associated with each view. Consequently, you can display any portion of the total space in which your graphic objects are located, with appropriate scales for each view.
The manager can associate an IlvManagerViewInteractor
object for each view, an object which processes events intended for that particular view. If the manager has not associated an interactor object with a view, each event is handled by the interactor object associated with the graphic object that received the event. The interactor object belongs to the IlvManagerObjectInteractor
class.
In certain situations, the best solution is to establish a generic action for all the objects associated with a single event sequence. For example, double clicking an object pops up an additional information panel. To do this, Rogue Wave Views allows you to associate direct actions with events. These actions, which are neither bound to the view nor to the object that was clicked on, are called accelerators.
The IlvManager
class has been designed to allow a large number of graphic objects to be handled. In such cases, storing objects in a linear list or an array may cause some performance problems when objects must be retrieved from their location (refresh, selection, and so on). Most of the time, the manager stores the graphic object in a complex structure organized according to the geometry of the objects, so that they can by found quickly. Because this structure must always be kept synchronized with the state of the objects, the manager must always be informed when the geometry of an object is modified. This is why operations on graphic object (such as move, resize, rotate, and so on) must not be done by direct calls to graphic object member functions but must be done through the control of the manager. This is done by using IlvManager
member functions called applyTo...()
. These functions encapsulate a user function and allow the manager to keep its data structure coherent.
IlvManager
also handles many utility functions for the views and objects under its control.
In the following member function descriptions, the term invalidated region means a region of the screen that needs to be updated.
IlvApplyObject
, IlvContainer
, IlvGadgetManager
, IlvGetContentsChangedUpdate
, IlvGetOptimizeMode
, IlvGrapher
, IlvIndexedSet
, IlvManagerAccelerator
, IlvManagerAcceleratorAction
, IlvManagerCommand
, IlvManagerEventHook
, IlvManagerGrid
, IlvManagerLayer
, IlvManagerSelectionHook
, IlvManagerViewHook
, IlvManagerObjectInteractor
, IlvManagerObserver
, IlvManagerViewInteractor
, IlvManagerInputFile
, IlvManagerOutputFile
, IlvMgrView
, IlvSetContentsChangedUpdate
, IlvSetOptimizeMode
. IlvManager::IlvManager | ( | IlvDisplay * | display, | |
int | layers = 2 , |
|||
IlBoolean | useacc = IlTrue , |
|||
IlUShort | maxInList = 30 , |
|||
IlUShort | maxInNode = 30 | |||
) |
Constructor.
Initializes an instance of IlvManager
.
display | The display. The manager uses this display to create graphic resources such as a palette to draw ghost images. | |
layers | The number of layers in the manager. If the application runs short of layers, the number of layers can be dynamically increased. | |
useacc | Indicates whether to install the default accelerators. See the list of accelerators in this class description. | |
maxInList | Specifies how objects are stored in a layer of this manager. There are two cases: objects are stored in a simple list, or, objects are stored in a more complex structure where linear access to objects is not possible. The maxInList parameter specifies the maximum number of objects that can be stored in the list. If you try to handle more objects than the number specified, the manager automatically switches to the more complex mode. | |
maxInNode | The maximum number of objects allowed in the node of a quadtree, before the node is divided into subtrees. |
virtual IlvManager::~IlvManager | ( | ) | [virtual] |
Destructor.
Destroys all objects maintained by the manager as well as the manager itself. The destructor performs the following actions successively:
void IlvManager::abortReDraws | ( | ) |
Resets the invalidated regions.
Aborts the current update region. You can call this function when you discover, in your update algorithm, that it is necessary to reset every region currently stored as "to be updated" (you need to refresh the whole screen, for example). This function resets the update region to empty.
void IlvManager::addAccelerator | ( | IlvManagerAccelerator * | ) |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
void IlvManager::addAccelerator | ( | IlvManagerAcceleratorAction | f, | |
IlvEventType | type, | |||
IlUShort | buttonOrKey = 0 , |
|||
IlUShort | modifiers = 0 , |
|||
IlAny | userArg = 0 , |
|||
IlUShort | optModifiers = 0 | |||
) |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
void IlvManager::addAfter | ( | const IlvGraphic * | g | ) |
Resets the invalidated regions.
Aborts the current update region. You can call this function when you discover, in your update algorithm, that it is necessary to reset every region currently stored as "to be updated" (you need to refresh the whole screen, for example). This function resets the update region to empty.
void IlvManager::addBefore | ( | const IlvGraphic * | g | ) |
Resets the invalidated regions.
Aborts the current update region. You can call this function when you discover, in your update algorithm, that it is necessary to reset every region currently stored as "to be updated" (you need to refresh the whole screen, for example). This function resets the update region to empty.
virtual void IlvManager::addCommand | ( | IlvCommand * | command | ) | [virtual] |
Appends a new command to the command queue.
command | The command. |
int IlvManager::addLayer | ( | IlvManagerLayer * | layer, | |
int | position = -1 | |||
) |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
Adds a layer to the manager.
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. | |
maxInList | Indicates the maximum number of graphic objects the layer can store. | |
maxInNode | Not documented. |
virtual void IlvManager::addObject | ( | const char * | name, | |
IlvGraphic * | object, | |||
IlBoolean | redraw = IlTrue , |
|||
int | layer = -1 | |||
) | [virtual] |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. Reimplemented in IlvGadgetManager.
virtual void IlvManager::addObject | ( | IlvGraphic * | object, | |
IlBoolean | redraw = IlTrue , |
|||
int | layer = -1 | |||
) | [virtual] |
Adds an object to the manager.
If an object is inserted in a non-existent layer, the layer, as well as any intermediate ones, are automatically created. For example, by default, a manager is created with three layers (0
, 1
and 2
); the code
addObject(obj, IlTrue, 5);
creates layers 3
, 4
, and 5
. An object cannot be added to a manager more than once.
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
or IlvManager::removeObject
, tests ensure that the data structure remains consistent. These tests ensure that an object is not stored twice, or remove an object that is not stored in this manager. You can bypass these tests and accelerate the process of storing and removing objects in a manager. See the global functions IlvGetOptimizeMode
and IlvSetOptimizeMode
. Reimplemented in IlvGadgetManager.
virtual IlBoolean IlvManager::addSmartSet | ( | IlvSmartSet * | set, | |
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Adds a smartset to the manager.
This set must have a name. If there is already a smartset with the same name in the manager, the smartset set is renamed by adding 1
at the end of its name, or by incrementing the decimal value at the end of the name. If the smartset contains objects that are not stored in this manager, they are added to the manager.
set | The smartset. | |
redraw | Specifies whether the manager must redraw its contents. |
IlFalse
on error, that is, if the smartset contains objects located in another manager. virtual void IlvManager::addTransformer | ( | const IlvView * | view, | |
IlvTransformer * | t = 0 | |||
) | [virtual] |
Composes a manager view transformer with another transformer.
Computes the product of the manager view transformer and t and sets the result on the view. The transformer is internally copied during this function call.
view | The manager view. | |
t | The transformer. |
virtual void IlvManager::addView | ( | IlvView * | view | ) | [virtual] |
Adds a view to the manager.
Attaches a new view to the manager. All events are then handled by the hierarchy of interactors located in the manager.
view | The view. |
Reimplemented in IlvGadgetManager.
virtual void IlvManager::align | ( | IlvPosition | alignment, | |
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Aligns the selected objects.
Moves all selected objects to the given alignment parameter. The objects are aligned with the first selected object.
alignment | Can take one of the following values: IlvLeft IlvRight IlvTop IlvBottom IlvCenter IlvHorizontalCenter IlvVerticalCenter . | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
IlvGraphic* const* IlvManager::allContains | ( | int | layer, | |
const IlvPoint & | p, | |||
const IlvView * | view, | |||
IlUInt & | count | |||
) | const |
Returns all graphic objects containing a given point in a layer.
layer | The index of the manager layer. | |
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
count | Used to return the number of objects in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* const* IlvManager::allContains | ( | const IlvPoint & | p, | |
const IlvView * | view, | |||
IlUInt & | count | |||
) | const |
Returns all graphic objects containing a given point.
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
count | Used to return the number of objects in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* const* IlvManager::allInside | ( | int | layer, | |
IlUInt & | count, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Returns all graphic objects of a layer located in a rectangle.
layer | The index of the manager layer. | |
count | Used to return the number of objects in the array. | |
rect | The rectangle. | |
t | The transformer. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* const* IlvManager::allInside | ( | IlUInt & | count, | |
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Returns all graphic objects located in a rectangle.
count | Used to return the number of objects in the array. | |
rect | The rectangle. | |
t | The transformer. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* const* IlvManager::allIntersects | ( | int | layer, | |
IlUInt & | count, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Returns all graphic objects of a layer intersecting a rectangle.
layer | The index of the manager layer. | |
count | Used to return the number of objects in the array. | |
rect | The rectangle. If a transformer is specified, the method tests the intersection between the rectangle and the bounding box of the transformed object. | |
t | The transformer. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* const* IlvManager::allIntersects | ( | IlUInt & | count, | |
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Returns all graphic objects intersecting a rectangle.
count | Used to return the number of objects in the array. | |
rect | The rectangle. | |
t | The transformer. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlBoolean IlvManager::allowEnsureVisible | ( | ) | const |
Composes a manager view transformer with another transformer.
Computes the product of the manager view transformer and t and sets the result on the view. The transformer is internally copied during this function call.
view | The manager view. | |
t | The transformer. |
void IlvManager::allowEnsureVisible | ( | IlBoolean | v | ) |
Composes a manager view transformer with another transformer.
Computes the product of the manager view transformer and t and sets the result on the view. The transformer is internally copied during this function call.
view | The manager view. | |
t | The transformer. |
void IlvManager::applyInside | ( | IlvApplyObject | func, | |
IlAny | arg, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 , |
|||
IlBoolean | redraw = IlTrue | |||
) |
Applies a user function to graphic objects located in a rectangle.
Encapsulates a call to func(object, arg)
for each graphic object whose bounding box is included in the specified rectangle. If a transformer is specified, the method tests the bounding box of the transformed objects.
func | The user function to apply. | |
arg | The user argument. | |
rect | The rectangle. | |
t | The transformer. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
void IlvManager::applyInside | ( | int | layer, | |
IlvApplyObject | func, | |||
IlAny | arg, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 , |
|||
IlBoolean | redraw = IlTrue | |||
) |
Applies a user function to objects of a layer located in a rectangle.
Encapsulates a call to func(object, arg)
for each graphic object of a layer whose bounding box is included in the specified rectangle. If a transformer is specified, the method tests the bounding box of the transformed objects.
layer | The index of the manager layer. | |
func | The user function to apply. | |
arg | The user argument. | |
rect | The rectangle. | |
t | The transformer. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
void IlvManager::applyIntersects | ( | IlvApplyObject | func, | |
IlAny | arg, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 , |
|||
IlBoolean | redraw = IlTrue | |||
) |
Applies a user function to graphic objects intersecting a rectangle.
Encapsulates a call to func(object, arg)
for each graphic object whose bounding box intersects the specified rectangle. If a transformer is specified, the method tests the bounding box of the transformed objects.
func | The user function to apply. | |
arg | The user argument. | |
rect | The rectangle. | |
t | The transformer. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
void IlvManager::applyIntersects | ( | int | layer, | |
IlvApplyObject | func, | |||
IlAny | arg, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 , |
|||
IlBoolean | redraw = IlTrue | |||
) |
Applies a user function to objects of a layer intersecting a rectangle.
Encapsulates a call to func(object, arg)
for each graphic object of a layer whose bounding box intersects the specified rectangle. If a transformer is specified, the method tests the bounding box of the transformed objects.
layer | The index of the manager layer. | |
func | The user function to apply. | |
arg | The user argument. | |
rect | The rectangle. | |
t | The transformer. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
virtual void IlvManager::applyToObject | ( | IlvGraphic * | object, | |
IlvApplyObject | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Applies a user function to a graphic object.
Encapsulates a call to func(object, arg)
. This member function ensures the stability of the internal structures of the manager. It removes the object from the quadtree, calls the user function, and then replaces the object. This allows the location to be modified without damaging the quadtree. To apply the same type of function to more objects, use one of the following IlvManager::applyToObjects
functions:
object | The graphic object. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to func. |
applyTo...()
member functions in this section, you must not select or remove an object within an applicative function, and calls to applyTo...()
member functions should not be nested. Furthermore, when using these functions, you must not move an object from one layer to another. virtual void IlvManager::applyToObjects | ( | int | layer, | |
IlvApplyFunction | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Applies a user function to the graphic objects of a manager layer.
Encapsulates a call to func(arg)
for the specified manager layer. All the graphic objects stored in the layer are removed from the manager. Then func is called and the objects are inserted back in the layer. The difference with the other member function IlvManager::applyToObjects(layer, func, arg, redraw)
is that the user function is called only once, and its prototype has only one parameter, the user argument.
layer | The index of the manager layer. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
virtual void IlvManager::applyToObjects | ( | int | layer, | |
IlvApplyObject | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Applies a user function to all graphic objects of a manager layer.
Calls IlvManager::applyToObject
for each graphic object of the specified manager layer.
layer | The index of the manager layer. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
virtual void IlvManager::applyToObjects | ( | IlUInt | count, | |
IlvGraphic *const * | objects, | |||
IlvApplyFunction | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Applies a user function to a set of graphic objects.
Encapsulates a call to func(arg)
for each object in the specified array. The only difference with the other member function IlvManager::applyToObjects(count, objects, func, arg, redraw)
is the user function prototype. In this member functionx, the user function takes only one parameter: the user argument. func is called count times; once per object in the array.
count | The number of graphic objects in the array. | |
objects | The array of graphic objects. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
virtual void IlvManager::applyToObjects | ( | IlUInt | count, | |
IlvGraphic *const * | objects, | |||
IlvApplyObject | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Applies a user function to a set of graphic objects.
Calls IlvManager::applyToObject
for each graphic object of the specified array.
count | The number of graphic objects in the array. | |
objects | The array of graphic objects. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
Applies a user function to the selected graphic objects.
Encapsulates a call to func(object, arg)
for each selected graphic object.
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
void IlvManager::applyToTaggedObjects | ( | const IlSymbol * | tag, | |
IlvApplyObject | func, | |||
IlAny | arg, | |||
IlBoolean | redraw = IlTrue | |||
) |
Applies a user function to all graphic objects associated with a given tag.
Encapsulates a call to func(object, arg)
for each graphic object associated with the specified tag.
tag | Specifies a tag. | |
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
applyTo...()
member functions, do not select or remove an object within an applicative function, and do not nest calls to applyTo...()
member functions. Furthermore, when using these functions, you must not move an object from one layer to another. void IlvManager::bufferedDraw | ( | IlvView * | view, | |
const IlvGraphic * | object | |||
) | const |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
Redraws a region of a manager view by means of a temporary pixmap.
Redraws a region of a manager view using a technique similar to double buffering: the drawings are done in a hidden pixmap, and then the pixmap is displayed in the manager view immediately. Unlike true double buffering, the pixmap is temporary and has the size of the bounding box of the region, not the whole view.
view | The manager view. | |
region | The region in the manager view coordinate system. |
Redraws a rectangular area of a manager view by means of a temporary pixmap.
Redraws a rectangular area of a manager view using a technique similar to double buffering: the drawings are done in a hidden pixmap, and then the pixmap is displayed in the manager view immediately. Unlike true double buffering, the pixmap is temporary and has the size of the rectangle, not the whole view.
view | The manager view. | |
rect | The rectangle in the manager view coordinate system. |
void IlvManager::callCallback | ( | IlvGraphic * | object | ) |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
virtual void IlvManager::callCallbacks | ( | const IlSymbol * | callbackName, | |
IlvGraphic * | ||||
) | [virtual] |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
Computes the bounding box of all the objects.
Computes the bounding box of all the objects stored in all the visible layers in the specified manager view. If a transformer is associated with the view, the returned rectangle is the bounding box of the transformed objects.
bbox | Used to return the bounding box. | |
view | The manager view. |
void IlvManager::computeBBox | ( | IlvRect & | bbox, | |
const IlvTransformer * | t = 0 | |||
) | const |
Computes the bounding box of all the objects stored in all the visible layers.
If a transformer is specified, the returned rectangle is the bounding box of the transformed objects.
bbox | Used to return the bounding box. | |
t | The transformer. |
virtual void IlvManager::contentsChanged | ( | ) | [virtual] |
Called automatically by the manager each time objects are created, removed, moved, or resized in the manager.
The default implementation of this member function sets the manager state to a modified state (see the IlvManager::isModified
and IlvManager::setModified
member functions). If the function IlvSetContentsChangedUpdate
allows it, the method calls each IlvManagerViewHook::contentsChanged
member function of any existing hooks connected to the managed views.
virtual char* IlvManager::copy | ( | IlUInt & | count | ) | [virtual] |
Saves all the selected graphic objects in a string.
delete []
. count | Indicates the length of the returned string in bytes. |
void IlvManager::copyToClipboard | ( | ) |
Saves the selected graphic objects in the clipboard.
Copies all the selected objects in the clipboard. It uses the IlvManager::copy
member function.
virtual IlvManagerInputFile* IlvManager::createInputFile | ( | ILVSTDPREF istream & | stream | ) | [virtual] |
Creates an IlvManagerInputFile
from an input stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerInputFile
subclass adapted to their needs.
IlvManagerInputFile
, or a subclass. stream | The input stream. |
virtual IlvManagerInputFile* IlvManager::createInputFile | ( | istream & | stream | ) | [virtual] |
Creates an IlvManagerInputFile
from an input stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerInputFile
subclass adapted to their needs.
IlvManagerInputFile
, or a subclass. stream | The input stream. |
virtual IlvManagerOutputFile* IlvManager::createOutputFile | ( | ILVSTDPREF ostream & | stream | ) | const [virtual] |
Creates an IlvManagerInputFile
from an input stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerInputFile
subclass adapted to their needs.
IlvManagerInputFile
, or a subclass. stream | The input stream. |
virtual IlvManagerOutputFile* IlvManager::createOutputFile | ( | ostream & | stream | ) | const [virtual] |
Creates an IlvManagerOutputFile
from an output stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerOutputFile
subclass adapted to their needs.
stream | The output stream. |
IlvManagerOutputFile
, or a subclass. The implementation for the IlvManager
class is: IlvManagerOutputFile* IlvManager::createOutputFile(ostream& stream) const { return new IlvManagerOutputFile(stream, this); }
virtual char* IlvManager::cut | ( | IlUInt & | count | ) | [virtual] |
Saves the selected graphic objects in a string and then deletes them.
delete []
. count | Indicates the length of the returned string in bytes. |
void IlvManager::cutToClipboard | ( | ) |
Saves the selected graphic objects in the clipboard and deletes them.
Cuts all the selected objects in the clipboard. It uses the IlvManager::cut
member function.
Removes all the objects stored in a specified layer of the manager.
layer | The index of the manager layer. | |
destroy | Indicates whether the manager must delete the objects after removing them. | |
redraw | Indicates whether the manager must redraw the views attached to it. |
Removes all the graphic objects from the manager.
destroy | Indicates whether the manager must delete the objects | |
redraw | Indicates whether the manager must redraw its views after removing them. |
virtual void IlvManager::deleteSelections | ( | IlBoolean | redraw = IlTrue |
) | [virtual] |
Removes the selected objects from the manager and deletes them if undo is disabled.
By default, undo is enabled.
redraw | Specifies whether the manager must refresh its views. |
virtual void IlvManager::deSelectAll | ( | IlBoolean | redraw = IlTrue |
) | [virtual] |
Deselects the selected graphic objects.
Deselects all previously selected objects.
redraw | Specifies whether the manager must refresh its views. |
void IlvManager::disableRedrawTask | ( | ) |
Deactivates the lazy redraw mechanism.
This function prevents the lazy redraw task from happening when the process is idle. Any subsequent call to IlvManager::invalidateRegion
will restore the lazy redraw mechanism and reschedule a redraw task.
Dispatches an event to the appropriate graphic objects.
Called by the manager event handler for every incoming user event when no view interactor was set in the view where the event occurred. It checks whether there is an object under the cursor. If there is one and if it is associated with an interactor, the event handler propagates the event to the interactor.
IlTrue
if the object interactor handled the event. If there is no object under the pointer or if its object interactor cannot handle the event, the returned value is IlFalse
. Reimplemented in IlvGadgetManager.
void IlvManager::draw | ( | ) | const |
Draws the contents of the manager.
Draws all visible graphic objects of the manager in all managed views.
void IlvManager::draw | ( | int | layer, | |
IlvPort * | dst, | |||
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | region = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const |
Draws the contents of a manager layer in a destination port.
Draws visible graphic objects of a given manager layer in the specified destination port. An affine transformation can be specified by the transformer. To be drawn, an object must be at least partially located inside the region specified by the region parameter. If this parameter is set to 0
, all objects on all visible layers are drawn. Also, the drawing is restricted to the clipping region.
layer | The index of the manager layer. | |
dst | The destination port. | |
t | The transformer. | |
region | Only objects intersecting this region are drawn. | |
clip | The clipping region. |
void IlvManager::draw | ( | IlvPort * | dst, | |
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | region = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const |
Draws the contents of a manager in a destination port.
Draws visible graphic objects of the manager in the specified destination port. An affine transformation can be specified by the transformer. Only visible objects in visible layers are affected by this drawing request. These objects must be at least partially located inside the region specified by the region parameter. If this parameter is set to 0
, all objects on all visible layers are drawn. Also, the drawing is restricted to the clipping region, if any. The possibility of drawing directly to an IlvPort
instead of an IlvView
was implemented for the dump module when you need to explicitly set the clipping region. The other member functions IlvManager::draw
would clip the clipping region with the visible part of the destination view.
dst | The destination port. | |
t | The transformer. | |
region | Only objects intersecting this region are drawn. | |
clip | The clipping region. |
virtual void IlvManager::draw | ( | IlvView * | view, | |
IlBoolean | erase, | |||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws the graphic objects of the manager in a manager view.
The drawing is restricted to the area of the clipping region, if any. Only the visible layers for this view and the visible objects on these layers are drawn. If the view is not associated with this manager, nothing is done.
view | The manager view. | |
erase | Indicates whether the view (or the clipping region in the view) must be erased before drawing (see IlvAbstractView::erase ). | |
clip | The clipping region. 0 means that the drawing is not clipped. |
Duplicates the selected graphic objects.
Copies the selected objects and adds them to the manager. The copied objects are translated from their original positions.
dx | The translation offset along the horizontal axis. | |
dy | The translation offset along the vertical axis. |
virtual IlvSmartSet* IlvManager::duplicateSmartSet | ( | IlvSmartSet * | set, | |
IlvPos | dx = 0 , |
|||
IlvPos | dy = 0 | |||
) | [virtual] |
Makes a copy of a smartset.
set must be stored in this manager. The objects are duplicated, keeping their intrinsic names and interactors. The new smartset has the same geometry as the original but can be translated if the horizontal and vertical offsets are specified.
IlvManager::addSmartSet
. set | The original smartset. | |
dx | The horizontal translation offset. | |
dy | The vertical translation offset. |
Translates the contents of a manager view in order to make a given rectangle visible.
Applies a translation to the transformer of the manager view to scroll the graphic objects, so that the four corners of the specified rectangle become visible. If they are already visible, nothing is done. If the rectangle is wider than the view, the rectangle will be horizontally centered. If the rectangle is higher than the view, it will be vertically centered. Special case: A view is scrollable if it is the child of an IlvScrollView
(and not IlvScrolledView
). In this case, the view transformer is not changed and the view is scrolled instead.
The redraw is performed automatically.
view | The manager view. | |
rect | The rectangle in the view coordinate system. |
Translates the contents of a manager view in order to make a given location visible.
Applies a translation to the manager view transformer to scroll the graphic objects, so that a given location becomes visible. If the location is already visible (in the boundaries of the view), nothing is done.
Special case: A view is scrollable if it is the child of an IlvScrollView
(and not IlvScrolledView
). In this case, the view transformer is not changed and the view is scrolled instead.
The redraw is performed automatically.
view | The manager view. | |
point | The point in the view coordinate system. |
Erases a region of a manager view.
view | The manager view. | |
region | The region in the manager view coordinate system. |
IlvGraphic* IlvManager::filteredLastContains | ( | int | layer, | |
const IlvPoint & | p, | |||
const IlvView * | view, | |||
const IlvGraphicFilter & | f | |||
) | const |
Returns the graphic object containing a given point in a layer.
layer | The index of the manager layer. | |
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
f | The filter function. |
IlvGraphic* IlvManager::filteredLastContains | ( | const IlvPoint & | p, | |
const IlvView * | view, | |||
const IlvGraphicFilter & | f | |||
) | const |
Returns the graphic object containing a given point.
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
f | The filter function. |
IlvGraphic* IlvManager::firstIntersects | ( | int | layer, | |
const IlvRect & | r | |||
) |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. IlvGraphic* IlvManager::firstIntersects | ( | int | layer, | |
const IlvRegion & | tr, | |||
const IlvTransformer * | t | |||
) | const |
Returns the first object of a layer intersecting a region.
layer | The index of the manager layer. | |
tr | The (transformed) region. | |
t | The transformer. |
IlvGraphic* IlvManager::firstIntersects | ( | const IlvRect & | r | ) |
Returns all graphic objects containing a given point in a layer.
layer | The index of the manager layer. | |
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
count | Used to return the number of objects in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvGraphic* IlvManager::firstIntersects | ( | const IlvRegion & | tr, | |
const IlvTransformer * | t | |||
) | const |
Returns the first object intersecting a region.
tr | The (transformed) region. | |
t | The transformer. |
void IlvManager::fitToContents | ( | IlvView * | view | ) |
Resizes a manager view to fit the bounding box of the graphic objects.
Resizes the view associated with this manager, so that it contains every object stored in all the visible layers. The new size of the view is computed with the current transformer.
view | The manager view. |
void IlvManager::fitTransformerToContents | ( | const IlvView * | view, | |
IlBoolean | redraw = IlTrue , |
|||
IlBoolean | ratio = IlFalse | |||
) |
Rescales the contents of a manager view to fit in the view.
Applies a scaling factor and a translation to the manager view transformer so that the manager fits in the boundaries of the view. The view is not resized itself. The horizontal scaling factor is such that the width of the transformed bounding box of the objects is the view width. Similarly, the vertical scaling factor is such that the height of the transformed bounding box of the objects is the view height. Only objects in visible layers are taken into account.
The computation of scaling factors is not always accurate: it assumes that the bounding box of a transformed graphic object is equal to the transformed bounding box, which is not true for non-zoomable objects. If there are such objects in the manager, several calls to the method may be necessary to obtain the desired result.
view | The manager view. | |
redraw | Indicates whether the manager must redraw the objects in the view after the transformation. | |
keepRatio | If IlTrue , horizontal and vertical scaling factors are equal, thereby preserving the x/y ratio. |
virtual void IlvManager::flushRedraw | ( | ) | [virtual] |
Performs the actual redraw of invalid regions.
This function is called as an idle procedure just before a process becomes idle to handle all pending drawing tasks accumulated by calls to IlvManager::invalidateRegion
. You can call it if you want to force the refresh of your views at a given point in your program, if the redraw task has not been disabled.
IlvEventLoop::addIdleProc
. void IlvManager::forgetUndo | ( | ) |
Resets the undo command queue.
Empties the command queue of the manager. Call this function whenever a command that cannot be undone is applied to the manager objects. In this case, the manager can no longer undo previous commands.
Dispatches an event to the appropriate graphic objects.
Called by the manager event handler for every incoming user event when no view interactor was set in the view where the event occurred. It checks whether there is an object under the cursor. If there is one and if it is associated with an interactor, the event handler propagates the event to the interactor.
IlTrue
if the object interactor handled the event. If there is no object under the pointer or if its object interactor cannot handle the event, the returned value is IlFalse
. Reimplemented in IlvGadgetManager.
static IlvManager* IlvManager::Get | ( | const IlvView * | view | ) | [static] |
Returns the manager connected to the specified view, if any.
view | The view. |
0
otherwise. IlvManager::addView
IlvManagerAccelerator* IlvManager::getAccelerator | ( | IlvEventType | type, | |
IlUShort | buttonOrKey = 0 , |
|||
IlUShort | modifiers = 0 | |||
) |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
IlBoolean IlvManager::getAccelerator | ( | IlvManagerAcceleratorAction * | f, | |
IlAny * | userArg, | |||
IlvEventType | type, | |||
IlUShort | buttonOrKey = 0 , |
|||
IlUShort | modifiers = 0 | |||
) |
Gets an accelerator action matching an event description.
Looks for a manager accelerator matching an event description. If one is found and if the action and userArg parameters are not 0
, these parameters are used to return the accelerator action and user argument.
IlTrue
if a matching accelerator is found and IlFalse
otherwise. f | Used to return the accelerator action. | |
userArg | Used to return the action argument. | |
type | The event type. | |
buttonOrKey | The event data. | |
modifiers | The event modifiers. |
IlvGraphicCallback IlvManager::getCallback | ( | const IlSymbol * | cbName | ) | const |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
const IlAList* IlvManager::getCallbackNames | ( | ) | const |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
IlUInt IlvManager::getCardinal | ( | int | layer | ) | const |
Returns the number of graphic objects in a layer.
layer | The index of the layer. |
IlUInt IlvManager::getCardinal | ( | ) | const |
Returns the number of graphic objects.
IlAny IlvManager::getClientData | ( | ) | const |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
IlvCommandHistory* IlvManager::getCommandHistory | ( | ) | const |
Returns the object which handles the stack of commands.
IlvPalette* IlvManager::getCreatorPalette | ( | ) | const |
Gets the default palette used to create graphic objects interactively.
IlvDisplay* IlvManager::getDisplay | ( | ) | const |
Returns the display.
IlvDisplay
object for which this manager was built. Indicates whether double buffering is used for a manager view.
IlTrue
if double buffering is applied to the view, and IlFalse
otherwise. view | The manager view. |
IlvManagerDblBufferHandler* IlvManager::getDoubleBufferingHandler | ( | ) | const |
Indicates whether double buffering is used for a manager view.
IlTrue
if double buffering is applied to the view, and IlFalse
otherwise. view | The manager view. |
IlvEditableFilter* IlvManager::getEditableFilter | ( | ) | const |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. IlvManagerEventHook* IlvManager::getEventHooks | ( | ) | const |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
IlvView* IlvManager::getFirstView | ( | ) | const |
Returns the first view associated with the manager.
0
. IlvManagerGrid* IlvManager::getGrid | ( | const IlvView * | view | ) | const |
Returns the manager grid associated with a manager view.
IlvManagerGrid
object associated with the manager view. It returns 0
if no grid is applied to the view. int IlvManager::getInsertionLayer | ( | ) | const |
Gets the default layer used to store the graphic objects created interactively.
IlvManager::addObject
. IlvManagerViewInteractor* IlvManager::getInteractor | ( | const IlvView * | view | ) | const |
Returns the view interactor associated with a manager view.
0
if there is none. view | The manager view. |
int IlvManager::getLayer | ( | const IlvGraphic * | object | ) | const |
Returns the manager layer containing a given graphic object.
-1
. object | The graphic object. |
int IlvManager::getLayerIndex | ( | const IlvManagerLayer * | ) | const |
Returns the index of a manager layer instance.
IlvManagerLayer
, which is not described in this manual. Layers can be accessed by their index, or by their instance (a pointer to an IlvManagerLayer
object). static IlvManager* IlvManager::getManager | ( | const IlvGraphic * | object | ) | [static] |
Gets the manager holding a given graphic object.
object | The graphic object. |
0
. IlvManagerLayer* IlvManager::getManagerLayer | ( | int | i | ) | const |
Returns the IlvManagerLayer
instance from its index.
Most of the time, manager layers are referred to by their index. However, it can be useful to get a pointer to the manager layer instance. This member function allows you to get a layer instance from its index in the manager. (See the note concerning the IlvManagerLayer
class).
IlvManagerLayer* IlvManager::getManagerLayer | ( | const IlvGraphic * | object | ) | const |
Returns the IlvManagerLayer
instance of a graphic object.
object | The graphic object. |
IlvManagerLayer
, which is not described in this manual. Layers can be accessed by their index specification, or by their instance (a pointer to an IlvManagerLayer
object). When you change the order of layers in a manager, you lose their original index specifications. The pointer, however, remains the same and you can keep track of the layers by using it. IlvManagerLayer* IlvManager::getManagerLayer | ( | const char * | layerName | ) | const |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
const char* IlvManager::getName | ( | ) | const |
Returns the name of the manager.
int IlvManager::getNumLayers | ( | ) | const |
Returns the number of manager layers.
IlvGraphic* IlvManager::getObject | ( | const char * | name | ) | const |
Gets a graphic object by its name.
0
if no object was given this name in the manager. name | The object name. |
IlvManagerObjectInteractor* IlvManager::getObjectInteractor | ( | const IlvGraphic * | object | ) | const |
The object interactor associated with a graphic object.
0
if there is none. object | The graphic object. |
const char* IlvManager::getObjectName | ( | const IlvGraphic * | object | ) | const |
Returns the name of a graphic object.
0
if the object has no name. object | The graphic object. |
virtual IlvGraphic* const* IlvManager::getObjects | ( | int | layer, | |
IlUInt & | count | |||
) | const [virtual] |
Returns the graphic objects stored in a manager layer.
layer | The index of the layer. | |
count | The number of objects returned in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified.This member function is rarely used, since you can implement your code by means of the member functions described in the "Applying Functions to Objects" section.
virtual IlvGraphic* const* IlvManager::getObjects | ( | IlUInt & | count | ) | const [virtual] |
Returns the graphic objects stored in the manager.
count | The number of objects returned in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified.This member function is rarely used, since you can implement your code by means of the member functions described in the "Applying Functions to Objects" section.
IlvPalette* IlvManager::getPalette | ( | ) | const |
Returns the manager palette.
IlvPalette
object of the manager. The palette is dedicated to temporary drawings that provide visual feedback. For example, it is used to draw ghost images.XOR
. IlvGraphic* const* IlvManager::getPersistentObjects | ( | IlUInt & | count | ) | const |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. IlvReDrawMode IlvManager::getReDrawMode | ( | ) | const |
Returns the redraw mode of the manager.
IlvDrawSelection* IlvManager::getSelection | ( | const IlvGraphic * | object | ) | const |
Returns the selection object of a graphic object.
object | The graphic object. |
0
if the graphic object is not selected. The selector object is an internal IlvGraphic
used to draw selections and test against mouse events. IlvManagerSelectionHook* IlvManager::getSelectionHooks | ( | ) | const |
Applies a user function to the selected graphic objects.
Encapsulates a call to func(object, arg)
for each selected graphic object.
func | The user function to apply. | |
arg | The user argument. | |
redraw | Specifies whether the manager must redraw the invalidated regions. The invalidated regions are the areas occupied by the objects before and after the calls to the user function. |
IlvGraphic* const* IlvManager::getSelections | ( | IlUInt & | count | ) | const |
Returns the selected graphic objects.
count | Used to return the number of graphic objects in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. IlvManager::applyToSelections
member function is available. IlvSmartSet* IlvManager::getSmartSet | ( | const char * | name | ) | const |
Gets a smartset by its name.
IlvSmartSet
with the specified name, or 0
if there is none. name | The smartset name. |
IlvGraphic* const* IlvManager::getTaggedObjects | ( | const IlSymbol * | tag, | |
IlUInt & | count | |||
) | const |
Returns the graphic objects associated with a given tag.
0
if none are found. The array is stored in an IlPoolOf(Pointer)
and should not be deleted or modified. tag | Specifies a tag. | |
count | Used to return the number of graphic objects in the returned array. |
IlvTransformer* IlvManager::getTransformer | ( | const IlvView * | view | ) | const |
Returns the transformer associated with a manager view.
view | The manager view. |
IlvMgrView* IlvManager::getView | ( | const IlvView * | v | ) | const |
Returns the IlvMrgView
of a manager view.
IlvMrgView
representing the specified view. If v is not associated with the manager, the function returns 0
. v | The view. |
IlvLink* IlvManager::getViewHookList | ( | const IlvView * | view | ) | const |
Gets the view hooks of a manager view.
IlPoolOf(Pointer)
and should not be deleted or modified. view | The manager view. | |
count | Used to return the number of view hooks in the returned array. |
IlvManagerViewHook* const* IlvManager::getViewHooks | ( | const IlvView * | view, | |
IlUInt & | count | |||
) | const |
Gets the view hooks of a manager view.
IlPoolOf(Pointer)
and should not be deleted or modified. view | The manager view. | |
count | Used to return the number of view hooks in the returned array. |
Returns the array of views associated with the manager.
count | Used to return the number of views in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. virtual IlvGraphicSet* IlvManager::group | ( | IlUInt | count, | |
IlvGraphic *const * | objects | |||
) | [virtual] |
Groups several graphic objects.
Creates an IlvGraphicSet
object by grouping the graphic objects in the array. When objects are grouped, they lose all the manager-related information they contain (such as name, storage layer, and object interactor). You cannot retrieve this information, even when ungrouping.
count | The number of graphic objects in the array. | |
objects | The array of graphic objects. |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
Reimplemented in IlvGadgetManager.
void IlvManager::initReDraws | ( | ) |
Initializes the manager so that calls to IlvManager::invalidateRegion
can begin.
Called to initialize the manager before a series of calls to the member function IlvManager::invalidateRegion
begin. It empties the update region for every managed view. Calls to IlvManager::initReDraws
can be embedded so that the actual refresh only takes place when the last call to IlvManager::reDrawViews
is reached.
virtual void IlvManager::installAccelerators | ( | ) | [virtual] |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. void IlvManager::installDrawHook | ( | IlvManagerDrawHook * | hook | ) |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
IlBoolean IlvManager::installEventHook | ( | const IlvManagerEventHook * | hook | ) |
Installs an event hook on the manager.
The last event hook installed is the first to be called when an event occurs.
IlTrue
on success. If the hook is already installed on a manager, this member function does nothing and returns IlFalse
. hook | The event hook. |
IlBoolean IlvManager::installSelectionHook | ( | const IlvManagerSelectionHook * | hook | ) |
Sets a selection hook on the manager.
hook | The selection hook. |
IlTrue
on success. If the hook is already installed on a manager, the member function does nothing and returns IlFalse
. void IlvManager::installViewHook | ( | const IlvManagerViewHook * | hook | ) |
Adds a view hook to the manager.
Adds the hook to the list of handlers for the view to which the hook is attached. Previous hooks are not removed, but this one becomes the first to be called.
hook | The manager view hook. |
void IlvManager::invalidateRegion | ( | const IlvRegionUpdater & | updater, | |
const IlvGraphic * | g = 0 | |||
) |
Updates the invalidated region.
Uses the updater object to update the invalidated region and schedules a redraw task to happen before the process becomes idle.
updater | The object used to update the invalidated region. | |
g | An optional parameter to specify which graphic object requests the invalidation. |
IlvRegionUpdater::update
. Invalidates a rectangle in a manager view.
Adds a rectangle to the update region of the specified manager view and schedules a redraw task to happen before the process becomes idle.
view | The manager view. | |
rect | The rectangle, specified in manager coordinates. |
void IlvManager::invalidateRegion | ( | const IlvRect & | rect | ) |
Invalidates a rectangle.
Adds a rectangle to the update region in every view and schedules a redraw task to happen before the process becomes idle.
rect | The rectangle, specified in manager coordinates. |
void IlvManager::invalidateRegion | ( | const IlvGraphic * | object | ) |
Invalidates the bounding box of a graphic object.
Adds the bounding box of a graphic object to the update region in every view and schedules a redraw task to happen before the process becomes idle.
object | The graphic object. The object must be directly held by the manager, and indirectly through an other object like a IlvGraphicSet or IlvTransformer . |
IlBoolean IlvManager::isASelection | ( | const IlvGraphic * | object | ) | const |
Indicates if a graphic object is a selection object.
object | The graphic object. |
IlTrue
if the object is a selection (that is, a subtype of IlvDrawSelection
). Otherwise, it returns IlFalse
. Indicates whether double buffering is used for a manager view.
IlTrue
if double buffering is applied to the view, and IlFalse
otherwise. view | The manager view. |
IlBoolean IlvManager::isEditable | ( | const IlvGraphic * | object, | |
const IlvView * | ||||
) | const |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. IlBoolean IlvManager::isEditable | ( | const IlvGraphic * | object | ) | const |
Indicates whether a graphic object can be edited.
This property is used by the IlvSelectInteractor
class to check if object can be manipulated through its selection object. This property concerns the editing operations that are not a resize (see IlvManager::isResizeable
) or a translation (IlvManager::isMoveable
).
IlTrue
if this object can be edited, and IlFalse
otherwise. object | The graphic object. |
IlvDrawSelection::getSelectionInteractor
. IlBoolean IlvManager::isInApply | ( | ) | const |
Indicates if an applyTo...()
method is being executed.
IlTrue
if it is called from within a call to any apply member function. Use this function to avoid nested calls to apply...()
member functions. IlBoolean IlvManager::isInvalidating | ( | ) | const |
Indicates whether the manager is in a phase of invalidating regions.
IlTrue
if the manager has scheduled some redraw task to perform when the process is idle. Indicates whether a manager view preserves the x/y ratio.
IlTrue
if the manager view automatically respects the aspect ratio (that is, the x/y ratio) when its transformer is changed. Otherwise, it returns IlFalse
(which is the default). When the aspect ratio must be kept, the transformer set to view using IlvManager::setTransformer
or IlvManager::addTransformer
may be modified by the manager. This works correctly only for trivial rotations (multiple of 90 degrees). view | The manager view. |
IlBoolean IlvManager::isManaged | ( | const IlvGraphic * | object | ) | const |
Indicates whether a graphic object is stored by the manager.
IlTrue
if the given graphic object is stored in the manager. Otherwise, it returns IlFalse
. object | The graphic object. |
IlBoolean IlvManager::isModified | ( | ) | const |
Indicates whether the manager contents have been modified.
IlBoolean
value indicating the state of the manager. At the beginning, when no objects have yet been modified, the method returns IlFalse
. The state changes to IlTrue
when an object is modified or added. This is useful for checking the manager state before leaving the application without saving the information it contains. IlBoolean IlvManager::isMoveable | ( | const IlvGraphic * | object | ) | const |
Indicates if a graphic object can be moved.
IlTrue
if the object is moveable, and IlFalse
otherwise. object | The graphic object. |
IlBoolean IlvManager::isResizeable | ( | const IlvGraphic * | object | ) | const |
Indicates if a graphic object can be resized.
IlTrue
if the object can be resized, and IlFalse
otherwise. object | The graphic object. |
virtual IlBoolean IlvManager::isSelectable | ( | const IlvGraphic * | obj | ) | const [virtual] |
Indicates if a graphic object can be selected.
IlTrue
if the object can be selected, and IlFalse
otherwise. IlBoolean IlvManager::isSelectable | ( | int | layer | ) | const |
Indicates if a manager layer allows the selection of its graphic objects.
IlTrue
if the layer allows the selection of the graphic objects it stores. Otherwise, the function returns IlFalse
. layer | The index of the manager view. |
IlBoolean IlvManager::isSelected | ( | const IlvGraphic * | obj | ) | const |
Indicates if a graphic object is selected.
IlTrue
if the graphic object is selected, IlFalse
otherwise. IlBoolean IlvManager::isUndoEnabled | ( | ) | const |
Indicates whether the manager lets you undo commands.
IlTrue
if the undo process is enabled. Otherwise, it returns IlFalse
. IlBoolean IlvManager::isVisible | ( | const IlvGraphic * | g, | |
IlvView * | view | |||
) | const |
Indicates whether a graphic object is visible in a manager view.
IlTrue
if the object is visible in the manager view. To be considered as visible in a view, a graphic object must be visible for the manager (see IlvManager::isVisible(const IlvGraphic*)
), and the layer it is stored in must be visible in the manager view. If any of these conditions are not verified, the method returns IlFalse
. IlBoolean IlvManager::isVisible | ( | const IlvGraphic * | object | ) | const |
Indicates whether a graphic object is visible.
IlTrue
if the graphic object can be visible (that is, displayed at draw time by the manager), or IlFalse
if the object cannot be visible. object | The graphic object. |
Indicates the visibility of a layer in a manager view.
The visibility of a layer has two levels: a global level for the manager, and a local level stored by each manager view. A layer is considered to be visible in a manager view if it is visible both for the manager and for the view.
IlTrue
if the layer is visible for both the manager and the manager view. view | The manager view. | |
layer | The index of the layer. |
IlBoolean IlvManager::isVisible | ( | int | layer | ) | const |
Indicates whether a layer is considered visible by the manager.
IlTrue
if the layer is visible from the manager point of view. The layer may still be hidden in a manager view. layer | The index of the layer. |
IlvGraphic* IlvManager::lastContains | ( | int | layer, | |
const IlvPoint & | p, | |||
const IlvView * | view | |||
) | const |
Returns the graphic object containing a given point in a layer.
layer | The index of the manager layer. | |
p | Specifies the point in the view coordinate system. | |
view | The manager view. |
virtual IlvGraphic* IlvManager::lastContains | ( | const IlvPoint & | p, | |
const IlvView * | view | |||
) | const [virtual] |
Returns the graphic object containing a given point.
p | Specifies the point in the view coordinate system. | |
view | The manager view. |
Arranges the selected graphic objects in a column.
Builds a column by moving all the selected objects in the order in which they were selected.
spacing | Specifies the vertical distance between objects. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
Arranges the selected graphic objects in a row.
Builds a row by moving all the selected objects in the order in which they were selected. The spacing parameter is the horizontal distance between objects.
spacing | Specifies the horizontal distance between objects. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
virtual void IlvManager::moveLayer | ( | int | from, | |
int | to, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
void IlvManager::moveObject | ( | IlvGraphic * | object, | |
IlvPos | x, | |||
IlvPos | y, | |||
IlBoolean | redraw = IlTrue | |||
) |
Moves a graphic object.
Moves the upper left corner of a graphic object to the specified coordinates expressed in the object coordinate system.
This member function performs a call to IlvManager::translateObject
.
object | The graphic object. | |
x | The new horizontal coordinate. | |
y | The new vertical coordinate. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the object. |
IlUInt IlvManager::numberOfSelections | ( | ) | const |
Returns the number of selected graphic objects.
IlvGraphic* const* IlvManager::objects | ( | int | layer, | |
IlUInt & | count | |||
) | const |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. IlvGraphic* const* IlvManager::objects | ( | IlUInt & | count | ) | const |
Returns all graphic objects containing a given point in a layer.
layer | The index of the manager layer. | |
p | Specifies the point in the view coordinate system. | |
view | The manager view. | |
count | Used to return the number of objects in the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. virtual void IlvManager::paste | ( | const IlvView * | view, | |
const char * | str, | |||
IlvPoint & | location | |||
) | [virtual] |
Reads graphic objects from a string.
Reads a set of objects from the specified string and adds them to the manager at a given location. The string may be considered as the contents of an Rogue Wave Views data file.
view | The manager view. | |
str | The string containing the object descriptions. | |
location | Specifies, in the view coordinate system, the top-left corner of the bounding box of all the new graphic objects. |
Reads graphic objects from the clipboard and adds them to the manager.
Reads a set of graphic objects from the clipboard and adds them to the manager at a given location. It uses the IlvManager::paste
member function.
view | The manager view. | |
location | Specifies, in the view coordinate system, the top-left corner of the bounding box of all the new graphic objects. |
virtual void IlvManager::pop | ( | IlvGraphic * | object, | |
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Moves a graphic object higher in the drawing stacking order.
Gives the object a higher display priority. To perform this, the manager behaves differently depending on how the object is stored:
The object is stored in a complex data structure.The object is moved to an upper layer, if there is one (otherwise, no further action is performed).
The object is stored in a list (that is, the number of the object in the layer is less than the maxInList parameter of the constructor for this manager). The object is moved to the end of the list, so that it will be displayed last.
object | The graphic object. | |
redraw | Specifies whether the manager must redraw the invalidated region occupied by the object. |
virtual void IlvManager::push | ( | IlvGraphic * | object, | |
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Moves a graphic object lower in the drawing stacking order.
Gives the object a lower display priority. Depending on whether the object is stored in a list or a more complex data structure (see the explanations of the member function IlvManager::pop
), the object is moved to the beginning of the layer object list, or to a lower layer, if there is one.
object | The graphic object. | |
redraw | Specifies whether the manager must redraw the invalidated region occupied by the object. |
void IlvManager::pushInteractor | ( | IlvManagerViewInteractor * | e | ) |
Dispatches an event to the appropriate graphic objects.
Called by the manager event handler for every incoming user event when no view interactor was set in the view where the event occurred. It checks whether there is an object under the cursor. If there is one and if it is associated with an interactor, the event handler propagates the event to the interactor.
IlTrue
if the object interactor handled the event. If there is no object under the pointer or if its object interactor cannot handle the event, the returned value is IlFalse
. virtual void IlvManager::read | ( | const char * | filename | ) | [virtual] |
Loads an Rogue Wave Views data file.
Reads a set of graphic objects from the file named filename. The function calls the other member function IlvManager::read
with a stream as argument.
filename | The file name. If it is a relative path, the file is searched for in each directory referenced in the display path. |
IlvManager::save
member function for more information. Both the IlvEdit
and Studio
editors use the text mode. virtual void IlvManager::read | ( | ILVSTDPREF istream & | stream | ) | [virtual] |
Creates an IlvManagerInputFile
from an input stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerInputFile
subclass adapted to their needs.
IlvManagerInputFile
, or a subclass. stream | The input stream. |
virtual void IlvManager::read | ( | istream & | stream | ) | [virtual] |
Reads a set of graphic objects from the specified input stream.
The function creates an instance of IlvManagerInputFile
from the stream and calls the IlvManagerInputFile::readAll
member function.
stream | The input stream. |
virtual void IlvManager::reDo | ( | IlBoolean | unused | ) | [virtual] |
Executes again the last canceled command.
unused | This parameter is not used. It has been added to force an compilation error for the users of Views 5.1.x or previous. Because this function has been replaced by the repeat function to enable to the reDo function have the good behaviour. |
void IlvManager::reDraw | ( | IlUInt | count, | |
const IlvGraphic *const * | objects, | |||
IlBoolean | erase = IlTrue | |||
) | const |
Draws a set of graphic objects in all manager views.
Draws all the graphic objects of the specified array in all managed views.
count | The number of graphic objects in the array. | |
objects | The array of graphic objects. | |
erase | Indicates whether each object bounding box must be erased before the objects are drawn. |
void IlvManager::reDraw | ( | const IlvGraphic * | object, | |
IlBoolean | erase = IlTrue | |||
) | const |
Draws a graphic object in all manager views.
object | The graphic object. | |
erase | Indicates whether the object bounding box must be erased before the object is drawn. |
void IlvManager::reDraw | ( | ) | const |
Erases all manager views and draws the contents of the manager.
Erases all the managed views and then calls the first member function IlvManager::draw
.
void IlvManager::reDrawViews | ( | IlBoolean | erase = IlTrue |
) |
Draws the invalidated regions.
Draws the update region in all the manager views. The update region is the sum of all the areas specified in previous calls to IlvManager::invalidateRegion
.
erase | Indicates whether invalidated regions must be erased before drawing. |
void IlvManager::registerCallback | ( | const char * | callbackName, | |
IlvGraphicCallback | callback | |||
) |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
void IlvManager::removeAccelerator | ( | IlvManagerAccelerator * | ) |
Adds an accelerator to the manager.
Creates an IlvManagerAccelerator
using the same arguments and adds it to the manager. If the accelerator already matches an action in the manager accelerator watch list (see IlvAccelerator::match
), the action in the list is replaced by the action described in the function parameters. Accelerator actions are called by the IlvManager::shortCut
method, which uses IlvAccelerator::trigger
to check whether an accelerator must be activated.
f | The user function used as accelerator action. | |
type | The accelerator event type. | |
buttonOrKey | The accelerator event data. | |
modifiers | The accelerator mandatory event modifiers. | |
userArg | The accelerator action user argument. | |
optModifiers | The accelerator optional event modifiers. |
void IlvManager::removeAccelerator | ( | IlvEventType | type, | |
IlUShort | buttonOrKey = 0 , |
|||
IlUShort | modifiers = 0 | |||
) |
Removes the accelerator matching the event description.
Looks for an accelerator matching the event description and removes it from the manager event handler. Managers have built-in accelerators, which are listed below. You can disconnect them by setting the accelerators parameter of the manager constructor to IlFalse
.
Event Type |
Key or button |
Action |
---|---|---|
IlvKeyUp | f |
Modifies the zoom factor of the view so that all objects can be seen (f for fit) |
IlvKeyUp | F |
Fits and preserves ratio |
IlvKeyUp | i |
Sets the transformer of the view to the identity matrix. |
IlvKeyUp
| p
| Moves selected objects to an upper layer. |
IlvKeyUp
| P
| Moves selected objects to a deeper layer. |
IlvKeyUp
| Ctrl-D
| Duplicates all selected objects and moves the copied object slightly. |
IlvKeyUp
| Ctrl-A
| Selects all objects |
IlvKeyUp
| Ctrl-S
| Selects the object designated by the pointing device. |
IlvKeyUp
| <Del>
| Deletes all selected objects. |
IlvKeyDown
| r
| Re-executes last command. |
IlvKeyDown
| u
| Undoes last command. |
IlvKeyUp
| Ctrl-G
| Groups selected objects into one. |
IlvKeyUp
| Ctrl-U
| Ungroups an IlvGraphicSet . |
IlvKeyDown
| <Right>
| Translates the view to the left. |
IlvKeyDown
| <Left>
| Translates the view to the right. |
IlvKeyDown
| <Down>
| Translates the view to the top. |
IlvKeyDown
| <Up>
| Translates the view to the bottom. |
IlvKeyUp
| Z
| Zooms into the view. |
IlvKeyUp
| U
| Zooms out of the view. |
IlvKeyUp
| Ctrl-B
| Deselects all objects. |
IlvKeyUp
| Ctrl-T
| Inverts all selected objects. |
IlvKeyUp
| Y
| Horizontally flips the selected objects. |
IlvKeyUp
| y
| Vertically flips the selected objects. |
IlvKeyUp
| .(dot)
| Flips the selected objects both horizontally and vertically. |
IlvKeyUp
| Ctrl-C
| Copies selected objects into the clipboard. |
IlvKeyDown
| Ctrl-V
| Inserts objects from the clipboard. |
IlvKeyUp
| Ctrl-X
| Deletes selected objects but saves them into the clipboard. |
IlvKeyDown
| R
| Rotates the view 90 degrees counter-clockwise. |
IlvKeyDown
| C
| Centers the view on the indicated point. |
IlvKeyUp
| T
| Encapsulates relevant object in an
IlvTransformedGraphic . |
type | The event type. | |
buttonOrKey | The event data. | |
modifiers | The event modifiers. |
void IlvManager::removeAccelerators | ( | ) |
Removes all accelerators.
This method removes all accelerators from the manager.
void IlvManager::removeCallback | ( | const char * | callbackName | ) |
Registers a callback and its name.
Associates the user callback function with a string that will be used as its name. This string will be registered using the IlSymbol
class.
callbackName | The character string. | |
callback | The user function. |
void IlvManager::removeDrawHook | ( | IlvManagerDrawHook * | hook | ) |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
IlvManagerEventHook* IlvManager::removeEventHook | ( | const IlvManagerEventHook * | hook | ) |
Removes and returns an event hook installed on the manager.
You can then delete the returned value if it is no longer needed, or install the hook on another manager.
0
. hook | The manager hook. |
void IlvManager::removeInteractor | ( | const IlvView * | view | ) |
Removes the view interactor from a manager view.
The interactor is detached from the view. All events occuring in the view are then handled by the object interactors and accelerators (if they exist). This method removes all references to the view in the interactor.
view | The manager view. |
IlvManagerLayer* IlvManager::removeLayer | ( | IlvManagerLayer * | ) |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
void IlvManager::removeLayer | ( | int | layer = -1 |
) |
Removes a layer from the manager.
Removes a layer from the manager and deletes all the graphic objects stored in this layer. A manager cannot have less than two layers.
layer | Indicates the index of the layer to remove. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to remove the last (topmost) layer. |
virtual IlBoolean IlvManager::removeObject | ( | IlvGraphic * | object, | |
IlBoolean | redraw = IlTrue , |
|||
IlBoolean | destroyIt = IlTrue | |||
) | [virtual] |
Removes a graphic object from the manager set.
When the object is removed from the manager, all the properties related to the manager are removed. However, the other properties (for example, the object name, its named properties, and so on) remain attached to the object itself.
object | The graphic object. | |
redraw | Indicates whether the manager must immediately redraw the area occupied by the object. | |
destroy | Indicates whether the manager must delete the object after removing it. |
IlFalse
on error (the object cannot be removed) and IlTrue
on success. IlvManager::addObject
member function. IlvManagerSelectionHook* IlvManager::removeSelectionHook | ( | const IlvManagerSelectionHook * | hook | ) |
Removes the selection hook from the manager, if it is installed.
If the hook is not installed on a manager, the member function does nothing.
hook | The selection hook. |
0
otherwise. You can delete the returned value if it is no longer needed, or install the hook on another manager. virtual IlBoolean IlvManager::removeSmartSet | ( | IlvSmartSet * | set | ) | [virtual] |
Removes a smartset from the manager.
The objects are renamed to their intrinsic name.
IlFalse
on error, that is, if the smartset is not in this manager. set | The smartset. |
Removes graphic objects associated with a given tag.
Removes from the manager all the objects associated with the specified tag.
tag | Specifies a tag. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
Removes a view from the manager view list.
The view is no longer handled by the manager.
view | The manager view. |
IlTrue
on success, and IlFalse
on error (the view could not be detached). Reimplemented in IlvGadgetManager.
void IlvManager::removeViewHook | ( | const IlvManagerViewHook * | hook | ) |
Removes a view hook from the manager.
Disconnects the hook from the manager view to which the hook is attached.
hook | The manager view hook. |
IlvManagerLayer* IlvManager::replaceLayer | ( | IlvManagerLayer * | newLayer, | |
int | index | |||
) |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
virtual void IlvManager::reshapeObject | ( | IlvGraphic * | object, | |
const IlvRect & | bbox, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Resizes a graphic object to fit in a rectangle.
Modifies the object size so that its new bounding box becomes the specified rectangle.
object | The graphic object. | |
bbox | The rectangle. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the object. |
void IlvManager::rotateView | ( | const IlvView * | view, | |
const IlvPoint & | point, | |||
IlFloat | angle, | |||
IlBoolean | redraw = IlTrue | |||
) |
Rotates the contents of a manager view.
Applies a rotation to the manager view transformer.
view | The manager view. | |
point | Specifies the invariant point of the transformation. | |
angle | The rotation angle in degrees. | |
redraw | Indicates whether the manager must redraw the objects in the view after the transformation. |
virtual void IlvManager::sameHeight | ( | IlBoolean | redraw = IlTrue |
) | [virtual] |
Resizes the selected graphic objects to the same height.
Makes the height of all selected objects the same as the first selected object.
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
virtual void IlvManager::sameWidth | ( | IlBoolean | redraw = IlTrue |
) | [virtual] |
Resizes the selected graphic objects to the same width.
Makes the width of all selected objects the same as the first selected object.
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
virtual void IlvManager::save | ( | ILVSTDPREF ostream & | stream | ) | const [virtual] |
Creates an IlvManagerInputFile
from an input stream.
This method can be overloaded by subclasses, allowing them to create an IlvManagerInputFile
subclass adapted to their needs.
IlvManagerInputFile
, or a subclass. stream | The input stream. |
virtual void IlvManager::save | ( | ostream & | stream | ) | const [virtual] |
Saves all the graphic objects in an output stream.
The function gets the graphic objects with IlvManager::getObjects
, creates an instance of IlvManagerOutputFile
from stream, and calls its IlvManagerOutputFile::saveAll
member function.
stream | The output stream. |
virtual void IlvManager::selectAll | ( | IlBoolean | redraw = IlTrue |
) | [virtual] |
Selects all the objects of the manager.
redraw | Specifies whether the manager must refresh its views. |
static void IlvManager::Set | ( | IlvView * | view, | |
IlvManager * | manager | |||
) | [static] |
Composes a manager view transformer with another transformer.
Computes the product of the manager view transformer and t and sets the result on the view. The transformer is internally copied during this function call.
view | The manager view. | |
t | The transformer. |
virtual void IlvManager::setBackground | ( | IlvView * | view, | |
IlvColor * | color, | |||
IlvBitmap * | bitmap = 0 | |||
) | [virtual] |
Sets the background of a manager view.
Sets the color used to erase the double buffering bitmap for the view. When the view is set to double buffering mode, the color is initially updated to the background color of the view. If you change the view background color and want to set the double buffering color accordingly, call this member function with this color. If a bitmap is specified, it will be used as the background for the view; this means that it will not remain as a single image but will be tiled to the size of the manager view. To remove properly a background bitmap that was previously set, you must do the following:
view->setBackgroundBitmap(0); // Remove the background bitmap manager->setBackground(view, view->getBackground()); // Update the manager manager->draw(view, IlTrue); // Redraw the view
view | The manager view. | |
color | The background color. | |
bitmap | The background bitmap. |
Reimplemented in IlvGadgetManager.
void IlvManager::setCleanFunction | ( | IlvApplyObject | func | ) |
Sets a function to be called when an object is removed from the manager.
func | Specifies a function to be called when an object stored in the manager is removed. This function is called with the object as the first parameter, and a user-defined parameter as a pointer to the manager. The function is called before the object is removed from the manager. |
void IlvManager::setClientData | ( | IlAny | data | ) |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
void IlvManager::setCreatorPalette | ( | IlvPalette * | palette | ) |
Sets the default palette used to create new graphic objects interactively.
palette | The palette. |
IlBoolean IlvManager::setDoubleBuffering | ( | const IlvView * | view, | |
IlBoolean | useDB, | |||
IlBoolean | tmp = IlFalse | |||
) |
Enables or disables double buffering for a manager view.
IlFalse
if the view is not handled by the manager, or if useDB is set to IlTrue
and the double buffering bitmap associated with view is not valid. Otherwise, it returns IlTrue
. view | The manager view. | |
useDB | IlTrue to enable double buffering and IlFalse to disable it. | |
tmp | Not documented |
void IlvManager::setDoubleBufferingColor | ( | IlvColor * | color | ) |
Indicates whether double buffering is used for a manager view.
IlTrue
if double buffering is applied to the view, and IlFalse
otherwise. view | The manager view. |
void IlvManager::setDoubleBufferingHandler | ( | IlvManagerDblBufferHandler * | ) |
Indicates whether double buffering is used for a manager view.
IlTrue
if double buffering is applied to the view, and IlFalse
otherwise. view | The manager view. |
void IlvManager::setEditable | ( | IlvGraphic * | object, | |
IlBoolean | editable | |||
) |
Indicates whether a graphic object can be edited.
object | The graphic object. | |
editable | IlTrue to set the object as editable and IlFalse otherwise. |
IlvEditableFilter* IlvManager::setEditableFilter | ( | IlvEditableFilter * | ) |
Adds a graphic object to a manager, and then names the object.
This function is equivalent to
addObject(object, redraw, layer); setObjectName(object, name);
If the object has a name that is already in use in the manager, the name is removed from the object. For more information, see the description of the IlvManager::addObject
member function.
name | Specifies the name to set on the object. | |
object | The graphic object. | |
redraw | Indicates whether the manager must immediately display the object. | |
layer | Specifies the layer index where the object must be inserted. The default value -1 indicates that the object is stored in the last (topmost) layer. |
IlvManager::addObject
member function. void IlvManager::setGrid | ( | IlvView *const | view, | |
IlvManagerGrid * | grid | |||
) |
Sets a manager grid on a manager view.
The grid already existing is disconnected, but not deleted.
view | The manager view. | |
grid | The manager grid. 0 is specified to disconnect the view from the current grid. |
void IlvManager::setInsertionLayer | ( | int | layer = -1 |
) |
Sets the layer where new objects created interactively using the predefined interactors will be stored.
layer | The index of the layer. |
void IlvManager::setInteractor | ( | IlvManagerViewInteractor * | i, | |
const IlvView * | view = 0 | |||
) |
Sets a view interactor on a manager view.
If the view is different from the one that was used when creating the interactor, you must first detach the interactor by using IlvManager::removeInteractor
.
i | The view interactor. 0 is not a valid value (use IlvManager::removeInteractor to detach an interactor from a view). | |
view | The manager view. If 0 is specified, the method uses the view used to create the interactor. |
void IlvManager::setKeepingAspectRatio | ( | const IlvView * | view, | |
IlBoolean | ratio = IlTrue , |
|||
IlBoolean | redraw = IlTrue | |||
) | const |
Sets or unsets the automatic preservation of the x/y ratio in a manager view.
If you request that the aspect ratio be kept, and if the view transformer does not respect this ratio, the transformer will be recomputed accordingly.
view | The manager view. | |
ratio | Set to IlTrue to respect the x/y ratio and IlFalse otherwise. | |
redraw | Indicates whether the manager must redraw the objects in the view if the transformer is changed. |
void IlvManager::setLayer | ( | IlvGraphic * | object, | |
int | layer, | |||
IlBoolean | redraw = IlTrue | |||
) |
Moves a graphic object to a given manager layer.
Moves a graphic object from its original manager layer to the specified manager layer.
object | The graphic object. | |
layer | The index of the destination manager layer. | |
redraw | Specifies whether the manager must redraw the invalidated region occupied by the object. |
IlvMakeSelection IlvManager::setMakeSelection | ( | IlvMakeSelection | func | ) |
Sets the function that creates a selection object for a graphic object.
Changes the function called to create the graphic object that represents the selection of an object. The function func is called when an object becomes selected. The function receives a pointer to this manager, and a pointer to the object itself. It then creates a selection object (a subtype of the IlvDrawSelection
graphic class) and returns a pointer to the object. This object is entirely managed by Rogue Wave Views, and removed when finished with.
The default behavior of a manager is to create an IlvDrawSelection
instance (one having eight square handles) that fits the object bounding box. However, you may need to have another type of selection object. To create this new type of selection object, subtype the IlvDrawSelection
class and create a function that instantiates this class depending of the type of the graphic object selected. This function is the parameter to the IlvManager::setMakeSelection
member function.
func | The new selection function. |
IlvSelectionInterface
class. It allows you to associate different subclasses of IlvDrawSelection
with different subclasses of IlvGraphic
. IlvSelectionInterface
IlvManagerLayerFactory* IlvManager::setManagerLayerFactory | ( | IlvManagerLayerFactory * | ) |
Adds a layer to the manager.
This method allows you to add instances of IlvManagerLayer
subclasses.
layer | Specifies a pointer to a layer object. | |
position | Indicates the layer index where this new layer is inserted. Any invalid value (such as -1 or a number greater than the number of layers) indicates that you want to create a new layer on top of all the others. |
void IlvManager::setModified | ( | IlBoolean | value | ) |
Sets the modification status of the manager.
value | IlTrue to set the manager status as modified, IlFalse to unset it. |
void IlvManager::setMoveable | ( | IlvGraphic * | object, | |
IlBoolean | moveable | |||
) |
Sets the moveability of a graphic object.
object | The graphic object. | |
moveable | IlTrue to set the object as moveable, and IlFalse otherwise. |
virtual void IlvManager::setName | ( | const char * | name | ) | [virtual] |
Sets the name of the manager.
name | The new name. The string is copied. |
void IlvManager::setNumLayers | ( | int | numLayers | ) |
Sets the number of manager layers.
Sets the number of layers handled by the manager to the specified value. Although there is no limit to the number of layers allowed, having a large number of layers is not recommended for reasons of efficiency. The maximum should probably not exceed 100
to 200
layers. You can use this method to add layers, but not to remove them.
numLayers | The number of layers. |
IlBoolean IlvManager::setObjectInteractor | ( | IlvGraphic * | object, | |
IlvManagerObjectInteractor * | i | |||
) |
Sets an object interactor on a graphic object.
If an interactor is already set on this object, it is replaced but not deleted. This way you can use it with other objects.
IlTrue
if the interactor is properly associated with the object (that is, the interactor accepts the connection to the object). Otherwise, the returned value is IlFalse
. object | The graphic object. | |
i | The object interactor. |
virtual IlBoolean IlvManager::setObjectName | ( | IlvGraphic * | object, | |
const char * | name | |||
) | [virtual] |
Sets the name of a graphic object in the manager.
Object names must be unique in a given manager. Trying to give the same name to two different objects results in an error and the function returns IlFalse
. You can rename an object by calling IlvManager::setObjectName
with a different string, or you can delete an object name by setting its name to 0
when calling the function. An attempt to erase the name of an unnamed object is considered to be an error.
object | The graphic object. | |
name | The name to set on the graphic object. |
IlTrue
on success, and IlFalse
on failure. void IlvManager::setReDrawMode | ( | IlvReDrawMode | reDrawMode | ) |
Sets the redraw mode of the manager.
The redraw mode determines the way the manager redraws objects after a call to a method modifying objects, such as IlvManager::applyToObjects
or changeValues
.
reDrawMode | Can only take the value IlvReDrawAll or IlvReDrawObjects . IlvReDrawAll indicates that all the objects of the manager intersecting the region enclosing the modified objects are redrawn. This is the default mode. IlvReDrawObjects indicates that only modified objects must be redrawn (for example, the objects passed to IlvManager::applyToObjects ). |
void IlvManager::setResizeable | ( | IlvGraphic * | object, | |
IlBoolean | resizable | |||
) |
Sets a graphic object as resizable or not resizable.
object | The graphic object. | |
resizable | IlTrue to set the object as resizable, and IlFalse otherwise. |
virtual void IlvManager::setSelectable | ( | IlvGraphic * | object, | |
IlBoolean | selectable | |||
) | [virtual] |
Sets a graphic object as selectable or not selectable.
Sets the selectable attribute of the object object to the value of selectable.
object | The graphic object. | |
selectable | IlTrue to set the object as selectable, and IlFalse otherwise. |
void IlvManager::setSelectable | ( | int | layer, | |
IlBoolean | selectable | |||
) |
Enables or disables the selection of graphic objects in a manager layer.
Sets the selectable attribute of the layer to the value of the selectable parameter.
layer | The index of the manager view. | |
selectable | IlTrue to enable the selection in the layer, and IlFalse to disable it. |
virtual void IlvManager::setSelected | ( | IlvGraphic * | object, | |
IlBoolean | selected = IlTrue , |
|||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Selects or deselects a graphic object.
Selects or deselects an object in the manager.
object | The graphic object. | |
selected | IlTrue if the graphic object must be selected, IlFalse otherwise. | |
redraw | Specifies whether the manager must redraw the invalidate region occupied by the selection object. |
Reimplemented in IlvGadgetManager.
void IlvManager::setTaggedObjectsSelected | ( | const IlSymbol * | tag, | |
IlBoolean | selected = IlTrue , |
|||
IlBoolean | redraw = IlTrue | |||
) |
Selects or deselects the graphic objects associated with a given tag.
Sets the selected state of the objects associated with the specified tag.
tag | Specifies a tag. | |
selected | Indicates whether the graphic objects must be selected. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the selection objects. |
virtual void IlvManager::setTransformer | ( | const IlvView * | view, | |
IlvTransformer * | t = 0 | |||
) | [virtual] |
Sets a transformer to a manager view.
Associates a transformer to a manager view. The transformer will be used to draw the graphic objects in this view. The transformer is internally copied during this function call.
view | The manager view. | |
t | The transformer. |
void IlvManager::setUndoEnabled | ( | IlBoolean | enable | ) |
Enables or disables the possibility of undoing commands in the manager.
enable | IlFalse to disable Undo, IlTrue to enable it (this is the default state of the manager). |
void IlvManager::setVisible | ( | IlvGraphic * | object, | |
IlBoolean | visible, | |||
IlBoolean | redraw = IlFalse | |||
) |
Sets the visibility of a graphic object in the manager to visible. The method calls the IlvManagerViewHook::contentsChanged
member function of the hook objects that are linked to the manager. This member function does not redraw the bounding box of the object.
object | The graphic object. | |
visible | IlTrue to set the object as visible, and IlFalse to make it invisible. | |
redraw | Specifies whether the manager must redraw its contents. |
Sets the visibility of a layer for a manager view.
Sets the visibility attribute of a layer from the perspective of a manager view.
view | The manager view. | |
layer | The index of the layer. | |
visible | IlTrue to set the layer as visible. |
void IlvManager::setVisible | ( | int | layer, | |
IlBoolean | visible | |||
) |
Sets the visibility of a layer for the manager.
Sets the visibility attribute of a layer from the manager perspective.
layer | The manager layer. | |
visible | IlTrue to set the layer as visible. |
Dispatches an incoming event to manager accelerators.
Called when IlvManager::dispatchToObjects
has returned IlFalse
. It is typically called by the member function of the view interactors IlvManagerViewInteractor::handleEvent
, when these interactors cannot parse the incoming events. The function checks whether the event triggers one of the accelerators stored in the manager (see IlvAccelerator::trigger
).
IlTrue
if a matching accelerator is found; the accelerator action is then called. If no matching accelerator is found, IlFalse
is returned. event | The incoming event. | |
view | The manager view. |
Moves a given point to the closest grid point on a manager view.
If no grid is currently associated with the view, the point is not modified.
view | The manager view. | |
p | Specifies the point in the view coordinate system. This parameter is modified to hold the return value, which is also expressed in the view coordinate system. |
IlvGraphic* const* IlvManager::sortObjects | ( | IlvGraphic *const * | objs, | |
IlUInt | count | |||
) | const |
Sorts a set of object.
The objects are sorted by redraw order.
objs | The objects array which must be sorted. | |
count | The object count of the array. |
IlPoolOf(Pointer)
and should not be deleted or modified. void IlvManager::swapLayers | ( | int | layer1, | |
int | layer2, | |||
IlBoolean | redraw = IlTrue | |||
) |
Swaps the contents of two manager layers.
The objects originally in layer1 are moved to layer2, and the objects originally in layer2 are moved to layer1.
layer1 | The index of a manager layer. | |
layer2 | The index of another manager layer. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the objects. |
Transforms and moves a given point on a manager view to the closest grid point in the manager coordinate system.
The point given in parameter is first transformed in the manager coordinate system, and then snapped to the grid of the manager view. If no grid is currently associated with the view, the point is not snapped to the grid but just converted in the manager coordinate system.
view | The manager view. | |
p | Specifies the point in the view coordinate system. This parameter is modified to hold the return value, which is expressed in the coordinate system of the manager. |
IlFalse
if the view is not associated with the manager, otherwise IlTrue
. virtual void IlvManager::translateObject | ( | IlvGraphic * | object, | |
IlvPos | dx, | |||
IlvPos | dy, | |||
IlBoolean | redraw = IlTrue | |||
) | [virtual] |
Translates a graphic object.
Translates the upper left corner of a graphic object by the specified offsets expressed in the object coordinate system.
object | The graphic object. | |
dx | The horizontal translation offset. | |
dy | The vertical translation offset. | |
redraw | Specifies whether the manager must redraw the invalidated regions occupied by the object. |
void IlvManager::translateView | ( | const IlvView * | view, | |
IlvPos | dx, | |||
IlvPos | dy, | |||
IlBoolean | redraw = IlTrue | |||
) |
Scroll the contents of a manager.
Applies a translation to the manager view transformer to scroll the graphic objects.
view | The manager view. | |
dx | Translation along the horizontal axis. | |
dy | Translation along the vertical axis. | |
redraw | Indicates whether the manager must redraw the objects in the view after the transformation. |
virtual void IlvManager::unGroup | ( | IlvGraphic * | object, | |
IlBoolean | undoCommand = IlTrue | |||
) | [virtual] |
Ungroups the graphic objects of a graphic set.
Ungroups an IlvGraphicSet
. The objects keep the same position and shape they have when they are ungrouped.
object | The graphic set. If it is not a subclass of IlvGraphicSet , nothing is done. | |
undoCommand | IlFalse indicates that you do not want to store this action in the command stack of the manager. |
void IlvManager::unregisterCallback | ( | const char * | callbackName | ) |
Removes the callback function registered with the specified name from the callback list.
callbackName | The callback name. |
Draws a graphic object in a manager view by means of a temporary pixmap.
Draws a graphic object in a manager view using a technique similar to double-buffering: the drawings are done in a hidden pixmap, then the pixmap is displayed in the manager view at once. Unlike with true double-buffering, the pixmap is temporary and has the size of the object bounding box, not the whole view.
view | The manager view. | |
object | The graphic object. |
Reimplemented in IlvGadgetManager.
IlvDrawSelection* IlvManager::whichSelection | ( | const IlvPoint & | p, | |
const IlvView * | view | |||
) | const |
Returns the selection object located at the given location.
Accomplishes the same task as the IlvManager::lastContains
member function but only on selected objects. It is generally used to get the selected object located at the cursor location.
0
if there is none. p | The point, in the coordinate system of the view. | |
view | The manager view. |
void IlvManager::zoomView | ( | const IlvView * | view, | |
const IlvPoint & | point, | |||
IlFloat | scalex, | |||
IlFloat | scaley, | |||
IlBoolean | redraw = IlTrue | |||
) |
Zoom the contents of a manager view.
Applies a zooming factor to the manager view transformer.
view | The manager view. | |
point | Specifies the invariant point of the transformation. | |
scalex | Zooming factor on the horizontal axis. | |
scaley | Zooming factor on the vertical axis. | |
redraw | Indicates whether the manager must redraw the objects in the view after the transformation. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.