INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "status line class"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: grape
class STATUS_LINE
inherit

TILE
rename
make as t_make
redefine
on_destroy,
on_paint,
on_size
end

DISPLAY_GRAPHICS_CONTEXT
rename
make as make_gc
end
creation

make,
makex
feature

item_margin: REAL

statusline_margin: REAL

top_margin: REAL

bottom_margin: REAL

separator_width: REAL

statusline_width: REAL

makex

make

set_hint (s: STRING)
-- This method is for setting the status line hint
-- If s is Void the hint text will be cleared

set_progress_cell (the_cell: PROGRESS_INDICATOR_CELL)
-- This function is necessary to set custom progress cell

set_wait_cursor (the_cursor: GRAPHICS_CURSOR)

get_wait_cursor: GRAPHICS_CURSOR

start_waiting (s: STRING)

stop_waiting

change_hint_cell (the_new_hint: STATUSLINE_CELL)

set_new_items_size

draw_entire
feature

add (the_cell: STATUSLINE_CELL)
-- We may add a cell to the status line
require
not_void: the_cell /= void

remove (the_cell: STATUSLINE_CELL)
-- We may add a cell to the status line
require
not_void: the_cell /= void

find_cell (the_cell: STATUSLINE_CELL): INTEGER

count: INTEGER
-- We can retrive the number of cells in status line
-- The first cell is hint.

get_cell, item (the_index: INTEGER): STATUSLINE_CELL
require
valid_index: the_index > 0 and then the_index <= count

put_cell (the_cell: STATUSLINE_CELL; the_index: INTEGER)
require
valid_index: the_index > 0 and then the_index <= count
not_void: the_cell /= void

replace_cell (the_index: INTEGER; the_new_cell: STATUSLINE_CELL)
feature

in_progress: BOOLEAN

start_progress (s: STRING; limit: REAL)
-- This method give a simple way to indicate the
-- 'in_progress' (working) state of applicatoin.
-- After calling it, status line will be set
-- to the single bar with string "s" and percent
-- mark "0%". The cursor pointer will be set to
-- the 'busy' (ussually hourglass) shape.
--
-- The second parameter is the maximum value for
-- calculating the percentage (see 'update_indicator')

update_indicator (value: REAL)
-- While your application is busy, it may show
-- the "is done" state by calling this method
-- with the value inside (0 ..limit). The
-- correct value of percent will be displayed.
-- If the value exceed the limit the "100%" bar
-- will be displayed.

stop_progress
-- We may restore the normal statusline state
-- The cursor pointer will be restored to the
-- previous shape.
--
-- NB: Restoring cursor is not implemented yet (STH)

progress_limit: REAL

progress_value: REAL
feature -- Obsolette

hint: STATUSLINE_CELL_WITH_STRING
feature

on_paint: INTEGER
-- This method perform all painting for status line

on_destroy: INTEGER

on_size (w, h: INTEGER): INTEGER
end -- class STATUS_LINE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES