Member directives

From Emergent

Jump to: navigation, search

See also Comment directives, Method directives, Property directives, Object directives, Enum directives

Contents

Maketa control

  • #IGNORE -- Does not register this member in the type information for this class.

Display: Show/Hide

  • #HIDDEN -- Hides member from user's view in edit dialogs and CSS type information printouts.
  • #HIDDEN_INLINE -- Hides member when inlined in another object, but not when edited itself. This only applies to members of #INLINE objects.
  • #SHOW -- Show this member in the edit dialog (i.e., even if it was marked #READ_ONLY).
  • #EXPERT -- show directive, like DETAIL etc.; especially for advanced parameters in net sims
  • #SHOW_TREE -- shows the member in the browse view, particularly when it would otherwise be hidden.
  • #HIDDEN_TREE -- don't show the member in the browse view, particularly when it would otherwise be shown.
  • #TREEFILT_xxx (see desc in ObjectDirectives)
  • #CONDSHOW_xxx -- see CONDEDIT below -- same, except completely shows or hides

Display: other

  • #LABEL_xxx -- Set the label for item (or menu or button) to be xxx.
  • #CONDEDIT_[ON|OFF]_mmm:vvv,vvv[&&,||mmm:vvv,vvv...] -- This makes editing a member conditional on the value (vvv) of another member(s) (mmm), with multiple such member comparisons joined by AND (&&) or OR (||) logic. For example: #CONDEDIT_OFF_type:NONE,LT_MAX specifies that this member is to be not editable (OFF) when the type enum variable is either NONE or LT_MAX. One alternatively specify ON for conditions when it should be editable. The comparison is based on the string representation of the member value -- sub-paths to members within contained objects can also be used. Also supports implicit bool semantics (including dotted submembers) -- no need to specify :true for bool items (or other obvious bool vals)
  • #DEF_xxx -- Specifies a default value for the member. If the field is set to a value other than this default value, it will be highlighted in yellow to indicate that the value is different from default. This should only be used where there are clear default values that are typically not changed.
  • #CAT_xxx identify "semantic" category that this object belongs to: see CatNamesMembMeth for a list
  • #INLINE -- puts an otherwise non-inline member class editor inline, esp. for Array
  • #EDIT_DIALOG -- for String types, adds a button for an editor dialog (for long strings); for Pointers, adds a button for editing item
  • #EDIT_WIDTH_xx -- for String types, specifies the minimum width of the text field
  • #TAB_TRAP -- for String types, trap the Tab key and call special taBase::TabTrap function on object that owns member -- is passed name of member that had tab trapped
  • #NO_APPLY_IMMED -- do NOT apply changes to this object immediately once they are made -- the following data types/controls are automatically APPLY_IMMED unless this is set:
    • bool/taiToggle
    • object ptrs: token, type, member, method, enum; based on ItemPtr/Chooser
    • enums/taiComboBox or taiBitBox
    • individual BIT enum values/taiBitBox
    • elBase guys, like token menus
    • NOTE: EDIT_DIALOG guys are implicitly APPLY_IMMED for the dialog changes (but not the text box) -- otherwise users get confused -- see NO_EDIT_APPLY_IMMED if this ever causes problems
  • #NO_EDIT_APPLY_IMMED -- for taiFields with EDIT_DIALOG, overrides the implicit dialog APPLY_IMMED
  • #SHOW_INLINE -- can be used to override a type that has HIDDEN_INLINE
  • #PROGEDIT_NEWLN -- break the line of edit controls for the program editor panel (sometimes it needs a little bit of help in the layout)
  • #TOOLTIP_xxx -- use xxx String member as source of the tool tip (hover) information for this item

Directives for specialized types

  • #NO_ALPHA -- for color fields, like taColor, hides the alpha control in the dialog (but control preserves alpha)
  • #FILE_DIALOG_xxx -- activate a file dialog button next to string field name (only for string members) -- xxx is SAVE, LOAD, or APPEND

Valid Value Controls (determines what values/actions can be performed on member)

  • #READ_ONLY Allows the user to see but not edit this item. By default the gui edit dialog will not show these items (they are HIDDEN by default.)
  • #GUI_READ_ONLY same as READ_ONLY but still enables value to be changed in CSS
  • #VARTYPE_READ_ONLY -- user can only change value, not the type, of a Variant
  • #NO_VARTYPE_READ_ONLY -- user can change the type of a Variant
  • #MIN_nnn -- for int types, the minimum acceptable value is nnn (defaults to smallest legal value for size/sign of the type)
  • #MAX_nnn -- for int types, the maximum acceptable value is nnn (defaults to largest legal value for size/sign of the type)
  • #LINK_GROUP -- This list or group member only has linked items (doesn't allow user to create new tokens in this group).

