GLG Toolkit, C / C++ API Library  Version 4.6
Editing Mode Functions

This group contains supporting functions for the drawing editing functionality. More...

Detailed Description

This group contains supporting functions for the drawing editing functionality.

See Object Configuration functions of the Intermediate API and Editing Objects functions of the Extended API for more object editing functionality.

Functions

void GlgSetBrowserObject (GlgObject browser, GlgObject object)
 Sets the object for browsing with the GLG Resource, Tag and Alarm browser widgets. More...
 
GlgBoolean GlgSetBrowserSelection (GlgObject object, char *resource_name, char *selection, char *filter)
 Sets a new value of a browser's Selection and Filter text boxes of the Resource, Tag, Alarm and Data browser widgets after the browser object has already been set up. More...
 
GlgBoolean GlgSetEditMode (GlgObject viewport, char *resource_name, GlgBoolean edit_mode)
 Sets the viewport's edit mode to disable input objects in the viewport while the drawing is being edited. More...
 

Function Documentation

◆ GlgSetBrowserObject()

void GlgSetBrowserObject ( GlgObject  browser,
GlgObject  object 
)

Sets the object for browsing with the GLG Resource, Tag and Alarm browser widgets.

Parameters
browserA viewport of the Resource, Tag or Alarm browser widget.
objectAn object to browse.

The browser widget will display the object's resources, tags or alarms depending on the type of the browser widget.

◆ GlgSetBrowserSelection()

GlgBoolean GlgSetBrowserSelection ( GlgObject  object,
char *  resource_name,
char *  selection,
char *  filter 
)

Sets a new value of a browser's Selection and Filter text boxes of the Resource, Tag, Alarm and Data browser widgets after the browser object has already been set up.

Parameters
objectA viewport of the browser widget or its parent.
resource_nameA resource path to access the browser from the parent supplied by the object parameter, or NULL if the object parameter supplies the browser's viewport.
selectionA new selection string.
filterA new filter string.
Returns
Success or failure status.

Setting a new selection will display a new list of matching entries. Before the browser's drawing hierarchy has been set up, the Selection and Filter fields of the browser widget may be set via the corresponding resources. To change Selection or Filter after hierarchy setup, this function should be used.

◆ GlgSetEditMode()

GlgBoolean GlgSetEditMode ( GlgObject  viewport,
char *  resource_name,
GlgBoolean  edit_mode 
)

Sets the viewport's edit mode to disable input objects in the viewport while the drawing is being edited.

Parameters
viewportA viewport object (either a Viewport or a Light Viewport) to set the editing mode of, or its parent.
resource_nameA resource path to access the viewport from the parent supplied by the viewport parameter, or NULL to set the editing mode of the viewport specified by the viewport parameter.
edit_mode
  • True to set the editing mode
  • False to cancel the editing mode.
Returns
Success or failure status.

If the viewport's edit mode is turned on, input objects in the viewport will not react to the mouse and keyboard events. The rest of the input objects outside of the viewport will still be active. The edit mode is inherited by all child viewports.

The edit mode is usually set for viewports that serve as a drawing area; the edit mode ensures that the input objects do not react to mouse clicks when they are dragged with the mouse to a new position. This is similar to the behavior of the Graphics Builder's Drawing Area.

The edit mode is global and may be set only for one viewport used as a drawing area. Setting the edit mode of a new viewport resets the edit mode of the previous viewport. A viewport's edit mode is inherited by all its child viewports.