11. Summary of Exported Objects and Slots

This chapter provides a summary of all the objects and slots exported by Amulet that the normal Amulet programmer will use. The specifics of the operation of the objects are discussed in other chapters of this manual.

11.1 Am_Style

11.1.1 Constructors and Creators

11.1.2 Style Accessors

The following methods of Am_Style are available to query the properties of styles:

11.1.3 Color styles

11.1.4 Thick and dashed line styles

11.1.5 Stippled styles

11.1.6 Am_No_Style

The special Am_Style Am_No_Style is used when you do not want an object to have a line or fill style (transparent fill or line style). It can be used interchangeably with NULL.

11.2 Am_Font

11.2.1 Constructors and Accessors

Am_Font (Am_Font_Family_Flag family = Am_FONT_FIXED,
         bool is_bold = false,
         bool is_italic = false,
         bool is_underline = false,
         Am_Font_Size_Flag size = Am_FONT_MEDIUM)

Am_Font (const char* the_name)

void Get(Am_String &name,
	   Am_Font_Family_Flag &f,
	   bool &is_bold,
	   bool &is_italic,
	   bool &is_underline,
	   Am_Font_Size_Flag &s);

11.2.2 Predefined Fonts

Am_Default_Font -- a fixed, medium-sized font
Am_Japanese_Font -- a fixed, medium-sized Kanji font

11.3 Am_Cursor

11.3.1 Constructors and Accessors

11.3.2 Predefined Cursor

Am_Default_Cursor -- use the default cursor for the window (usually an arrow)

11.4 Am_Time

Used (mostly by Animators) to represent time in a machine-independent way.

11.5 Predefined formula constraints

11.6 Opal Graphical Objects

11.6.1 Am_Graphical_Object

11.6.2 Am_Line

A single straight line segment from (x1, y1) to (x2, y2).

11.6.3 Am_Arrow_Line

Same as a line, only with an arrow head at one end. The size of the head is controlled by the slots Am_HEAD_WIDTH and Am_HEAD_LENGTH.

11.6.4 Am_Rectangle

11.6.5 Am_Arc

Am_Arc is used for circles, ellipses, and arc or pie shaped segments.

11.6.6 Am_Roundtangle

A rectangle with rounded corners.

11.6.7 Am_Polygon

A series of connected line segments, optionally filled.

11.6.8 Am_Text

A single line, single font text object.

11.6.9 Am_Bitmap

An image, either color or monochrome.

11.6.10 Am_Group

An invisible container object for grouping other graphical objects together.

11.6.10.1 Am_Resize_Parts_Group

This group has the same slots as an Am_Group, but when resized, it resizes its parts proportionately, instead of simply clipping to the group's bounding box.

11.6.10.2 Am_Fade_Group

Same as Am_Group, but fades out using a halftone trick based on Am_VALUE slot.

11.6.10.3 Am_Flip_Book_Group

Displays one of the parts, determined by the Am_VALUE slot, which is the index of the one part to show.

11.6.11 Am_Map

A group that creates its parts as many instances of a prototype object.

11.6.12 Am_Window

11.7 Interactors

11.7.1 Am_Interactor

Do not make instances of Am_Interactor. Instead, use the specific interactors described on the following pages. Am_Interactor is used to create custom interactors.

.

11.7.2 Am_Choice_Interactor and Am_One_Shot_Interactor

11.7.3 Am_Move_Grow_Interactor

11.7.4 Am_New_Points_Interactor

11.7.5 Am_Text_Edit_Interactor

11.7.6 Am_Gesture_Interactor

11.8 Widget objects

11.8.1 Am_Border_Rectangle

A Motif-like rectangle with border.

11.8.2 Am_Button

A single button

11.8.3 Am_Button_Panel

Many related buttons, automatically laid out in a group, with one interactor running all of them.

11.8.4 Am_Radio_Button_Panel: Am_Button_Panel

A group of mutually exclusive radio-button style selection buttons.

11.8.5 Am_Checkbox_Panel: Am_Button_Panel

A group of checkbox-style selection buttons.

11.8.6 Am_Menu: Am_Button_Panel

A single menu panel

11.8.7 Am_Menu_Bar: Am_Menu

A menubar and its submenus.

11.8.8 Am_Option_Button

A button that brings up a menu of options to choose from.

11.8.9 Am_Pop_Up_Menu_Interactor

An Am_One_Shot_Interactor that pops up a menu.

