28 #include "showfullobject.h" 30 #include "visiblearea.h" 32 #include "showsubwindowspec.h" 38 class AboutToBeShownListener;
39 class HasBeenHiddenListener;
41 class OpenWindowListener;
42 class CloseWindowListener;
43 class PointerEnteringListener;
44 class PointerLeavingListener;
45 class MouseClickListener;
47 class LoseCaretListener;
48 class GainCaretListener;
49 class ScrollRequestListener;
72 enum { TOOLBOX_CLASS = 0x82880 };
107 Window(
const std::string &template_name) :
ShowFullObject(template_name) {check_toolbox_class(Window::TOOLBOX_CLASS);}
170 void menu(
Menu menu);
191 void remove_all_shortcuts();
199 std::string
title()
const {
return string_property(12);}
205 void title(std::string new_title) {string_property(11, new_title);}
210 void set_toolbars(
Window *internal_bottom_left,
Window *internal_top_left,
Window *external_bottom_left,
Window *external_top_left);
211 void get_toolbars(
Window *internal_bottom_left,
Window *internal_top_left,
Window *external_bottom_left,
Window *external_top_left);
213 void ibl_toolbar(
Window window);
214 Window ibl_toolbar()
const;
215 void itl_toolbar(
Window window);
216 Window itl_toolbar()
const;
217 void ebl_toolbar(
Window window);
218 Window ebl_toolbar()
const;
219 void etl_toolbar(
Window window);
220 Window etl_toolbar()
const;
224 void extent(
const BBox &new_extent);
228 void force_redraw(
const BBox &work_area);
236 void open_subwindow(
const WindowOpenInfo &open_info ,
Window &parent,
unsigned int align_flags = 0);
237 void scroll(
int x,
int y);
238 void scroll(
const Point &pos);
239 Point scroll()
const;
240 void size(
int width,
int height);
241 void size(
const Size &size);
243 void top_left(
int x,
int y);
244 void top_left(
const Point &pos);
245 Point top_left()
const;
246 void bounds(
const BBox &bounds);
248 BBox outline()
const;
250 void block_copy(
const BBox &bounds,
const Point &to);
282 void add_loader(
Loader *loader,
int file_type = -2);
283 void remove_loader(
Loader *loader,
int file_type = -2);
297 void cancel_drag()
const;
307 DSFLAG_BOUND_POINT = 64,
308 DSFLAG_DROP_SHADOW = 128,
313 void drag_sprite_local(
const Sprite &sprite,
const BBox &box,
DragHandler *handler,
int flags = 0)
const;
370 unsigned int flags()
const {
return _flags;}
375 bool open()
const {
return (_flags & (1<<16));}
410 BUTTONTYPE_IGNORE_CLICKS,
412 BUTTONTYPE_CLICK_AUTO,
413 BUTTONTYPE_CLICK_ONCE,
416 BUTTONTYPE_CLICK_DRAG,
417 BUTTONTYPE_RELEASE_DRAG,
418 BUTTONTYPE_DOUBLE_DRAG,
419 BUTTONTYPE_CLICK_ONCE9,
420 BUTTONTYPE_DOUBLE_CLICK_DRAG,
421 BUTTONTYPE_CLICK_DRAG11,
422 BUTTONTYPE_RESERVED12,
423 BUTTONTYPE_RESERVED13,
424 BUTTONTYPE_RESERVED14,
425 BUTTONTYPE_GAIN_FOCUS
435 char _title_foreground;
436 char _title_background;
437 char _work_area_foreground;
438 char _work_area_background;
441 char _title_highlight;
444 unsigned int _title_bar_flags;
445 unsigned int _work_area_flags;
446 unsigned int _sprite_area_pointer;
447 unsigned int _min_width_and_height;
448 unsigned int _title_data[3];
449 unsigned int _initial_icon_count;
460 unsigned int flags()
const {
return _flags;}
533 int min_width()
const {
return (_min_width_and_height & 0xFFFF);}
539 int min_height()
const {
return (_min_width_and_height >> 16);}
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
bool fully_visible() const
Window is fully visible.
Definition: window.h:382
Class to represent a two-dimensional size.
Definition: size.h:34
std::string help_message() const
Get the help message for the window.
Definition: window.h:187
Base class for gadget memory resources.
Definition: resgadget.h:42
Window(const Object &other)
Construct a Window from an Object that refers to a Window.
Definition: window.h:99
int min_height() const
Minimum height of the window.
Definition: window.h:539
std::string message(const std::string &token)
Shortcut to the tbx::app()->messages().message(...)
Definition: message.cc:41
WimpColour title_highlight() const
Title background highlight colour.
Definition: window.h:523
This is the base class for all Gadgets.
Definition: gadget.h:48
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
Class to represent a two dimensional bounding box.
Definition: bbox.h:37
WindowHandle window_handle() const
Return the underlying WIMP windows handle of the window.
Definition: window.h:165
WindowHandle window_handle() const
WIMP window handle of this window.
Definition: window.h:334
WindowHandle _window_handle
WIMP window handle.
Definition: window.h:325
Listener for gain caret Wimp event.
Definition: caretlistener.h:144
int ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
ButtonType
Enumeration of the button types for the work area.
Definition: window.h:408
unsigned int flags() const
Window flags.
Definition: window.h:370
WimpColour title_foreground() const
Title foreground and frame colour.
Definition: window.h:485
Classes to use/edit toolbox resources in memory.
const BBox & work_area() const
Work area.
Definition: window.h:477
int min_width() const
Minimum width of the window.
Definition: window.h:533
WimpColour title_background() const
Title background colour.
Definition: window.h:491
Window & operator=(const Object &other)
Assign this Window from an Object that refers to a SaveAs.
Definition: window.h:136
int WindowHandle
Type for WIMP windows handle.
Definition: handles.h:35
WindowHandle window_handle_in_front() const
WIMP handle of window on top of this window or -1 for none.
Definition: window.h:349
Window resource object.
Definition: reswindow.h:48
Class to represent a standard desktop WIMP colour.
Definition: colour.h:146
void title(std::string new_title)
Set the title (caption) of the window.
Definition: window.h:205
Class to report status of a drag started on a window.
Definition: draghandler.h:35
Keyboard short cut.
Definition: resshortcut.h:43
Common base class for the UserSprite and WimpSprite classes.
Definition: sprite.h:299
Window(const Window &other)
Construct a Window from another Window.
Definition: window.h:88
bool operator==(const Object &other) const
Check if this Window refers to the same underlying toolbox object as another.
Definition: window.h:144
unsigned int flags() const
Window flags.
Definition: window.h:460
bool operator!=(const Object &other) const
Check if this Window does not refers to the same underlying toolbox object as another.
Definition: window.h:152
Class to represent a position in two dimensional space.
Definition: point.h:36
Window()
Construct creates an unassigned Window.
Definition: window.h:79
unsigned int work_area_flags() const
Work area flags.
Definition: window.h:467
VisibleArea & visible_area()
Visible area of this window.
Definition: window.h:344
WimpColour scroll_outer() const
Scroll bar outer colour.
Definition: window.h:511
Class to store information for the Visible area of a window and provide work area to screen conversio...
Definition: visiblearea.h:36
Class to handle file/data loading from the filer or an external application.
Definition: loader.h:179
Listener for the pointer entering the window.
Definition: pointerlistener.h:62
Listener for the pointer leaving the window.
Definition: pointerlistener.h:44
Window(const std::string &template_name)
Create a Window from the named template.
Definition: window.h:107
Listener for mouse clicks on a Window.
Definition: mouseclicklistener.h:129
int IconHandle
Type for WIMP icon handle.
Definition: handles.h:37
bool input_focus() const
window has the input focus
Definition: window.h:397
bool open() const
Window is open.
Definition: window.h:375
The Window object represents a toolbox window.
Definition: window.h:69
Redraw event listener.
Definition: redrawlistener.h:75
WindowHandle _window_handle_in_front
Handle of window in front of this one.
Definition: window.h:327
DragSpriteFlags
Flags for drag_sprite.
Definition: window.h:302
WimpColour scroll_inner() const
Scroll bar inner colour.
Definition: window.h:517
bool force_to_screen() const
force window to screen once on the next Open_Window
Definition: window.h:402
std::string title() const
Get the title (caption) of the window.
Definition: window.h:199
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
Structure used to show a window as a subwindow.
Definition: showsubwindowspec.h:58
Class with details of window location on screen.
Definition: window.h:322
Window state structure for the Window get_state method.
Definition: window.h:355
ButtonType button_type() const
Button type.
Definition: window.h:472
Listener for Wimp Open Window Request events.
Definition: openwindowlistener.h:97
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
Window & operator=(const Window &other)
Assign this Window from another.
Definition: window.h:124
Class to manipulate a toolbox object.
Definition: object.h:50
void help_message(const std::string &message)
Set the help message for the Window.
Definition: window.h:181
const VisibleArea & visible_area() const
Visible area of this window.
Definition: window.h:339
bool toggle_size() const
the current Open_Window_Request was caused by a click on the Toggle Size icon
Definition: window.h:392
WimpColour work_area_background() const
Work area background colour.
Definition: window.h:505
bool full_size() const
window has been toggled to full size
Definition: window.h:387
VisibleArea _visible_area
Position on screen and scroll settings.
Definition: window.h:326
Window Information structure for the Window get_info method.
Definition: window.h:431
WimpColour work_area_foreground() const
Work area foreground colour.
Definition: window.h:498
Listener for KeyPressed WIMP event.
Definition: keylistener.h:178
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
Listener for the close window request message.
Definition: closewindowlistener.h:45
Listener for LoseCaret Wimp event.
Definition: caretlistener.h:126