From: <ala...@us...> - 2003-10-25 00:18:12
|
Update of /cvsroot/aedgui/aedGUI/test In directory sc8-pr-cvs1:/tmp/cvs-serv3012 Modified Files: xmltest.cpp test1.xml menutest.cpp main.cpp gltest.cpp Log Message: aedWindow renamed to aedWidget; new aedWindow class started Index: xmltest.cpp =================================================================== RCS file: /cvsroot/aedgui/aedGUI/test/xmltest.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xmltest.cpp 1 Oct 2003 19:52:17 -0000 1.3 --- xmltest.cpp 25 Oct 2003 00:06:43 -0000 1.4 *************** *** 26,34 **** app.setDefaultFontName("my_font"); ! aedWindow win(640, 480, false); ! win.setBGColor(aedColor(100, 100, 100, 255)); aedXmlFile xml; ! if (xml.loadFromFile("test1.xml", &win) == false) { // error, file did not load --- 26,34 ---- app.setDefaultFontName("my_font"); ! aedWidget desktop(640, 480, false); ! desktop.setBGColor(aedColor(100, 100, 100, 255)); aedXmlFile xml; ! if (xml.loadFromFile("test1.xml", &desktop) == false) { // error, file did not load *************** *** 41,45 **** while(bRunning) { ! while(win.pollEvent(&event)) { switch (event.type) --- 41,45 ---- while(bRunning) { ! while(desktop.pollEvent(&event)) { switch (event.type) *************** *** 51,56 **** } ! win.update(); ! win.renderAll(); SDL_Delay(30); } --- 51,56 ---- } ! desktop.update(); ! desktop.renderAll(); SDL_Delay(30); } Index: test1.xml =================================================================== RCS file: /cvsroot/aedgui/aedGUI/test/test1.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test1.xml 22 Sep 2003 15:28:26 -0000 1.2 --- test1.xml 25 Oct 2003 00:06:43 -0000 1.3 *************** *** 2,6 **** <layout> ! <window x="20" y="20" w="300" h="200" name="win1" caption="window 1"> <button x="10" y="10" w="140" h="30" name="button1" caption="Hello!"/> --- 2,6 ---- <layout> ! <window x="20" y="20" w="300" h="300" name="win1" caption="window 1"> <button x="10" y="10" w="140" h="30" name="button1" caption="Hello!"/> *************** *** 26,30 **** </window> ! <window x="350" y="150" w="200" h="300" name="win2" caption="window 2"> <statictext x="10" y="20" w="180" h="25" caption="Username:"/> --- 26,30 ---- </window> ! <window x="350" y="100" w="225" h="350" name="win2" caption="window 2"> <statictext x="10" y="20" w="180" h="25" caption="Username:"/> Index: menutest.cpp =================================================================== RCS file: /cvsroot/aedgui/aedGUI/test/menutest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** menutest.cpp 17 Sep 2003 03:00:25 -0000 1.2 --- menutest.cpp 25 Oct 2003 00:06:43 -0000 1.3 *************** *** 24,32 **** app.setDefaultFontName("Vera"); ! aedWindow win(640, 480, false); aedMenuBar m1; ! m1.create(&win, aedRect(100, 100, 300, 30)); aedMenu menu1, menu2, menu3; --- 24,32 ---- app.setDefaultFontName("Vera"); ! aedWidget desktop(640, 480, false); aedMenuBar m1; ! m1.create(&desktop, aedRect(100, 100, 300, 30)); aedMenu menu1, menu2, menu3; *************** *** 58,62 **** while(bRunning) { ! while(win.pollEvent(&event)) { switch (event.type) --- 58,62 ---- while(bRunning) { ! while(desktop.pollEvent(&event)) { switch (event.type) *************** *** 68,73 **** } ! win.update(); ! win.renderAll(); SDL_Delay(30); } --- 68,73 ---- } ! desktop.update(); ! desktop.renderAll(); SDL_Delay(30); } Index: main.cpp =================================================================== RCS file: /cvsroot/aedgui/aedGUI/test/main.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** main.cpp 19 Oct 2003 16:50:08 -0000 1.47 --- main.cpp 25 Oct 2003 00:06:43 -0000 1.48 *************** *** 31,38 **** // aedTheme *t = app.loadTheme("../themes/industrial"); ! aedWindow win(640, 480, false); ! // win.setTheme(t); ! win.setBGColor(win.getTheme()->colorDefaultWindowBackground); // widgets --- 31,38 ---- // aedTheme *t = app.loadTheme("../themes/industrial"); ! aedWidget desktop(640, 480, false); ! // desktop.setTheme(t); ! desktop.setBGColor(desktop.getTheme()->colorDefaultWindowBackground); // widgets *************** *** 42,68 **** // justification = left (default) ! st1.create(&win, aedRect(10, 10, 90, 25), "Borderless"); ! st2.create(&win, aedRect(110, 10, 130, 25), "Squared border"); st2.setBorder(AED_BORDER_SQUARED); ! st3.create(&win, aedRect(250, 10, 130, 25), "Rounded border"); st3.setBorder(AED_BORDER_ROUND); // justification = center ! st4.create(&win, aedRect(10, 40, 90, 25), "Borderless"); st4.setJustification(AED_JUST_CENTER); ! st5.create(&win, aedRect(110, 40, 130, 25), "Squared border"); st5.setBorder(AED_BORDER_SQUARED); st5.setJustification(AED_JUST_CENTER); ! st6.create(&win, aedRect(250, 40, 130, 25), "Rounded border"); st6.setBorder(AED_BORDER_ROUND); st6.setJustification(AED_JUST_CENTER); // justification = right ! st7.create(&win, aedRect(10, 70, 90, 25), "Borderless"); st7.setJustification(AED_JUST_RIGHT); ! st8.create(&win, aedRect(110, 70, 130, 25), "Squared border"); st8.setBorder(AED_BORDER_SQUARED); st8.setJustification(AED_JUST_RIGHT); ! st9.create(&win, aedRect(250, 70, 130, 25), "Rounded border"); st9.setBorder(AED_BORDER_ROUND); st9.setJustification(AED_JUST_RIGHT); --- 42,68 ---- // justification = left (default) ! st1.create(&desktop, aedRect(10, 10, 90, 25), "Borderless"); ! st2.create(&desktop, aedRect(110, 10, 130, 25), "Squared border"); st2.setBorder(AED_BORDER_SQUARED); ! st3.create(&desktop, aedRect(250, 10, 130, 25), "Rounded border"); st3.setBorder(AED_BORDER_ROUND); // justification = center ! st4.create(&desktop, aedRect(10, 40, 90, 25), "Borderless"); st4.setJustification(AED_JUST_CENTER); ! st5.create(&desktop, aedRect(110, 40, 130, 25), "Squared border"); st5.setBorder(AED_BORDER_SQUARED); st5.setJustification(AED_JUST_CENTER); ! st6.create(&desktop, aedRect(250, 40, 130, 25), "Rounded border"); st6.setBorder(AED_BORDER_ROUND); st6.setJustification(AED_JUST_CENTER); // justification = right ! st7.create(&desktop, aedRect(10, 70, 90, 25), "Borderless"); st7.setJustification(AED_JUST_RIGHT); ! st8.create(&desktop, aedRect(110, 70, 130, 25), "Squared border"); st8.setBorder(AED_BORDER_SQUARED); st8.setJustification(AED_JUST_RIGHT); ! st9.create(&desktop, aedRect(250, 70, 130, 25), "Rounded border"); st9.setBorder(AED_BORDER_ROUND); st9.setJustification(AED_JUST_RIGHT); *************** *** 70,80 **** aedStaticText st10, st11, st12; ! st10.create(&win, aedRect(400, 10, 150, 25), "<-- justification: left"); ! st11.create(&win, aedRect(400, 40, 150, 25), "<-- justification: center"); ! st12.create(&win, aedRect(400, 70, 150, 25), "<-- justification: right"); aedFrame frame1; ! frame1.create(&win, aedRect(50, 140, 235, 155), "Some widgets"); aedTextBox txtBox1; --- 70,80 ---- aedStaticText st10, st11, st12; ! st10.create(&desktop, aedRect(400, 10, 150, 25), "<-- justification: left"); ! st11.create(&desktop, aedRect(400, 40, 150, 25), "<-- justification: center"); ! st12.create(&desktop, aedRect(400, 70, 150, 25), "<-- justification: right"); aedFrame frame1; ! frame1.create(&desktop, aedRect(50, 140, 235, 155), "Some widgets"); aedTextBox txtBox1; *************** *** 106,110 **** aedStaticText staticTxt1; ! staticTxt1.create(&win, aedRect(50, 110, 85, 25), "Blink Interval:"); staticTxt1.setJustification(AED_JUST_CENTER); staticTxt1.setFontSize(12); --- 106,110 ---- aedStaticText staticTxt1; ! staticTxt1.create(&desktop, aedRect(50, 110, 85, 25), "Blink Interval:"); staticTxt1.setJustification(AED_JUST_CENTER); staticTxt1.setFontSize(12); *************** *** 113,121 **** txtBox2.connect(TEXT_CHANGED, aedCallBack(changeBlinkInterval)); ! txtBox2.create(&win, aedRect(140, 110, 40, 25), "600"); aedProgressBar progressBar; ! progressBar.create(&win, aedRect(125, 300, 200, 25)); progressBar.setValue(50); progressBar.setAlphaValue(128); --- 113,121 ---- txtBox2.connect(TEXT_CHANGED, aedCallBack(changeBlinkInterval)); ! txtBox2.create(&desktop, aedRect(140, 110, 40, 25), "600"); aedProgressBar progressBar; ! progressBar.create(&desktop, aedRect(125, 300, 200, 25)); progressBar.setValue(50); progressBar.setAlphaValue(128); *************** *** 129,133 **** aedButton toggleButton; ! toggleButton.create(&win, aedRect(200, 330, 80, 30), "Start"); toggleButton.setToggleMode(true); //toggleButton.setAlphaValue(128); --- 129,133 ---- aedButton toggleButton; ! toggleButton.create(&desktop, aedRect(200, 330, 80, 30), "Start"); toggleButton.setToggleMode(true); //toggleButton.setAlphaValue(128); *************** *** 138,142 **** aedFrame frame2; ! frame2.create(&win, aedRect(350, 115, 250, 225), "Some eye-candy!"); aedBoxSizer boxSizer(&frame2, aedVERTICAL); --- 138,142 ---- aedFrame frame2; ! frame2.create(&desktop, aedRect(350, 115, 250, 225), "Some eye-candy!"); aedBoxSizer boxSizer(&frame2, aedVERTICAL); *************** *** 158,162 **** aedFrame frame2; ! frame2.create(&win, aedRect(350, 115, 250, 225), "Some eye-candy!"); SDL_Surface *myImage = SDL_LoadBMP("./test.bmp"); --- 158,162 ---- aedFrame frame2; ! frame2.create(&desktop, aedRect(350, 115, 250, 225), "Some eye-candy!"); SDL_Surface *myImage = SDL_LoadBMP("./test.bmp"); *************** *** 209,213 **** aedStaticText staticText1; ! staticText1.create(&win, aedRect(400, 380, 175, 60), "aedGUI test application. http://aedgui.sf.net/"); staticText1.setJustification(AED_JUST_RIGHT); --- 209,213 ---- aedStaticText staticText1; ! staticText1.create(&desktop, aedRect(400, 380, 175, 60), "aedGUI test application. http://aedgui.sf.net/"); staticText1.setJustification(AED_JUST_RIGHT); *************** *** 217,221 **** aedListBox listBox; ! listBox.create(&win, aedRect(25, 340, 150, 110)); listBox.add("blah blah"); listBox.add("this is a test."); --- 217,221 ---- aedListBox listBox; ! listBox.create(&desktop, aedRect(25, 340, 150, 110)); listBox.add("blah blah"); listBox.add("this is a test."); *************** *** 231,235 **** aedSpinner s1; ! s1.create(&win, aedRect(240, 400, 70, 25)); aedCursor Cursor; --- 231,235 ---- aedSpinner s1; ! s1.create(&desktop, aedRect(240, 400, 70, 25)); aedCursor Cursor; *************** *** 245,249 **** while(bRunning) { ! while(win.pollEvent(&event)) { switch(event.type) --- 245,249 ---- while(bRunning) { ! while(desktop.pollEvent(&event)) { switch(event.type) *************** *** 255,261 **** } ! win.update(); boxSizer.calculateSize(); // TEST ! win.renderAll(); Cursor.render(); SDL_Delay(30); --- 255,261 ---- } ! desktop.update(); boxSizer.calculateSize(); // TEST ! desktop.renderAll(); Cursor.render(); SDL_Delay(30); *************** *** 309,313 **** buttonPressed(void *caller, void *data) { ! aedWindow *myCaller = (aedWindow *) caller; myCaller->setCaption("Clicked!"); } --- 309,313 ---- buttonPressed(void *caller, void *data) { ! aedWidget *myCaller = (aedWidget *) caller; myCaller->setCaption("Clicked!"); } Index: gltest.cpp =================================================================== RCS file: /cvsroot/aedgui/aedGUI/test/gltest.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gltest.cpp 20 Oct 2003 15:08:30 -0000 1.8 --- gltest.cpp 25 Oct 2003 00:06:43 -0000 1.9 *************** *** 323,329 **** */ ! aedWindow win(800,600, false); ! win.setBGColor(aedColor(0,0,0,0)); aedSpinner spnrX; aedSpinner spnrY; --- 323,329 ---- */ ! aedWidget desktop(800,600, false); ! desktop.setBGColor(aedColor(0,0,0,0)); aedSpinner spnrX; aedSpinner spnrY; *************** *** 331,341 **** aedStaticText txtYLabel; aedStaticText txtAbout; ! spnrX.create(&win, aedRect(100, 10, 70, 25)); ! spnrY.create(&win, aedRect(100, 45, 70, 25)); spnrX.connect(VALUE_CHANGED, aedCallBack(XrotationChanged)); spnrY.connect(VALUE_CHANGED, aedCallBack(YrotationChanged)); ! txtYLabel.create(&win, aedRect(10,10,90,25), "X Rotation:"); txtYLabel.setBorder(false); txtYLabel.setJustification(AED_JUST_LEFT); --- 331,341 ---- aedStaticText txtYLabel; aedStaticText txtAbout; ! spnrX.create(&desktop, aedRect(100, 10, 70, 25)); ! spnrY.create(&desktop, aedRect(100, 45, 70, 25)); spnrX.connect(VALUE_CHANGED, aedCallBack(XrotationChanged)); spnrY.connect(VALUE_CHANGED, aedCallBack(YrotationChanged)); ! txtYLabel.create(&desktop, aedRect(10,10,90,25), "X Rotation:"); txtYLabel.setBorder(false); txtYLabel.setJustification(AED_JUST_LEFT); *************** *** 344,348 **** txtYLabel.setBGColor(aedColor(0,0,0,0)); ! txtXLabel.create(&win, aedRect(10,45,90,25), "Y Rotation:"); txtXLabel.setBorder(false); txtXLabel.setJustification(AED_JUST_LEFT); --- 344,348 ---- txtYLabel.setBGColor(aedColor(0,0,0,0)); ! txtXLabel.create(&desktop, aedRect(10,45,90,25), "Y Rotation:"); txtXLabel.setBorder(false); txtXLabel.setJustification(AED_JUST_LEFT); *************** *** 351,355 **** txtXLabel.setBGColor(aedColor(0,0,0,0)); ! txtAbout.create(&win, aedRect(5,575,790,25), "This is a sample program to demonstrate that you CAN mix aedGUI and OpenGL"); txtAbout.setBorder(false); txtAbout.setJustification(AED_JUST_LEFT); --- 351,355 ---- txtXLabel.setBGColor(aedColor(0,0,0,0)); ! txtAbout.create(&desktop, aedRect(5,575,790,25), "This is a sample program to demonstrate that you CAN mix aedGUI and OpenGL"); txtAbout.setBorder(false); txtAbout.setJustification(AED_JUST_LEFT); *************** *** 376,380 **** while(bRunning) { ! while(win.pollEvent(&event)) { switch(event.type) --- 376,380 ---- while(bRunning) { ! while(desktop.pollEvent(&event)) { switch(event.type) *************** *** 385,390 **** } } ! win.update(); ! win.renderAll(surface); Cursor.render(surface); DrawGLScene(); --- 385,390 ---- } } ! desktop.update(); ! desktop.renderAll(surface); Cursor.render(surface); DrawGLScene(); |