◄Up► ◄Contents► ◄Index► ◄Back► ─────PWB Extensions───────────────────────────────────────────────────────── Each cmdDesc element an extension cmdTable array contains an argType member which determines the determines the types of arguments accepted by the function. The function associated with the entry must handle each possible type of argument specified in the argType member. The function determines the actual argument type by testing the value of pArg->argType. See: ◄Argument Types► ◄Extension Argument Structure► ◄Writing Extension Functions► The argType member is a set of bit flags made up of one or more of the following constants. Combine constants with the bitwise OR operator (|) to enable multiple argument types. In the following table, the constants marked "modifier" change the behavior of other flags and cannot be used by themselves. Flag argType Description NOARG NOARG Accepts the lack of an argument. The function is executed directly with no arguments. PWB passes location of the cursor. TEXTARG TEXTARG Accepts a text argument that the user types in the Text Argument dialog box. PWB passes a pointer to the text. See: ◄Arg Function► NULLARG NULLARG Accepts Arg without an actual argument. PWB passes location of the cursor. Conflicts with NULLEOL and NULLEOW. NULLEOL TEXTARG Accepts Arg without an argument. PWB passes the string from the cursor position to the end of the current line. Conflicts with NULLARG and NULLEOW. NULLEOW TEXTARG Accepts Arg without an argument. PWB passes the string of text from the cursor position up to the next white space. Conflicts with NULLARG and NULLEOL. LINEARG LINEARG Accepts a line selection. PWB passes the location of the first and last lines. STREAMARG STREAMARG Accepts a stream selection. PWB passes the start and end positions of the stream. Conflicts with BOXSTR. BOXARG BOXARG Accepts a box selection. PWB passes the location of the four corners of the box. NUMARG LINEARG Interprets a numeric text argument as a file position exactly <number> lines down from the cursor. This position and the cursor position define a group of lines in the file. MARKARG modifier Interprets a valid file-marker name as a file position. This position and the cursor position define a region in the file. Use this flag with other cursor- movement-argument flags. BOXSTR TEXTARG Accepts a one-line box argument. PWB passes the highlighted string as a text argument. Conflicts with STREAMARG. FASTKEY modifier Allows the function to be listed in the Fastfunc switch. MODIFIES modifier Prevents execution of the function if the current file is no-edit. KEEPMETA modifier Preserves the state of the Meta prefix. PWB normally resets the Meta state upon completion of a function. WINDOWFUNC modifier Does not remove highlighting. Useful for window-movement functions. CURSORFUNC NOARG Does not recognize or cancel the Arg prefix. Useful for cursor-movement functions that must not interfere with selections or Arg functions. Conflicts with all attributes except KEEPMETA and MODIFIES. NOWINDOWS modifier Does not require a window to operate. ICONFOCUS modifier Allowed when the focus is on an icon. BEEPERROR modifier Beeps when not allowed (instead of displaying a message box). POPUP modifier Available in a pop-up window. NAMEINHEAP modifier Command name resides in far heap (for macros only). -♦-