Changeset 65
- Timestamp:
- 06/24/08 07:26:45 (2 months ago)
- Files:
-
- trunk/pihlaja/src/pihlaja/PihlajaMain.d (modified) (2 diffs)
- trunk/pihlaja/src/shiraz/canvas/Rectangle.d (modified) (3 diffs)
- trunk/pihlaja/src/shiraz/core/globals.d (modified) (2 diffs)
- trunk/pihlaja/src/shiraz/ui/Paned.d (added)
- trunk/pihlaja/src/shiraz/ui/Scrollbar.d (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pihlaja/src/pihlaja/PihlajaMain.d
r64 r65 39 39 import shiraz.ui.Window; 40 40 import shiraz.ui.SubWindow; 41 import shiraz.ui.Paned; 41 42 import shiraz.ui.Button; 42 43 import shiraz.ui.ProgressBar; … … 1041 1042 // 1042 1043 1043 videoViewerWindow.add(videoViewer); 1044 ProgressBar testProgressBar = new ProgressBar("Testing..."); 1045 testProgressBar.fraction = 0.7f; 1046 1047 /*auto emptyButton41 = new Button("Paned Button"); 1048 auto emptyButton42 = new Button("Paned Button"); 1049 auto emptyButton43 = new Button("Paned Button"); 1050 auto emptyButton44 = new Button("Paned Button");*/ 1051 1052 VPaned vpaned = new VPaned(); 1053 vpaned.add(testProgressBar); 1054 vpaned.add(videoViewer); 1055 1056 HPaned hpaned = new HPaned(); 1057 hpaned.add( vpaned ); 1058 //vpaned.add(testProgressBar); 1059 //vpaned.add(videoViewer); 1060 //vpaned.add(emptyButton41); 1061 //vpaned.add(emptyButton42); 1062 //vpaned.add(emptyButton43); 1063 //vpaned.add(emptyButton44); 1064 1065 SubWindow awin28 = new SubWindow("Timeline"); 1066 awin28.defaultSize( 0.4f, 0.4f ); 1067 awin28.side1.container.arrangeType = ArrangeType.FREE; 1068 awin28.side1.container.verticalScrollbarSetting = ScrollbarSetting.ALWAYS; 1069 awin28.side1.container.horizontalScrollbarSetting = ScrollbarSetting.ALWAYS; 1070 awin28.side1.isDoubleSided = true; 1071 awin28.side2.a = 0.5f; 1072 //awin28.add(checkerBoard2); 1073 1074 //Window in window test 1075 SubWindow winwin2 = new SubWindow("Window in Window"); 1076 winwin2.defaultSize( 0.4f, 0.2f ); 1077 1078 auto emptyButton128 = new Button("Crazy Button 1"); 1079 emptyButton128.signalActivate.attach(&clickHandler3); 1080 winwin2.add( emptyButton128 ); 1081 auto emptyButton228 = new Button("Crazy Button 2"); 1082 emptyButton228.signalActivate.attach(&clickHandler3); 1083 winwin2.add( emptyButton228 ); 1084 1085 awin28.add( winwin2 ); 1086 // 1087 1088 hpaned.add( awin28 ); 1089 1090 // 1091 1092 videoViewerWindow.add( hpaned ); 1093 //videoViewerWindow.add(videoViewer); 1044 1094 videoViewerWindow.add(viewerButtonBox); 1045 1095 //videoViewerWindow.add(playButton2); trunk/pihlaja/src/shiraz/canvas/Rectangle.d
r64 r65 2919 2919 foreach( Rectangle wid; itemList ) 2920 2920 { 2921 Trace.formatln("wid.name: {} height: {}", wid.name, cast(double) wid.h );2921 debug(arrange) Trace.formatln("wid.name: {} height: {}", wid.name, cast(double) wid.h ); 2922 2922 if( result < (wid.h + wid.padding*2.0f) ) 2923 2923 result = (wid.h + wid.padding*2.0f); … … 3209 3209 { 3210 3210 wid.hN = wid.childrenHeight(); 3211 Trace.formatln("wid.childrenHeight: {}", cast(double) wid.childrenHeight() );3211 debug(arrange) Trace.formatln("wid.childrenHeight: {}", cast(double) wid.childrenHeight() ); 3212 3212 } 3213 3213 } … … 3434 3434 { 3435 3435 wid.hN = wid.childrenHeight(); 3436 Trace.formatln("wid.childrenHeight: {}", cast(double) wid.childrenHeight() );3436 debug(arrange) Trace.formatln("wid.childrenHeight: {}", cast(double) wid.childrenHeight() ); 3437 3437 } 3438 3438 //else if( wid.hasMinHeight == true ) trunk/pihlaja/src/shiraz/core/globals.d
r27 r65 23 23 debug(logging) import tango.util.log.Trace;//Thread safe console output. 24 24 25 public enum DirectionType 26 { 27 HORIZONTAL, 28 VERTICAL 29 } 30 25 31 import shiraz.Shiraz; 26 32 … … 33 39 34 40 41 42 trunk/pihlaja/src/shiraz/ui/Scrollbar.d
r61 r65 48 48 } 49 49 50 enum DirectionType51 {52 HORIZONTAL,53 VERTICAL54 }55 56 50 class MakeSomeSenseToThisButton : Button 57 51 { … … 227 221 //how bad I'm with mathematics. Someone could make this nicer but it works 228 222 //this way too. Thank you. 229 Trace.formatln("HORIZONTAL value: {}", cast(double) value );223 debug(Scrollbar) Trace.formatln("HORIZONTAL value: {}", cast(double) value ); 230 224 } 231 225 } … … 236 230 float diff = (-(h*0.5f)+(controlRect.h*0.5)) - controlRect.yPos; 237 231 value = (diff / ((h*0.5f)-(controlRect.h*0.5))) * -0.5f; 238 Trace.formatln("VERTICAL value: {}", cast(double) value );232 debug(Scrollbar) Trace.formatln("VERTICAL value: {}", cast(double) value ); 239 233 } 240 234 } … … 250 244 controlRect.xPos = (multiple * (w*0.5f)) - (multiple * (controlRect.w*0.5)); 251 245 252 Trace.formatln("HORIZONTAL value: {} multiple: {}", cast(double) value, cast(double) multiple );246 debug(Scrollbar) Trace.formatln("HORIZONTAL value: {} multiple: {}", cast(double) value, cast(double) multiple ); 253 247 } 254 248 } … … 260 254 controlRect.yPos = (multiple * (h*0.5f)) - (multiple * (controlRect.h*0.5)); 261 255 262 Trace.formatln("VERTICAL value: {} multiple: {}", cast(double) value, cast(double) multiple );256 debug(Scrollbar) Trace.formatln("VERTICAL value: {} multiple: {}", cast(double) value, cast(double) multiple ); 263 257 } 264 258 }