Pointers (including taSmartRef and taSmartPtr)

  • #LIST_xxx -- Sets the Lookup List for this element. This is used mainly for pointers to functions, where one wants the gui to show a list of top-level functions that have been scanned by maketa (see section 18.3.4 Top-Level Function Directives).
  • #TYPE_xxx -- Sets the default type for members which are pointers to TypeDef objects. This also works for MemberDef pointers. If xxx is 'this', then the type of the current object is used.
  • #TYPE_ON_xxx -- For object, TypeDef, or MemberDef pointers: use member xxx of this object to anchor the listing of possible types, tokens, or members.
  • #ENUM_TYPE -- for TypeDef* members, indicates to show Enum types (deriving from xxx) in the interface; should still include a TYPE_xxx directive to anchor type
  • #FROM_GROUP_xxx -- For token pointers, use given member xxx as the group from which to select token options (xxx can be a pointer to a group).
  • #GROUP_OPT_OK -- For FROM_GROUP_xxx mbrs, allows group itself as an option (else not allowed).
  • #SUBTYPE_xxx -- Sets this token pointer member to be only subitems (objects owned by this one) of type xxx. A recursive scan of members on this object is performed to search for objects of the given type as possible values for this field.
  • #NO_SUBTYPE -- Don't search this ptr for possible subitems (use if this ptr might point "up", causing a endless loop of searching for subitems).
  • #SCOPE_xxx -- Scope on given type for looking up members
  • #NO_SCOPE -- Don't use scope for tokens for a token pointer member. See SCOPE object directive
  • #OWN_POINTER -- For a pointer to an object, when loading, set the owner of the obj to be this object. Thus, this pointer is always created and owned by this object.
  • #NO_SET_POINTER -- don't ref the pointer when setting it, typically during load; used for non-ref counted ptrs that are delete monitored
  • #UPDATE_POINTER -- for "raw" taBase* pointers marked as #READ_ONLY: system assumes that these are for internal use only and does not do automatic UpdatePointers.. functions on them (during copy, etc) -- this will override this (not generally recommended -- should use a smartref for any "real" dynamical pointers)
  • #NO_UPDATE_POINTER -- for "raw" taBase* pointers: prevents calling UpdatePointers.. code on them: use for lookup pointers that are immediately cleared or other tmp pointer usage that is not READ_ONLY (see UPDATE_POINTER above)
  • #NULL_OK -- A null value is ok as an option for the user (else not) for pointer to a type, and SUBTYPE tokens.
  • #NO_NULL -- A null value is not ok (for tokens) (else ok).
  • #NO_EDIT -- Don't include Edit as an option on a token pointer menu (else ok).
  • #EDIT -- Include Edit as an option on a token pointer menu (this is the default).
  • #ITEM_FILTER_xxx -- for Token, Method, Member ptr members, lets you supply a static function: bool xxx(void* item) to filter the taBase items -- return true to include the item (ex. see MethodCall.obj) (Note: Types and Enum support could be easily added)

Saving/Loading and Misc Infrastructure

  • #NO_SAVE -- This member is not saved when dumping to a file.
  • #NO_SAVE_EMPTY -- This member is not saved if it has an "empty" value, ex false for bools, 0 for ints, "" for strings, NULL for pointers.
  • #NO_SAVE_PATH_R -- Don't create these objects in the 1st pass of the dump file (e.g., they will be created automatically by something else, usually an #IMMEDIATE_UPDATE UpdateAfterEdit function on a parent object). This can be used to speed up saving and loading of large numbers of repetitive objects which can be created instead.
  • #AKA_xxx -- This allows old project files etc to be loaded correctly after changing the name of a field or enum by matching xxx to the new field/enum.
  • #NO_FIND -- Don't search this member for the recursive FindMembeR function which searches recursively through objects (use if this ptr might point up in the hierarchy, which might cause an endless loop).
  • #NO_SEARCH -- Don't search this member for the recursive Search feature; typically used for .units and similar, with no significant findable properties and that would just clutter up search results

Properties

  • #GET_xxx -- marks this member as the "get" value for property xxx -- there will usually be an associated #SET on a method
  • #SET_xxx -- marks this member as the "set" value for property xxx -- ** this is non-standard, as a member is automatically made into a property without needing to formally declare it

Deprecated Emergent Directives

  • #APPLY_IMMED -- see NO_APPLY_IMMED above -- default was changed to apply immed!

Deprecated 3.2 -- do not use in new code!

  • #POS_ONLY -- (use MIN_0) Only positive (non-negative) integers, this controls behavior of the stepper for integer types.
  • #IV_READ_ONLY -- Like READ_ONLY, but user can modify the value via CSS (which is prevented by READ_ONLY).
  • #IN_GPMENU -- This members' items should appear in the group menu. The member must be a taGroup_impl descendent type, and the class must have a MEMB_IN_GPMENU option set.
  • if cssMisc::obey_read_only is on (off by default), this prevents a READ_ONLY member from being changed in CSS as well
Personal tools