INDEX
CLUSTER
FEATURES
SHORT
FRAMES
NO FRAMES
indexing
project:
"Visual Eiffel"
revision:
"$Revision: 1.1 $"
copyright:
"Copyright (C) 1996-2005 Object Tools Group"
license:
"http://visual-eiffel.com/license"
cluster:
grape
class
CALCULATOR
inherit
DIALOG
rename
make
as
dlg_make
redefine
on_clicked
,
set_data
end
creation
make
feature
-- Button context
BTN_1
:
INTEGER
BTN_2
:
INTEGER
BTN_3
:
INTEGER
BTN_4
:
INTEGER
BTN_5
:
INTEGER
BTN_6
:
INTEGER
BTN_7
:
INTEGER
BTN_8
:
INTEGER
BTN_9
:
INTEGER
BTN_0
:
INTEGER
BTN_SIGN
:
INTEGER
BTN_DOT
:
INTEGER
BTN_PLUS
:
INTEGER
BTN_MINUS
:
INTEGER
BTN_MUL
:
INTEGER
BTN_DIV
:
INTEGER
BTN_DO
:
INTEGER
BTN_CLEAR
:
INTEGER
BTN_CANCEL
:
INTEGER
feature
-- Display
screen
:
STATIC_TEXT
contents
:
STRING
feature
-- Button
b
,
b0
,
b1
,
b2
,
b3
,
b4
,
b5
,
b6
,
b7
,
b8
,
b9
,
bsign
,
bdot
,
bplus
,
bminus
,
bmul
,
bdiv
,
bdo
,
bclear
,
bcancel
:
TEXT_BUTTON
feature
-- Button group (used only for auto justification)
bg
:
BUTTON_GROUP
feature
-- State control
state
:
INTEGER
operation
:
INTEGER
register
:
REAL
feature
-- State constants
ST1
:
INTEGER
ST2
:
INTEGER
ST3
:
INTEGER
ST4
:
INTEGER
feature
make
-- Creation of calculator
on_clicked
(
t
:
TILE
):
INTEGER
set_data
feature
-- Logical object methods
-- These methods belongs to calculator itself,
-- not a screen object.
erase_screen
reset_screen
append_screen
(
code
:
INTEGER
)
store_operation
(
code
:
INTEGER
)
invert_sign
disable_operations
enable_operations
execute_command
end
-- class
CALCULATOR
INDEX
CLUSTER
FEATURES
SHORT
FRAMES
NO FRAMES