11.8.10 Am_Vertical_Scroll_Bar

11.8.11 Am_Vertical_Up_Down_Counter

Like a vertical scroll bar without the indicator

11.8.12 Am_Scrolling_Group

A group with scroll bars.

11.8.13 Am_Text_Input_Widget and Am_Password_Input_Widget

A labeled text input field, for getting a single line of text from a user. The password widget displays ``*'' instead of the text typed.

11.8.14 Am_Number_Input_Widget

To input a number by typing it.

11.8.15 Am_Tab_To_Next_Widget_Interactor

Add this interactor to a window to allow the user to go from one Am_Text_Input_Widget or Am_Number_Input_Widget or Am_Password_Input_Widget to the next using the TAB key.

11.8.16 Am_Selection_Widget

Selection handles used to move and grow standard graphical objects.

11.8.17 Am_Text_Input_Dialog

A dialog box that displays informational text, a text input widget, and ``Okay'' and ``Cancel'' buttons.

11.8.18 Am_Choice_Dialog

A dialog box that displays informational text and ``Okay'' and ``Cancel'' buttons.

11.8.19 Am_Alert_Dialog

A dialog box that displays informational text and an ``Okay'' button.

11.9 Command Objects

11.9.1 Am_Command

Use this command object as a prototype for your custom commands.

11.9.2 Am_Menu_Line_Command

A menu line command is used to put a horizontal line in an Am_Menu or submenu widget.

11.9.3 Am_Selection_Widget_Select_All_Command

Select all of the widgets Am_SELECTION_WIDGET is allowed to select.

11.9.4 Am_Graphics_Set_Property_Command

Set the property of object(s) currently selected by Am_SELECTION_WIDGET.

11.9.5 Am_Graphics_Clear_Command

Delete the objects currently selected by Am_SELECTION_WIDGET.

11.9.6 Am_Graphics_Clear_All_Command

Delete all of the objects Am_SELECTION_WIDGET is allowed to select.

11.9.7 Am_Graphics_Cut_Command

Cut object(s) currently selected by Am_SELECTION_WIDGET to Am_CLIPBOARD.

11.9.8 Am_Graphics_Copy_Command

Copy object(s) currently selected by Am_SELECTION_WIDGET to Am_CLIPBOARD

11.9.9 Am_Graphics_Paste_Command

Paste object(s) from Am_CLIPBOARD.

11.9.10 Am_Graphics_Duplicate_Command

Duplicate objects selected by Am_SELECTION_WIDGET.

11.9.11 Am_Graphics_Group_Command

Create an Am_Resize_Group containing the currently selected objects.

11.9.12 Am_Graphics_Ungroup_Command

Ungroup a group created with the Group_Command.

11.9.13 Am_Undo_Command

Undo the last command on the undo stack.

11.9.14 Am_Redo_Command

Redo the last undone command on the undo stack.

11.9.15 Am_Graphics_To_Top_Command

Move the currently selected object(s) to the top of the Z-ordering.

11.9.16 Am_Graphics_To_Bottom_Command

Move the currently selected object(s) to the bottom of the Z-ordering.

11.9.17 Am_Show_Undo_Dialog_Box_Command

Show the selective undo dialog box. You need to #include UNDO_DIALOG__H to use this (see Section 1.8).

11.9.18 Am_Quit_No_Ask_Command

Quit the current application right now by calling Am_Exit_Main_Event_Loop().

11.10 Undo objects

11.10.1 Am_Undo_Handler

Instantiate this object to create custom undo handlers. Normally you should use an Am_Single_Undo_Object

11.10.2 Am_Single_Undo_Object

Undo or redo only a single command Add this as a part to a window.

11.10.3 Am_Multiple_Undo_Object

Undo multiple commands, and redo only the last undone command. Add this as a part to a window.:

11.10.4 Am_Undo_Dialog_Box

This is a complete dialog box used to handle selective undo of various commands. You need to #include UNDO_DIALOG__H to use this (see Section 1.8).

  Am_Cursor();
  Am_Cursor(Am_Image_Array image, Am_Image_Array mask,
            Am_Style fg_color, Am_Style bg_color);

  void Set_Hot_Spot (int x, int y);
  void Get_Hot_Spot (int& x, int& y) const;

  // Size will be zero until the image is drawn.  Get the size of an
  // image through Am_Drawonable::Get_Image_Size.
  void Get_Size (int& width, int& height);


Last Modified: 01:55pm EDT, August 13, 1997