|
From: <edu...@us...> - 2003-10-19 17:05:16
|
Update of /cvsroot/aedgui/aedGUI/test
In directory sc8-pr-cvs1:/tmp/cvs-serv12059/test
Modified Files:
main.cpp
Log Message:
A very simple example of a possible aedSizer. Buggy!
Index: main.cpp
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/test/main.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** main.cpp 3 Oct 2003 17:01:11 -0000 1.45
--- main.cpp 19 Oct 2003 16:47:11 -0000 1.46
***************
*** 2,5 ****
--- 2,6 ----
#include "main.h"
#include "font.h"
+ #include "aedBoxSizer.h"
aedButton *tb2;
***************
*** 23,27 ****
SDL_WM_SetCaption("aedGUI Test", "");
!
aedApp app;
--- 24,28 ----
SDL_WM_SetCaption("aedGUI Test", "");
!
aedApp app;
***************
*** 136,139 ****
--- 137,153 ----
//toggleButton.disconnect(STATE_CHANGED);
+ aedFrame frame2;
+ frame2.create(&win, aedRect(350, 115, 250, 225), "Some eye-candy!");
+
+ aedBoxSizer boxSizer(&frame2, aedVERTICAL);
+
+ aedButton tb1;
+ tb1.create(&frame2, aedRect(55, 10, 140, 34), "parent is frame2");
+ tb1.setAlphaValue(160);
+
+ boxSizer.addWidget(&tb1);
+
+
+ /*
aedFrame frame2;
***************
*** 160,172 ****
tb2->setAlphaValue(160);
- aedStaticText staticText1;
-
- staticText1.create(&win, aedRect(400, 380, 175, 60),
- "aedGUI test application. http://aedgui.sf.net/");
- staticText1.setJustification(AED_JUST_RIGHT);
- staticText1.setWordWrap(true);
- staticText1.setFontSize(12);
-
-
staticTxt2 = new aedStaticText;
staticTxt2->create(&frame2, aedRect(55, 140, 190, 18),
--- 174,177 ----
***************
*** 193,196 ****
--- 198,212 ----
scroll2.create(&frame2, aedRect(24, 75, 14, 105));
+
+ */
+
+ aedStaticText staticText1;
+
+ staticText1.create(&win, aedRect(400, 380, 175, 60),
+ "aedGUI test application. http://aedgui.sf.net/");
+ staticText1.setJustification(AED_JUST_RIGHT);
+ staticText1.setWordWrap(true);
+ staticText1.setFontSize(12);
+
aedListBox listBox;
***************
*** 212,221 ****
aedCursor Cursor;
! SDL_Surface *imgCursor = SDL_LoadBMP("./cursor.bmp");
SDL_SetColorKey(imgCursor, SDL_SRCCOLORKEY | SDL_RLEACCEL,
SDL_MapRGB(imgCursor->format, 255, 0, 255));
Cursor.setImage(imgCursor);
! // SDL_ShowCursor(0); //Uncomment this line when aedCursor DOES show
!
// loop
bool bRunning = true;
--- 228,237 ----
aedCursor Cursor;
! SDL_Surface *imgCursor = SDL_LoadBMP("./cursor.bmp");
SDL_SetColorKey(imgCursor, SDL_SRCCOLORKEY | SDL_RLEACCEL,
SDL_MapRGB(imgCursor->format, 255, 0, 255));
Cursor.setImage(imgCursor);
! // SDL_ShowCursor(0); //Uncomment this line when aedCursor DOES show
!
// loop
bool bRunning = true;
***************
*** 231,237 ****
break;
}
! }
win.update();
win.renderAll();
Cursor.render();
--- 247,254 ----
break;
}
! }
win.update();
+ boxSizer.calculateSize(); // TEST
win.renderAll();
Cursor.render();
***************
*** 240,246 ****
// cleanup
! SDL_FreeSurface(myImage);
SDL_FreeSurface(imgCursor);
! delete tb2;
return (0);
}
--- 257,263 ----
// cleanup
! //SDL_FreeSurface(myImage);
SDL_FreeSurface(imgCursor);
! delete tb2;
return (0);
}
***************
*** 266,270 ****
{
aedRadioButtonGroup *rbg = (aedRadioButtonGroup *) caller;
-
switch (rbg->getSelectedButton())
{
--- 283,286 ----
***************
*** 288,292 ****
{
aedWindow *myCaller = (aedWindow *) caller;
-
myCaller->setCaption("Clicked!");
}
--- 304,307 ----
***************
*** 296,300 ****
{
aedTextBox *myCaller = (aedTextBox *) caller;
-
myCaller->setBlinkInterval(atol(myCaller->getCaption().c_str()));
}
--- 311,314 ----
***************
*** 303,307 ****
progressBarTimerAlarm(void *caller, void *data, aedProgressBar * pBar)
{
-
static int direction = 4;
--- 317,320 ----
***************
*** 324,328 ****
{
aedButton *btn = (aedButton *) caller;
-
timer->enable(btn->getButtonState());
--- 337,340 ----
***************
*** 338,342 ****
{
aedCheckBox *chkBox = (aedCheckBox *) caller;
-
txtBox->setReadOnly(!chkBox->getState());
}
--- 350,353 ----
***************
*** 346,350 ****
{
aedCheckBox *chkBox = (aedCheckBox *) caller;
-
txtBox->setPasswordMode(chkBox->getState());
}
--- 357,360 ----
|