include "/var/www/banner.php"; ?>
This is an old version from the tos.hyp. The new is on GitHub!



8.12 Grafikfunktionen
Diese Bibliothek übernimmt die Verwaltung von Rechtecken; so kann
etwa ein Rechteck aufgezogen werden, daß sich automatisch mit dem
Mauszeiger mitbewegt. Insgesamt stehen die folgenden Funktionen zur
Verfügung:
Hinweis: Eine besondere Beachtung hat dabei graf_handle
verdient, mit dessen Hilfe die Kennung der physikalischen
Bildschirm-Workstation erfragt werden kann.
Querverweis: Style-Guidelines
8.12.1 graf_dragbox
Name: |
»Graphics drag Box« - verschiebt ein Rechteck mit der Maus. |
AES-Nummer: |
71 |
Deklaration: |
int16_t graf_dragbox ( int16_t gr_dwidth, int16_t gr_dheight,
int16_t gr_dstartx, int16_t gr_dstarty, int16_t gr_dboundx, int16_t
gr_dboundy, int16_t gr_dboundw, int16_t gr_dboundh, int16_t
*gr_dfinishx, int16_t *gr_dfinishy ); |
Beschreibung: |
Die Funktion ermöglicht das Verschieben eines kleineren
Rechtecks innerhalb eines größeren Begrenzungsrechtecks.
Parameter |
Bedeutung |
|
|
gr_dwidth |
Breite |
gr_dheight |
Höhe |
gr_dstartx |
x-Koordinate |
gr_dstarty |
y-Koordinate des zu verschiebenden Rechtecks |
gr_dboundx |
x-Koordinate |
gr_dboundy |
y-Koordinate |
gr_dboundw |
Breite |
gr_dboundh |
Höhe des Begrenzungsrechteckes |
gr_dfinishx |
x-Koordinate |
gr_dfinishy |
y-Koordinate des zu verschiebenden Rechtecks beim Loslassen des
Mausknopfs
|
|
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding
|
8.12.1.1 Bindings für graf_dragbox
C: |
int16_t graf_dragbox ( int16_t gr_dwidth, int16_t gr_dheight,
int16_t gr_dstartx, int16_t gr_dstarty, int16_t gr_dboundx, int16_t
gr_dboundy, int16_t gr_dboundw, int16_t gr_dboundh, int16_t
*gr_dfinishx, int16_t *gr_dfinishy ); |
Umsetzung: |
int16_t graf_dragbox (int16_t gr_dwidth, int16_t gr_dheight,
int16_t gr_dstartx, int16_t gr_dstarty,
int16_t gr_dboundx, int16_t gr_dboundy,
int16_t gr_dboundw, int16_t gr_dboundh,
int16_t *gr_dfinishx, int16_t *gr_dfinishy)
{
int_in[0] = gr_dwidth;
int_in[1] = gr_dheight;
int_in[2] = gr_dstartx;
int_in[3] = gr_dstarty;
int_in[4] = gr_dboundx;
int_in[5] = gr_dboundy;
int_in[6] = gr_dboundw;
int_in[7] = gr_dboundh;
crys_if (71);
*gr_dfinishx = int_out[1];
*gr_dfinishy = int_out[2];
return ( int_out[0] );
}
|
GEM-Arrays: |
|
8.12.2 graf_growbox
Name: |
»Graphics grow Box« - zeichnet ein sich vergrößerndes Rechteck. |
AES-Nummer: |
73 |
Deklaration: |
int16_t graf_growbox ( int16_t gr_gstx, int16_t gr_gsty,
int16_t gr_gstwidth, int16_t gr_gstheight, int16_t gr_gfinx, int16_t
gr_gfiny, int16_t gr_gfinwidth, int16_t gr_gfinheight ); |
Beschreibung: |
Die Funktion zeichnet ein sich ausdehnendes Rechteck. Es gilt:
Parameter |
Bedeutung |
gr_gstx |
x-Koordinate |
gr_gsty |
y-Koordinate |
gr_gstwidth |
Breite |
gr_gstheight |
Höhe des Rechtecks (zu Beginn) |
gr_gfinx |
x-Koordinate |
gr_gfiny |
y-Koordinate |
gr_gfinwidth |
Breite |
gr_gfinheight |
Höhe des Rechtecks (am Ende) |
Hinweis: Ab PC-GEM Version 2.0 wird dieser Befehl
ignoriert. Dies liegt in den Rechtsstreitigkeiten zwischen
Apple und Digital Research begründet. |
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding form_dial graf_shrinkbox
|
8.12.2.1 Bindings für graf_growbox
C: |
int16_t graf_growbox ( int16_t gr_gstx, int16_t gr_gsty,
int16_t gr_gstwidth, int16_t gr_gstheight, int16_t gr_gfinx, int16_t
gr_gfiny, int16_t gr_gfinwidth, int16_t gr_gfinheight ); |
Umsetzung: |
int16_t graf_growbox (int16_t gr_gstx, int16_t gr_gsty,
int16_t gr_gstwidth,
int16_t gr_gstheight, int16_t gr_gfinx,
int16_t gr_gfiny, int16_t gr_gfinwidth,
int16_t gr_gfinheight)
{
int_in[0] = gr_gstx;
int_in[1] = gr_gsty;
int_in[2] = gr_gstwidth;
int_in[3] = gr_gstheight;
int_in[4] = gr_gfinx;
int_in[5] = gr_gfiny;
int_in[6] = gr_gfinwidth;
int_in[7] = gr_gfinheight;
return ( crys_if(73) );
}
|
GEM-Arrays: |
|
8.12.3 graf_handle
Name: |
»Graphics handle« - ermittelt den VDI-Handle der
Arbeitsstation. |
AES-Nummer: |
77 |
Deklaration: |
int16_t graf_handle ( int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox ); |
Beschreibung: |
Die Funktion ermittelt die Kennung der Bildschirm-Workstation,
auf der das AES ausgibt. Es gilt:
Parameter |
Bedeutung |
|
|
gr_hwchar |
Breite |
gr_hhchar |
Höhe eines Zeichens aus dem Systemzeichensatz in Punkten |
gr_hwbox |
Breite |
gr_hhbox |
Höhe einer Zelle, in die ein beliebiges Zeichen aus dem
Systemzeichensatz komplett hinein paßt.
|
Hinweis: Die Information aus den Parametern
gr_hwbox bzw. gr_hhbox wird vom AES für die Breite
der einzelnen Fensterelemente verwendet. |
Ergebnis: |
Die Funktion liefert die Kennung (handle) der geöffneten
AES-Workstation. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding v_opnvwk graf_xhandle
|
8.12.3.1 Bindings für graf_handle
C: |
int16_t graf_handle ( int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox ); |
Umsetzung: |
int16_t graf_handle (int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox)
{
crys_if (77);
*gr_hwchar = int_out[1];
*gr_hhchar = int_out[2];
*gr_hwbox = int_out[3];
*gr_hhbox = int_out[4];
return ( int_out[0] );
}
|
GEM-Arrays: |
|
8.12.4 graf_mbox
Name: |
»Graphics move Box« - verschiebt ein Rechteck mit der Maus. |
AES-Nummer: |
72 |
Deklaration: |
int16_t graf_mbox ( int16_t gr_mwidth, int16_t gr_mheight,
int16_t gr_msourcex, int16_t gr_msourcey, int16_t gr_mdestx, int16_t
gr_mdesty ); |
Beschreibung: |
Die Funktion zeichnet ein sich bewegendes Rechteck mit
konstanter Größe. Es gilt:
Parameter |
Bedeutung |
gr_mwidth |
Breite |
gr_mheight |
Höhe des Rechteckes |
gr_msourcex |
x-Koordinate |
gr_msourcey |
y-Koordinate (zu Beginn) |
gr_mdestx |
x-Koordinate |
gr_mdesty |
y-Koordinate (am Ende) |
Hinweis: Die Funktion kann beispielsweise dann angewendet
werden, wenn das Verschieben eines Piktogramms nicht erlaubt ist,
(Drucker-Symbol auf das Papierkorb-Icon legen) und es an seine
ursprünglich Stelle zurückpositioniert werden soll. |
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding
|
8.12.4.1 Bindings für graf_mbox
C: |
int16_t graf_mbox ( int16_t gr_mwidth, int16_t gr_mheight,
int16_t gr_msourcex, int16_t gr_msourcey, int16_t gr_mdestx, int16_t
gr_mdesty );
oder
int16_t graf_movebox ( ... ) |
Umsetzung: |
int16_t graf_mbox (int16_t gr_mwidth, int16_t gr_mheight,
int16_t gr_msourcex, int16_t gr_msourcey,
int16_t gr_mdestx, int16_t gr_mdesty)
{
int_in[0] = gr_mwidth;
int_in[1] = gr_mheight;
int_in[2] = gr_msourcex;
int_in[3] = gr_msourcey;
int_in[4] = gr_mdestx;
int_in[5] = gr_medsty;
return ( crys_if(72) );
}
|
GEM-Arrays: |
|
8.12.5 graf_mkstate
Name: |
»Graphics Mouse and Keyboard Status« - ermittelt den Status von
Maus und Tastatur. |
AES-Nummer: |
79 |
Deklaration: |
int16_t graf_mkstate ( int16_t *gr_mkmx, int16_t *gr_mkmy,
int16_t *gr_mkmstate, int16_t *gr_mkkstate ); |
Beschreibung: |
Die Funktion ermittelt die aktuelle Mausposition sowie den
Zustand der Maustasten und Sondertasten der Tastatur. Es gilt:
Parameter |
Bedeutung |
|
|
gr_mkmx |
x-Position |
gr_mkmy |
y-Position des Mauszeigers |
gr_mkmstate |
Zustand der Mausknöpfe (Bit-0 = linke Taste, usw.) |
gr_mkkstate |
Sondertasten der Tastatur als Bitvektor:
0x0001 |
= |
rechte Shift-Taste |
0x0002 |
= |
linke Shift-Taste |
0x0004 |
= |
Control-Taste |
0x0008 |
= |
Alternate-Taste |
|
Hinweis: Ein Bit ist dabei genau dann gesetzt, wenn die
entsprechende Taste gedrückt ist. |
Ergebnis: |
Als Ergebnis wird immer eine 1 zurückgegeben. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding evnt_button
|
8.12.5.1 Bindings für graf_mkstate
C: |
int16_t graf_mkstate ( int16_t *gr_mkmx, int16_t *gr_mkmy,
int16_t *gr_mkmstate, int16_t *gr_mkkstate ); |
Umsetzung: |
int16_t graf_mkstate (int16_t *gr_mkmx, int16_t *gr_mkmy,
int16_t *gr_mkmstate, int16_t *gr_mkkstate)
{
crys_if (79);
*gr_mkmx = int_out[1];
*gr_mkmy = int_out[2];
*gr_mkmstate = int_out[3];
*gr_mkkstate = int_out[4];
return ( int_out[0] );
}
|
GEM-Arrays: |
|
8.12.6 graf_mouse
Name: |
»Graphics Mouse« - verändert die Darstellung des Mauszeigers. |
AES-Nummer: |
78 |
Deklaration: |
int16_t graf_mouse ( int16_t gr_monumber, MFORM *gr_mofaddr ); |
Beschreibung: |
Die Funktion erlaubt es, das Aussehen des Mauszeigers zu
verändern. Für den Parameter gr_monumber gilt:
|
gr_monumber |
Bedeutung |
ARROW |
0 |
Pfeil |
TEXT_CRSR |
1 |
Textcursor |
HOURGLASS |
2 |
Sanduhr, Biene |
BUSY_BEE |
2 |
siehe HOURGLASS |
BUSYBEE |
2 |
siehe HOURGLASS |
POINT_HAND |
3 |
zeigende Hand |
FLAT_HAND |
4 |
flache Hand |
THIN_CROSS |
5 |
feines Fadenkreuz |
THICK_CROSS |
6 |
breites Fadenkreuz |
OUTLN_CROSS |
7 |
umrissenes Fadenkreuz |
|
8 |
Sizer (N.AES) |
X_LFTRT |
8 |
left-right arrow (Geneva) |
|
9 |
horizontal arrows (N.AES) |
X_UPDOWN |
9 |
up-down arrow (Geneva) |
|
10 |
vertical arrows (N.AES) |
USER_DEF |
255 |
eigene Mausform |
M_OFF |
256 |
Mauszeiger ausschalten |
M_ON |
257 |
Mauszeiger einschalten |
M_SAVE |
258 |
aktuelle Mausform sichern |
M_LAST |
259 |
letzte Mausform herstellen |
M_PREVIOUS |
259 |
siehe M_LAST |
M_RESTORE |
260 |
vorherige Mausform herstellen |
XACRS_BUBBLE_DISC |
270 |
The Data Uncertain logo (XaAES) |
XACRS_RESIZER |
271 |
The 'resize window' cursors (XaAES) |
XACRS_NE_SIZER |
272 |
(XaAES) |
XACRS_MOVER |
273 |
The 'move window' cursor (XaAES) |
XACRS_VERTSIZER |
274 |
The 'resize vertically' cursor (XaAES) |
XACRS_HORSIZER |
275 |
The 'resize horizontally' cursor (XaAES) |
XACRS_POINTSLIDE |
276 |
The 'two-arrows pointing inwards' |
|
|
cursor to pinpoint slider position(XaAES) |
X_MRESET |
1000 |
(Geneva) |
X_MGET |
1001 |
(Geneva) |
X_SET_SHAPE |
1100 |
(Geneva) |
Im Fall gr_monumber = USER_DEF, ist gr_mofaddr ein
Zeiger auf die Struktur MFORM, die das Aussehen des Mauszeigers
festlegt.
Hinweis: Man sollte darauf achten, daß außerhalb des
Arbeitsbereichs des eigenen Fensters, der Mauszeiger nur die Form
eines Pfeils oder einer Sanduhr besitzt.
In the event that the application must change the mouse form, set
the highest bit ( Bit 15 ) of gr_monumber to 1 and OR in with the
desired mouse form number. After finishing the work, call the
graf_mouse with value 0 to set the mouse back to arrow.
M_FORCE 0x8000
Ob die Modi 258-260 zur Verfügung stehen, bzw. ob die Mausform für
jede Applikation lokal verwaltet wird, kann per appl_getinfo (Opcode 8)
abgefragt werden.
- X_MRESET (1000)
-
graf_mouse( X_MRESET, 0L );
Resets the mouse so that it is "on" just once, and also updates
graf_mouse's idea of the hide count.
- X_MGET (1001)
-
hidecount = graf_mouse( X_MGET, MFORM *mouse );
In this mode, if "mouse" is non-zero, then the MFORM it points to
is filled-in with the shape of the last mouse set with graf_mouse().
"hidecount" gets the number of times the mouse was hidden using
graf_mouse(M_OFF...). If this number is greater than zero, the mouse
is hidden that number of times. If it is zero, the mouse is shown
once. If it is less than zero, the mouse is "shown" more than once.
- X_SET_SHAPE (1100)
-
graf_mouse( X_SET_SHAPE+index, ANI_MOUSE *mouse_form );
Change the shape of the mouse form whose number is "index". The
ANI_MOUSE structure contains up to 32 mouse shapes to be animated in a
continuous loop while that particular mouse shape is being displayed.
If the "frames" portion of the ANI_MOUSE structure is one, then no
animation is performed. Otherwise, it should be the number of frames
contained in the mouse animation sequence. The "delay" value is the
number of 50 Hz timer tics to pause between each frame in the
animation. The "form" portion of the structure only needs to be
initialized for the number of frames, so if there are only two frames,
this means that only form[0] and form[1] are used. If a NULL pointer
is passed, instead of a pointer to an ANI_MOUSE structure, then the
mouse shape is restored to its default.
It does not matter if the application which sets a new shape
terminates without resetting the mouse shape, as this call allocates
memory internally to hold the new shape data.
|
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
In allen AES Versionen. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding Mausklicks und Formen
|
8.12.6.1 Bindings für graf_mouse
8.12.7 graf_multirubber
Name: |
»Graphics Rubberbox« - zeichnet eine 'Rubberbox'
(Gummirechteck) auf den Bildschirm. |
AES-Nummer: |
69 |
Deklaration: |
int16_t graf_multirubber(int16_t x, int16_t y, int16_t minw,
int16_t minh, GRECT *rec, int16_t *outw, int16_t *outh) |
Beschreibung: |
Die Funktion stellt ein Gummiband in Form eines Rechtecks auf
dem Bildschirm dar, dessen obere linke Ecke festbleibt und dessen
untere rechte Ecke solange bewegt werden kann, wie die linke Maustaste
gedrückt wird. Ähnelt graf_rubberbox, nur mit zwei Rechtecken.
Parameter |
Bedeutung |
|
|
x |
x-Koordinate |
y |
y-Koordinate der linken, oberen Ecke |
minw |
kleinste Breite des Gummibandes |
minh |
kleinste Höhe des Gummibandes |
rec |
|
outw |
Breite des Gummibandes bei Loslassen des Mausknopfs |
outh |
Höhe des Gummibandes bei Loslassen des Mausknopfs
|
Hinweis: Die Funktion sollte aus den o.g. Gründen nur bei
bereits gedrückter Maustaste aufgerufen werden. Interessant ist, daß
bei der Angabe der minimalen Breite und Höhe auch negative
Werte zugelassen sind; das Gummiband läßt sich dann von rechts unten
nach links oben ziehen. |
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
Die Funktion steht nur unter N.AES zur Verfügung. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding
|
8.12.7.1 Bindings für graf_multirubber
C: |
int16_t graf_multirubber(int16_t x, int16_t y, int16_t minw,
int16_t minh, GRECT *rec, int16_t *outw, int16_t *outh) |
Umsetzung: |
int16_t graf_multirubber (int16_t x, int16_t y, int16_t minw,
int16_t minh, GRECT *rec,
int16_t *outw, int16_t *outh)
{
int_in[0] = x;
int_in[1] = y;
int_in[2] = minw;
int_in[3] = minh;
addr_in[0] = rec;
crys_if (69);
*outw = int_out[1];
*outh = int_out[2];
return ( int_out[0] );
}
|
GEM-Arrays: |
|
8.12.8 graf_rubberbox
Name: |
»Graphics Rubberbox« - zeichnet eine 'Rubberbox'
(Gummirechteck) auf den Bildschirm. |
AES-Nummer: |
70 |
Deklaration: |
int16_t graf_rubberbox ( int16_t gr_rx, int16_t gr_ry, int16_t
gr_minwidth, int16_t gr_minheight, int16_t *gr_rlastwidth, int16_t
*gr_rlastheight );
oder
int16_t graf_rubbox ( ... ); |
Beschreibung: |
Die Funktion stellt ein Gummiband in Form eines Rechtecks auf
dem Bildschirm dar, dessen obere linke Ecke festbleibt und dessen
untere rechte Ecke solange bewegt werden kann, wie die linke Maustaste
gedrückt wird.
Parameter |
Bedeutung |
|
|
gr_rx |
x-Koordinate |
gr_ry |
y-Koordinate der linken, oberen Ecke |
gr_minwidth |
kleinste Breite des Gummibandes |
gr_minheight |
kleinste Höhe des Gummibandes |
gr_rlastwidth |
Breite |
gr_rlastheight |
Höhe des Gummibandes bei Loslassen des Mausknopfs
|
Hinweis: Die Funktion sollte aus den o.g. Gründen nur bei
bereits gedrückter Maustaste aufgerufen werden. Interessant ist, daß
bei der Angabe der minimalen Breite und Höhe auch negative
Werte zugelassen sind; das Gummiband läßt sich dann von rechts unten
nach links oben ziehen.
In älteren GEM-Dokumentationen auch häufig als "graf_rubbox"
bezeichnet! |
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding
|
8.12.8.1 Bindings für graf_rubberbox
C: |
int16_t graf_rubbox ( int16_t gr_rx, int16_t gr_ry, int16_t
gr_minwidth, int16_t gr_minheight, int16_t *gr_rlastwidth, int16_t
*gr_rlastheight );
oder
int16_t graf_rubberbox ( ... ) |
Umsetzung: |
int16_t graf_rubbox (int16_t gr_rx, int16_t gr_ry,
int16_t gr_minwidth, int16_t gr_minheight,
int16_t *gr_rlastwidth,
int16_t *gr_rlastheight)
{
int_in[0] = gr_rx;
int_in[1] = gr_ry;
int_in[2] = gr_minwidth;
int_in[3] = gr_minheight;
crys_if (70);
*gr_rlastwidth = int_out[1];
*gr_lastheight = int_out[2];
return ( int_out[0] );
}
|
GEM-Arrays: |
|
8.12.9 graf_shrinkbox
Name: |
»Graphics shrink Box« - zeichnet ein sich verkleinerndes
Rechteck. |
AES-Nummer: |
74 |
Deklaration: |
int16_t graf_shrinkbox ( int16_t gr_sfinx, int16_t gr_sfiny,
int16_t gr_sfinwidth, int16_t gr_sfinheight, int16_t gr_sstx, int16_t
gr_ssty, int16_t gr_sstwidth, int16_t gr_sstheight ); |
Beschreibung: |
Die Funktion zeichnet ein schrumpfendes Rechteck. Es gilt:
Parameter |
Bedeutung |
gr_sfinx |
x-Koordinate |
gr_sfiny |
y-Koordinate |
gr_sfinwidth |
Breite |
gr_sfinheight |
Höhe des Rechteckes (am Ende) |
gr_sstx |
x-Koordinate |
gr_ssty |
y-Koordinate |
gr_sstwidth |
Breite |
gr_sstheight |
Höhe des Rechteckes (zu Beginn) |
Hinweis: Ab PC-GEM Version 2.0 wird dieser Befehl
ignoriert. Dies liegt in den Rechtsstreitigkeiten zwischen
Apple und Digital Research begründet. |
Ergebnis: |
Ein Fehler ist nur dann aufgetreten, wenn als Ergebnis 0
zurückgegeben wird. |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding form_dial graf_growbox
|
8.12.9.1 Bindings für graf_shrinkbox
C: |
int16_t graf_shrinkbox ( int16_t gr_sfinx, int16_t gr_sfiny,
int16_t gr_sfinwidth, int16_t gr_sfinheight, int16_t gr_sstx, int16_t
gr_ssty, int16_t gr_sstwidth, int16_t gr_sstheight ); |
Umsetzung: |
int16_t graf_shrinkbox (int16_t gr_sfinx, int16_t gr_sfiny,
int16_t gr_sfinwidth, int16_t gr_sfinheight,
int16_t gr_sstx, int16_t gr_ssty,
int16_t gr_sstwidth, int16_t gr_sstheight)
{
int_in[0] = gr_sfinx;
int_in[1] = gr_sfiny;
int_in[2] = gr_sfinwidth;
int_in[3] = gr_sfinheight;
int_in[4] = gr_sstx;
int_in[5] = gr_ssty;
int_in[6] = gr_sstwidth;
int_in[7] = gr_sstheight;
return ( crys_if(74) );
}
|
GEM-Arrays: |
|
8.12.10 graf_slidebox
Name: |
»Graphics slide Box« - ermittelt die Position der
Schieberegler. |
AES-Nummer: |
76 |
Deklaration: |
int16_t graf_slidebox ( OBJECT *gr_slptree, int16_t
gr_slparent, int16_t gr_slobject, int16_t gr_slvh ); |
Beschreibung: |
Die Funktion dient zur Abfrage von Schiebereglern (Slidern). Es
gilt:
Parameter |
Bedeutung |
|
|
gr_slptree |
Adresse des Objektbaumes |
gr_slparent |
Nummer des Parent-Rechteckes |
gr_slobject |
Nummer des zu verschiebenden Rechteckes (Slider) |
gr_slvh |
0 |
= |
horizontal verschieben |
1 |
= |
vertikal verschieben |
|
Hinweis: Die Funktion darf nur bei gedrückter Maustaste
aufgerufen werden, da sie beim Loslassen des Mausknopfes sofort
abbricht.
In Geneva hat sich der Parameter gr_slvh geringfügig geändert. |
Ergebnis: |
Die Funktion liefert die relative Position zwischen 0 (ganz
links bzw. ganz oben) und 1000 (ganz rechts bzw. ganz unten) des
Sliders. |
Verfügbar: |
In allen AES Versionen. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding OBJECT
|
8.12.10.1 graf_slidebox von Geneva
The meaning of the gr_slvh parameter has changed slightly,
to provide for real-time updating of sliders:
LSB |
0 |
for horizontal slider, 1 for vertical |
MSB |
0 |
for old-style, dotted outline drag box |
|
1 |
to describe the area to be scrolled in real-time |
|
2 |
to initialize real-time scrolling |
|
3 |
to process the scroll bar in real time |
To use real-time scroll bars, a program does the following:
Call graf_slidebox with gr_slvh mode 0x1XX (where "XX" is 00
for a horizontal slider, and 01 for vertical). In this mode, the
gr_slparent parameter describes the size of the entire area to
be scrolled, and gr_slobject describes the size of the area
which is visible at one time. Both of these values can be in any units
the programmer chooses.
Call graf_slidebox with gr_slvh mode 0x2XX. In this mode,
gr_slparent and gr_slobject have the same meaning they
normally do. The return value will either be -1, if the user has
released the slider, or it will be a number >= 0 which represents the
new position of the slider. This number is based on the numbers passed
in Step 1. The call does not return until the slider has either moved
enough to change the position within the list, or the mouse button has
been released.
If the result of the last graf_slidebox call was -1, then continue
on with the rest of the program. Otherwise, perform whatever action is
necessary to redraw the list of items, starting at the returned index.
The slider position is updated automatically by Geneva; the program
must not alter it.
Call graf_slidebox with gr_slvh mode 0x3XX. In this mode,
gr_slparent and gr_slobject have the same meaning they
normally do. Go to Step 3.
Example: Process a list of 100 items, 10 of which are visible at
once
if( graf_slidebox( 0L, 100, 10, 0x101 ) >= 0 )
{
i = graf_slidebox( object_tree, parent_obj, slider_obj, 0x201 );
while( i>=0 )
{
redraw_list_starting_at(i);
i = graf_slidebox( object_tree, parent_obj, slider_obj, 0x301 );
}
}
8.12.10.2 Bindings für graf_slidebox
8.12.11 graf_watchbox
Name: |
»Graphics watch Box« - selektiert ein Objekt und überwacht die
Mausbewegungen bezüglich dieses Objekts. |
AES-Nummer: |
75 |
Deklaration: |
int16_t graf_watchbox ( OBJECT *gr_wptree, int16_t gr_wobject,
int16_t gr_winstate, int16_t gr_woutstate ); |
Beschreibung: |
Die Funktion setzt den Objektstatus eines Objektes in
Abhängigkeit von der Position des Mauszeigers. Es gilt:
Parameter |
Bedeutung |
|
|
gr_wptree |
Adresse des Objektbaumes |
gr_wpobject |
Nummer des Objektes |
gr_winstate |
Objektstatus, wenn sich der Mauszeiger innerhalb der Begrenzung
befindet:
|
gr_woutstate |
Objektstatus, wenn sich der Mauszeiger außerhalb der Begrenzung
befindet.
|
Hinweis: Die Funktion bricht ab, wenn der Mausknopf
losgelassen wird. |
Ergebnis: |
Die Funktion liefert die Position des Mauszeigers beim
Loslassen des Buttons (0 = außerhalb des Objektes, 1 = innerhalb des
Objektes). |
Verfügbar: |
All AES versions. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding graf_wwatchbox OBJECT
|
8.12.11.1 Bindings für graf_watchbox
8.12.12 graf_wwatchbox
Name: |
»Graphics window watch Box« - selektiert ein Objekt in einem
Fenster und überwacht die Mausbewegungen bezüglich dieses Objekts. |
AES-Nummer: |
62 |
Deklaration: |
int16_t graf_wwatchbox ( OBJECT *gr_wptree, int16_t gr_wobject,
int16_t gr_winstate, int16_t gr_woutstate, int16_t whandle ); |
Beschreibung: |
Die Funktion setzt den Objektstatus eines Objektes in einem
Fenster in Abhängigkeit von der Position des Mauszeigers. Es gilt:
Parameter |
Bedeutung |
|
|
gr_wptree |
Adresse des Objektbaumes |
gr_wpobject |
Nummer des Objektes |
gr_winstate |
Objektstatus, wenn sich der Mauszeiger innerhalb der Begrenzung
befindet:
|
gr_woutstate |
Objektstatus, wenn sich der Mauszeiger außerhalb der Begrenzung
befindet. |
whandle |
Kennung des Fensters
|
Hinweis: Die Funktion bricht ab, wenn der Mausknopf
losgelassen wird. Die Funktion entspricht im wesentlichen
graf_watchbox mit dem Unterschied, dass hier die Rechteckliste eines
Fensters beachtet wird. |
Ergebnis: |
Die Funktion liefert die Position des Mauszeigers beim
Loslassen des Buttons (0 = außerhalb des Objektes, 1 = innerhalb des
Objektes). |
Verfügbar: |
Die Funktion steht in MagiC ab Version 5.10 zur Verfügung. |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding graf_watchbox OBJECT
|
8.12.12.1 Bindings für graf_wwatchbox
C: |
int16_t graf_wwatchbox ( OBJECT *gr_wptree, int16_t gr_wobject,
int16_t gr_winstate, int16_t gr_woutstate, int16_t whandle ); |
Umsetzung: |
int16_t graf_wwatchbox (OBJECT *gr_wptree, int16_t gr_wobject,
int16_t gr_winstate, int16_t gr_woutstate,
int16_t whandle)
{
int_in[0] = gr_wobject;
int_in[1] = gr_winstate;
int_in[2] = gr_woutstate;
int_in[3] = whandle;
addr_in[0] = gr_wptree;
return ( crys_if(62) );
}
|
GEM-Arrays: |
|
8.12.13 graf_xhandle
Name: |
»Graphics handle« - ermittelt den VDI-Handle der
Arbeitsstation. |
AES-Nummer: |
77 |
Deklaration: |
int16_t graf_xhandle ( int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox, int16_t *device ); |
Beschreibung: |
Die Funktion ermittelt die Kennung der Bildschirm-Workstation,
auf der das AES ausgibt. Es gilt:
Parameter |
Bedeutung |
|
|
gr_hwchar |
Breite |
gr_hhchar |
Höhe eines Zeichens aus dem Systemzeichensatz in Punkten |
gr_hwbox |
Breite |
gr_hhbox |
Höhe einer Zelle, in die ein beliebiges Zeichen aus dem
Systemzeichensatz komplett hinein paßt. |
device |
Gerätehandle des AES (vdi_device)
|
Hinweis: Die Information aus den Parametern
gr_hwbox bzw. gr_hhbox wird vom AES für die Breite
der einzelnen Fensterelemente verwendet. |
Ergebnis: |
Die Funktion liefert die Kennung (handle) der geöffneten
AES-Workstation. |
Verfügbar: |
Seit KAOS 1.4 |
Gruppe: |
Grafikfunktionen |
Querverweis: |
Binding v_opnvwk graf_handle
|
8.12.13.1 Bindings für graf_xhandle
C: |
int16_t graf_xhandle ( int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox, int16_t *device ); |
Umsetzung: |
int16_t graf_xhandle (int16_t *gr_hwchar, int16_t *gr_hhchar,
int16_t *gr_hwbox, int16_t *gr_hhbox,
int16_t *device )
{
crys_if (77);
*gr_hwchar = int_out[1];
*gr_hhchar = int_out[2];
*gr_hwbox = int_out[3];
*gr_hhbox = int_out[4];
*device = int_out[5];
return ( int_out[0] );
}
|
GEM-Arrays: |
|