Class Component |
# This is the parent class of all the GUI components. All of its methods and variables therefore apply to its sub-classes. # x position as specified by {set_pos()}, eg "50%"
Details |
Constructor |
Methods: |
# Set the Icon attribs of the component to the given parameter @example @ w.attrib("font=helvetica", "bg=pale blue") @ w.set_attribs("font=helvetica", "bg=pale blue")
# Set the component such that a border is not drawn.
# Set the shaded status of the component to not shaded.
# This draws, or re-draws, the component in the dialog window. @param buffer_flag If this parameter is not null, then @ the component is displayed into the buffer window, not @ the dialog window (this is used for double-buffering purposes).
# Called from a component's {display()} method, this method filters the component to give a shaded appearance, if the {is_shaded_flag} is set. {W} is the window to draw into (normally {self.cwin}).
# This method may be extended. It is invoked just before the window is closed.
# This method may be extended. It is invoked after the position of the object has been computed and the window has been opened, but before the object has been displayed in the window.
# Generate all the components, including non-visible ones in this component.
# Generate all the components that are visible in this component (which may be a container).
# Returns the dialog holding the component.
# Return the Icon window of the dialog in which the component resides.
# Method called when the component gets the keyboard focus; may be extended.
# This method is over-ridden by all this class's subclasses. It is the method which handles an Icon event e. It would not normally be called by a user program. It should either fail, or return an {_Event} structure. This will then be passed to the {dialog_event()} method of the dialog. The first two fields of the _Event structure should be the Icon event e and the object itself. The third field is the code, which can be any integer.
# Succeeds if the component is not shaded and the values of {&x} and {&y} lie within the component.
# Succeed if the component is hidden; for example if it is within a tabbed pane not presently visible.
# Succeeds if the component is shaded; fails otherwise. A shaded component, such as a button, may be displayed differently, and will not generate events.
# Succeed if the component is not hidden.
# Succeed if the component is not shaded.
# Method called when the component loses the keyboard focus; may be extended.
# Parse a position specification into an absolute value. @param total The total value @param s The size specifier
# Compute the absolute positions and sizes from the specifications given by {set_pos()} and {set_size()}. This method needs to be extended for a component which contains other components.
# Set the alignment of the component. Options for {x_align} are ``l'', ``c'' and ``r'', for left, centre, and right alignment. Options for {y_align} are ``t'', ``c'' and ``b'', for top centre and bottom alignment. The default alignment is ``l'', ``t''. @param x_align The x alignment @param y_align The y alignment
# Equivalent to {set_attribs()}, above, but takes a list as a parameter. @param l The list of attribs. @example @ w$set_attribs_list(["font=helvetica", "bg=pale blue"])
# Set the component such that a border is drawn.
# Set the shaded status of the component to shaded.
# Sets the owning _Dialog of the component. This method needs to be extended for a component which contains other components. @param c The parent dialog.
# Set the x and y position of the component. Each coordinate can be either an absolute pixel position, or can be given in the form of a percentage plus or minus an offset. @param x_spec The x specification. @param y_spec The y specification. @example @ c$set_pos(100, "25%") @ c$set_pos("50%-20", "25%+100")
# Set the size of the component. The parameters are in the same format as for {set_pos()} above. Some components will set sensible default sizes, but for others the size must be set explicitly.
# Set a tooltip string. This is presently only used by the {Toolbar} class.
# Toggle whether or not to draw a border around the component. Different objects respond differently to this flag being set; some ignore it altogether.
# Swap the shaded status of the component.
Fields: |