Changeset 21
- Timestamp:
- 12/04/06 18:48:10 (2 years ago)
- Files:
-
- trunk/minwin/component.d (modified) (1 diff)
- trunk/minwin/group.d (modified) (1 diff)
- trunk/minwin/peerimpl.d (modified) (3 diffs)
- trunk/minwin/window.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/minwin/component.d
r11 r21 146 146 void visible(bool vis); 147 147 bool visible(); 148 149 // enabled property 150 void enabled(bool ena); 151 bool enabled(); 148 152 149 153 Component getRootAncestor() { trunk/minwin/group.d
r11 r21 70 70 } 71 71 return vis; 72 } 73 void enabled(bool b) { 74 foreach(Component ch; this) { 75 ch.enabled = b; 76 } 77 } 78 bool enabled() { 79 bool b = false; 80 foreach(Component ch; this) { 81 b = b || ch.enabled; 82 } 83 return b; 72 84 } 73 85 } trunk/minwin/peerimpl.d
r11 r21 45 45 } 46 46 47 void enabled(bool b) { 48 EnableWindow(peer, b); 49 } 50 bool enabled() { 51 return IsWindowEnabled(peer) == TRUE; 52 } 53 47 54 void requestFocus() { 48 55 HWND old = SetFocus(peer); … … 151 158 // sysAssert(stat == Success,"Failed to get window attributes in visible",stat); 152 159 return attr.map_state == IsViewable; 160 } 161 162 bool enabled() { 163 // TODO 164 return true; 165 } 166 void enabled(bool b) { 167 // TODO 153 168 } 154 169 … … 289 304 } 290 305 306 void enabled(bool b) { 307 gtk_widget_set_sensitive(peer,cast(int)b); 308 } 309 bool enabled() { 310 GtkObject* obj = cast(GtkObject*)peer; 311 return ((obj.flags & GtkWidgetFlags.GTK_SENSITIVE) != 0); 312 } 313 291 314 override void requestFocus() { 292 315 GtkObject* obj = cast(GtkObject*)peer; trunk/minwin/window.d
r11 r21 243 243 bool visible() { 244 244 return IsWindowVisible(peer) != 0; 245 } 246 247 void enabled(bool ena) { 248 EnableWindow(peer, ena); 249 } 250 bool enabled() { 251 return IsWindowEnabled(peer) == TRUE; 245 252 } 246 253 … … 923 930 } 924 931 932 void enabled(bool b) { 933 gtk_widget_set_sensitive(cast(GtkWidget*)peer,cast(int)b); 934 } 935 bool enabled() { 936 GtkObject* obj = cast(GtkObject*)peer; 937 return ((obj.flags & GtkWidgetFlags.GTK_SENSITIVE) != 0); 938 } 939 925 940 void getPeerOffset(inout int x, inout int y) { 926 941 x = 0;
