INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Abstract class TILE - common window"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: grape
class TILE
feature -- Constants

not_processed: INTEGER

processed: INTEGER
feature -- Variables

sys_id: INTEGER

context: INTEGER

parent: GROUP

name: STRING

rect: RECT

prect: RECT

hscroll_bar: SCROLL_BAR

vscroll_bar: SCROLL_BAR

image_background: COLOR
feature -- Default tile's layout

interface_style: INTEGER

border_style: INTEGER
feature -- Flags for default border attribute (see border_style)

NO_FRAME: INTEGER

SIMPLE_FRAME: INTEGER

RESIZABLE_FRAME: INTEGER

MODAL_FRAME: INTEGER
feature -- Interface styles for TILE (see interface_style)

STYLE_DISABLED: INTEGER

STYLE_VISIBLE: INTEGER

STYLE_GROUP: INTEGER

STYLE_TABSTOP: INTEGER
feature -- Creation

make (n: STRING; r: RECT; ctx: INTEGER)
-- This is a user method to create Eiffel tile object. You must know, that
-- the tile is not immediately displayed after this call. It will be dis-
-- played only after this tile (or it's parent (GROUP)) will be inserted
-- into application desktop (DESKTOP class).
feature -- Resources

load (rc: RESOURCE_CONTAINER; code: INTEGER)
-- Load color definition from binary resource

build (rc: RESOURCE_CONTAINER; p: POINTER)
feature -- Style

set_default_style

set_border_style (style: INTEGER)

set_interface_style (style_code: INTEGER; flag: BOOLEAN)

get_interface_style (style_code: INTEGER): BOOLEAN

is_style_code_valid (style: INTEGER): BOOLEAN
feature -- Properties

set_parent (g: GROUP)
-- Set tile's parent object

set_name (new_name: STRING)

set_context (ctx: INTEGER)

set_rect (r: RECT)
feature -- Actions

destroy
-- If you want to kill the object you must use this function
-- Both IE and logical object will be destroyed

activate

show
-- This method shows the tile after it was hidden

hide
-- This method hides the tile after it was shown

move (x, y: REAL)

move_to_center (inside: TILE)
-- center tile object inside tile
-- if parameter is Void this method try to center tile inside whole screen
-- must be called after object added into parent's group

resize (w, h: REAL)

repaint
-- This method repaints entire tile. (It results in
-- calling on_paint method)

scroll_image (dx, dy, x, y, w, h: INTEGER)
-- This method scrolls image of tile.
-- Scrolling area is limited to specified x, y, w, h - rectangle
-- dx, dy - are amounts to scroll horizontally and
-- vertically.

invalidate_image (x, y, w, h: INTEGER)
-- This method prepares specified part of image for repainting.
-- Consequent calls to this features are combined until
-- "update_image" is called.
-- Only the unification of specified rectangular parts of image
-- will be repainted after this call.

invalidate_foreground (x, y, w, h: INTEGER)
-- This method prepares specified part of image for repainting.
-- The difference between this and previous method is
-- that BACKGROUND IS NOT ERASED when image is repainted.

update_image
-- This method forces repainting of previously invalidated
-- parts of image (if any).

enable
-- This method enables the tile (it reacts on user events)

disable
-- This method disables the tile (it doesn't react on anything)
-- But it is still visible
feature -- Status report

is_visible: BOOLEAN
-- This is a way to know if the tile is visible

is_enabled: BOOLEAN
-- This is a way to know if the tile is enabled

is_valid: BOOLEAN
-- This is a way to find out that the corresponding
-- window exists.

is_active: BOOLEAN
-- This is a way to find out that the corresponding
-- window has keyboard focus.

has_capture: BOOLEAN
-- This is a way to find out that the corresponding
-- window is now capturing mouse.
feature -- Actions

set_cursor (c: GRAPHICS_CURSOR)
-- This group of methods is used for cursor
-- manipulation. You may set a new cursor for the tile
-- or reset it to default cursor, by passing c = Void.

set_capture (flag: BOOLEAN)
-- This is a way to redirect all mouse input to Current tile.
-- By default capture = false.
-- When the flag = true, Current tile will become the only one
-- that will receive mouse events. Thus the tile (and the
-- entire application) will become SYSTEM MODAL OBJECT - it will
-- not be possible to switch to another task).
-- When the flag = false the capture is removed from Current tile.
--
-- WARNING! Use carefully, DON'T FORGET TO CALL set_capture (false)
-- after calling set_capture (true).

get_cursor_pos (p: POINT)
-- Reterives client (!) coordinates of mouse cursor

set_cursor_pos (p: POINT)
-- Sets client (!) coordinates of mouse cursor

get_screen_rectangle (r: RECT)
-- Retreives screen (!) position and size of tile
-- (size includes non-client area)

screen_to_client (pt: POINT)
-- Converts physical coordinates inside tile's client area
-- to screen's physical coordinates.
-- WARNING! Previous values inside POINT object are replaced!

client_to_screen (pt: POINT)
-- Converts screen's physical coordinates to
-- to coordinates inside tile's client area.
-- WARNING! Previous values inside POINT object are replaced!

start_timer (interval: INTEGER)
-- After this call this tile will be notified via on_timer
-- callback periodically with specified interval.
-- Only 1 timer can be started for 1 tile
-- The tile should be initialized before the timer start.
-- "interval" is specified in milliseconds.

stop_timer
-- Stops the timer for the current tile.
-- Dont't forget to stop timer when the tile is destroyed.

set_image_background (c: COLOR)

init
-- This function should not be called by user. It'll be called automatically
-- when it will be necessary to create system object (interface element),
-- which after "init" will become available for windowing system.
feature -- Event processing
-- These features are called from system messages
-- translator as standard reaction to events, which happen in
-- windowing system. Normally they should not be called by
-- user

on_paint: INTEGER
-- Each object must supply it's own method to paint itself

frozen t_on_size, on_size (w: INTEGER; h: INTEGER): INTEGER
-- Each object must supply it's own method to resize
-- itself. Especially complex objects.

on_parent_resize (pw, ph: INTEGER)
-- This method makes it possible to perform auto scaling
-- of child windows, when their parent is resized

on_move (x, y: INTEGER): INTEGER

on_activate: INTEGER
-- The object must know how to activate itself.
-- Especially complex objects.

on_deactivate: INTEGER
-- May be some actions must be done when deactivating object.

can_destroy: INTEGER
-- The object must know if it is possible to destroy it

on_destroy: INTEGER
-- The only thing the object must do on responding to
-- DESTROY notification is to remove itself from parent's
-- children list.
feature -- Mouse events
-- This is a group of methods which are called in responce
-- to mouse events. If you are going to process mouse
-- actions directly, you should redefine them and supply
-- correct functionality.

on_lbutton_down (x, y: INTEGER): INTEGER

on_lbutton_up (x, y: INTEGER): INTEGER

on_rbutton_down (x, y: INTEGER): INTEGER

on_rbutton_up (x, y: INTEGER): INTEGER

on_lbutton_double (x, y: INTEGER): INTEGER

on_rbutton_double (x, y: INTEGER): INTEGER

on_mouse_move (x, y: INTEGER): INTEGER
feature -- Scrollbar events
-- This group of methods is called in responce to user
-- manipulations on window scroll bars (which are in window
-- borders).

on_hscroll (scrollbar: SCROLLER): INTEGER
-- Horizontal scroll bar manipulations.

on_vscroll (scrollbar: SCROLLER): INTEGER
-- Vertical scroll bar manipulations.
feature -- Keyboard events

on_key_down (key: INTEGER): INTEGER
-- This method is called when user presses down some key
-- on the keyboard

on_character (ch: CHARACTER): INTEGER
-- This method is called when user presses down some key
-- on the keyboard, which has corresponding ASCII code

on_key_up (key: INTEGER): INTEGER
-- This method is called when user releases down some key
-- on the keyboard
feature -- Other events

on_timer: INTEGER

on_create: INTEGER

on_minmax (min, max: SIZE): INTEGER
--  Called before resizing of the object
-- User should fill this to objects and then
-- return "processed" if it is necessary to limit tile's
-- resizability.

on_sys_command (command: INTEGER): INTEGER
-- If the window has system menu, this callback is called
-- in responce to system menu commands.
feature -- Facility features

application: APPLICATION
-- This is function which makes it possible to
-- access application system descriptor in any tile (application,
-- to which tile belongs to)

keyboard: KEYBOARD
-- This is a way to process virtual keu codes.

logical_to_physical (logical, physical: REAL): INTEGER
-- Standard procedure for converting window logical coordinates
-- into it's physical coordinates.

null_rect: RECT

size_setup

std_tile_on_move (x, y: INTEGER)

std_tile_on_size (w, h: INTEGER)

std_tile_on_activate

std_tile_on_destroy

validation_error
feature -- Message boxes

msg_info (msg, title: STRING)

msg_error (msg, title: STRING)

msg_exclamation (msg, title: STRING)
feature -- Beep codes

MB_ICONASTERISK: INTEGER

MB_ICONEXCLAMATION: INTEGER

MB_ICONHAND: INTEGER

MB_ICONQUESTION: INTEGER

MB_OK: INTEGER

beep (beep_code: INTEGER)
end -- class TILE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES