Mercurial > projects > mde
comparison mde/gui/renderer/IRenderer.d @ 41:b3a6ca4516b4
The renderer now controls which parts of the window border allow resizing.
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Tue, 13 May 2008 12:02:36 +0100 |
parents | 8c4c96f04e7f |
children | 1530d9c04d4d |
comparison
equal
deleted
inserted
replaced
40:b28d7adc786b | 41:b3a6ca4516b4 |
---|---|
37 r += d.r; | 37 r += d.r; |
38 b += d.b; | 38 b += d.b; |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 /// An enum for border types | 42 /** Use to set and reset these parameters, and to get the border size (which may depend on |
43 enum BORDER_TYPES { | 43 * them). */ |
44 WINDOW_TOTAL, | 44 BorderDimensions setSizable (bool wSizable, bool hSizable); |
45 WINDOW_RESIZE, | 45 |
46 /// Which edges of a window are being resized | |
47 enum RESIZE_TYPE : ubyte { | |
48 NONE = 0x0, L = 0x1, R = 0x2, T = 0x4, B = 0x8 | |
46 } | 49 } |
47 | 50 |
48 /** Return the renderer's window border width. | 51 /** Used to tell if a click on a window's border is for resizing or moving. |
49 * | 52 * |
50 * Type should be an element of BORDER_TYPES; if not the method may throw or simply return | 53 * Depends on setSizable's parameters. |
51 * without an error. */ | 54 * |
52 BorderDimensions getBorder (BORDER_TYPES type); | 55 * Params: |
56 * cx = | |
57 * cy = click coordinates relative to window border | |
58 * w = | |
59 * h = window size | |
60 * | |
61 * Returns: | |
62 * RESIZE_TYPE = NONE for a move, an or'd combination of L/R/T/B for resizing. | |
63 */ | |
64 RESIZE_TYPE getResizeType (int cx, int cy, int w, int h); | |
53 | 65 |
54 /** Return the renderer's between-widget spacing (for layout widgets). */ | 66 /** Return the renderer's between-widget spacing (for layout widgets). */ |
55 int layoutSpacing (); | 67 int layoutSpacing (); |
56 //END Get dimensions | 68 //END Get dimensions |
57 | 69 |