| Did you know ... | Search Documentation: |
| Send methods |
Defaults:
label untitled kind toplevel display @display
->free.->busy_cursor
and restore the normal cursor.show slot into frame<-status..g. when the host
moves the frame to another monitor). Applications normally do not call
this.
:- pce_begin_class(mail, frame, "Simple mail tool").
initialise(M) :->
"Create mail tool"::
send(M, send_super, initialise, mail),
/* append the various parts to the tool */
send(M, append, new(B, browser)),
send(M, append, new(V, view)),
send(M, append, new(D, dialog)),
/* specify the layout of the parts in the tool */
send(V, below, B),
send(D, below, V),
...
->above->append,
window->left, window->above,
...
->enforce
on the root tile;->_compute_desired_size
on each sub-window (currently only dialog implements this);->enforce
on the root tile;->set
to the root-tile's ideal width/height. Normally called from frame->create;
user code calls it after runtime layout changes (e.g.
after graphical->size
or after modifying a dialog window).
->create ->set ->_compute_desired_size ->enforce<-tile
hierarchy and create a tile_adjuster object for each tile
whose frame<-can_resize
is @on; free
adjusters of non-resizable tiles. Called from frame->create.
When the frame is already shown, the request is sent asynchronously
to the OS; the slots are updated when the OS confirms. A successful size
change triggers frame->resize.
->size ->position ->geometry->set.->set
that change one axis.->set
with the point's x and y.->position.->set
from the four fields of the argument area.->create).
The syntax is
<width>x<height>[+-]<X>[+-]<Y>[@<monitor>]
All five components are optional. A negative X / Y is measured from the right / bottom edge of the screen. Example:
400x200+0-0
means a 400x200 frame anchored at the bottom-left. The size applies to the client area; the position to the frame including borders.
The @<monitor> suffix, where <monitor>
is a value from
display_manager<-members,
picks the monitor used as the origin. This syntax follows the FVWM
convention. If the
display argument is given explicitly, @<monitor>
is ignored.
->set .geometry
<-display
if needed.<-frames.->fit
to lay out sub-windows.->create
each member window.-geometry if set. 10. frame->update_tile_adjusters.
->open <-frames ->fit
->create
if not yet created.->set
the position if supplied.->status.
If grab is @on
the frame grabs the pointer (see
window->grab_pointer).
->open_centered ->set ->create ->open|frame],
display=[display], grab=[bool]->open
but centres the frame on the given point (or the centre of frame<-display
if omitted).->open
and frame->status.->show
on transients to follow the main frame.->flush
and frame->synchronise.<-status). open
is a synonym for window.->closed
opens the frame (frame->status), frame->closed
iconifies it.
<-closed ->status->closed
(in case the frame was iconic) and then asks SDL to raise the OS window.
On success frame->exposed
is invoked via the resulting OS event.
<-postscript ->closed->expose
to each transient frame.
->hidden <-transients->hide to each transient frame.
->exposed ->transient_for.volume ->bell.busy_cursor)
on every sub-window of the frame. When block_input is @on,
all pointer and keyboard events are blocked while the cursor is active. frame->busy_cursor
restores the normal cursor and re-enables input.
->busy_cursor.e.
when the pointer is on the area between sub-windows). Used by frame->event
while resizing tiles.<-keyboard_focus
or the window currently under the pointer.
<-input_focus
window: forward to that window;.menu_bar_key). If it succeeds the key
is used up; otherwise it goes to the window with the keyboard focus.
Fails by default. Class pane_frame of the IDE uses it to switch tabs
with Control-Page-Up and Control-Page-Down.|event_id<-confirm
call on this frame return with the given value. Stores it in -return_value.
<-confirm -return_value->report
that walks a frame's report chain:
<-report_to;
if it returns a value other than
frame<-display,
forward frame->report
there.->report
on each frame<-members
window until one succeeds. Windows by default delegate back to their
frame, so the loop detects and breaks this cycle.<-transient_for.->report.Historically these names matched X11's WM_PROTOCOLS messages, notably WM_DELETE_WINDOW (close request) and WM_SAVE_YOURSELF (session save). On SDL3 only the close-request path remains; the others are accepted but never triggered.
->wm_protocol.->wm_protocol.
Default: message(@receiver, wm_delete).
->wm_delete ->wm_protocol->wm_protocol.
Kept for completeness; SDL3 does not emit this event.
<-can_delete
is @off.<-confirm_done
is @on, pop up
display->confirm.
Fail if the user cancels.->destroy
the frame. @see frame->done_message
@see frame<-can_delete
@see frame<-confirm_done->kind,
@off to frame->kind.
New code should use frame->kind..g.
dialog or inspector) for the argument frame. Effects:
->unlink <-transient_for <-transientstype for this frame
and process it as if SDL reported it. This allows testing input that is
not available on the test machine, such as pen and touch input.
type is one of mouse_motion, mouse_button_down,
mouse_button_up, mouse_wheel, pen_proximity_in,
pen_proximity_out, pen_down, pen_up, pen_motion,
pen_button_down, pen_button_up, pen_axis, finger_down,
finger_up, finger_motion, finger_canceled, pinch_begin,
pinch_update, pinch_end, key_down, key_up
and text_input. The attributes of fields are
named after the fields of the SDL event structure (e.g., x, y, which, button, pressure);
missing fields are 0. Positions are relative to the frame, except for
the finger events, whose x and y are
normalised to 0..1 as in SDL. The wheel event takes dx, dy
(precise) and integer_x,
integer_y (whole notches). The key events take key
(the SDL keycode), scancode, mod and repeat,
and text_input takes
char, the code point of the text.<-transients
chain. Called by frame->transient_for
and frame->unlink;
user code rarely invokes them directly.