diff --git a/src/bin/launcher/include/ubixButton.h b/src/bin/launcher/include/ubixButton.h index 0a1524e..451bf1c 100644 --- a/src/bin/launcher/include/ubixButton.h +++ b/src/bin/launcher/include/ubixButton.h @@ -6,7 +6,7 @@ class ubixButton : public vButton { public: ubixButton(vContext *); - virtual bool vCreate(void) { return true; } +// virtual bool vCreate(void); virtual void vDraw(void) { return; } virtual ~ubixButton(void); }; // ubixButton diff --git a/src/bin/launcher/launcher.cpp b/src/bin/launcher/launcher.cpp index 009e378..8a029a2 100644 --- a/src/bin/launcher/launcher.cpp +++ b/src/bin/launcher/launcher.cpp @@ -2,12 +2,15 @@ #include #include #include +#include -int main(void) { +int +main(void) { ubixDesktop * desktop = new ubixDesktop(NULL); if (desktop!=NULL) cout << "Desktop created" << endl; ubixButton * daButton = new ubixButton(desktop); if (daButton != NULL) cout << "da uBix button was created" << endl; + cout << "daButton->vCreate() returned: " << daButton->vCreate() << endl; delete daButton; delete desktop; diff --git a/src/bin/launcher/ubixButton.cpp b/src/bin/launcher/ubixButton.cpp index 0f1fdcb..ec62ce3 100644 --- a/src/bin/launcher/ubixButton.cpp +++ b/src/bin/launcher/ubixButton.cpp @@ -2,28 +2,12 @@ #include #include #include -#include ubixButton::ubixButton(vContext * parent) : vButton(parent) { vSetSize(48, 48); - sSize * size = NULL; - size = dynamic_cast(vGetStyle("default.button.border.size")); - - if (size != NULL) { - cout << "size.width: " << size->width << endl; - cout << "size.height: " << size->height << endl; - } // if - - vSetStyle("default.button.border.size", new sSize(0, 0, 0)); - - size = dynamic_cast(vGetStyle("default.button.border.size")); - - if (size != NULL) { - cout << "size.width: " << size->width << endl; - cout << "size.height: " << size->height << endl; - } // if + vSetPos(0, 600-vGetHeight()); + vSetStyle("default.button.border.size", new sSize(0)); return; - } // ubixButton::ubixButton() ubixButton::~ubixButton(void) { diff --git a/src/bin/launcher/ubixDesktop.cpp b/src/bin/launcher/ubixDesktop.cpp index feceb40..bda67e8 100644 --- a/src/bin/launcher/ubixDesktop.cpp +++ b/src/bin/launcher/ubixDesktop.cpp @@ -10,6 +10,8 @@ new sRGBA8Color(255, 255, 255, 255)); vSetStyle("default.font.color.background", new sRGBA8Color(0, 0, 0, 255)); + vSetStyle("default.desktop.pixelformat", + new sPixelFormat(16, 11,5,0,0, 5,6,5,0)); return; } // ubixDesktop::ubixDesktop diff --git a/src/lib/views/sunlight/include/sTypes.h b/src/lib/views/sunlight/include/sTypes.h index 5456018..e9c5d31 100644 --- a/src/lib/views/sunlight/include/sTypes.h +++ b/src/lib/views/sunlight/include/sTypes.h @@ -44,14 +44,15 @@ sSize(uInt32 _size) { size = _size; width = height = 0; } sSize(uInt32, uInt32); sSize(uInt32, uInt32, uInt32); - virtual ~sSize(void) { }; + virtual ~sSize(void); }; // sSize class sPixelFormat : public sStyle, public ogPixelFmt { public: // sPixelFormat(void); -// sPixelFormat(uInt8, uInt8, uInt8, uInt8, uInt8, -// uInt8, uInt8, uInt8) + sPixelFormat(uInt8, + uInt8, uInt8, uInt8, uInt8, + uInt8, uInt8, uInt8, uInt8); virtual ~sPixelFormat(void) { }; }; // sPixelFormat diff --git a/src/lib/views/sunlight/sTypes.cpp b/src/lib/views/sunlight/sTypes.cpp index 21e6194..174384d 100644 --- a/src/lib/views/sunlight/sTypes.cpp +++ b/src/lib/views/sunlight/sTypes.cpp @@ -28,6 +28,7 @@ } // sRGBA8Color::sRGBAColor sSize::sSize(uInt32 w, uInt32 h) { + cout << "sSize::sSize(uInt32, uInt32);" << endl; size = 0; width = w; height = h; @@ -35,9 +36,21 @@ } // sSize::sSize sSize::sSize(uInt32 s, uInt32 w, uInt32 h) { + cout << "sSize::sSize(uInt32, uInt32, uInt32);" << endl; size = s; width = w; height = h; return; } // sSize::sSize +sSize::~sSize(void) { + cout << "sSize::~sSize()" << endl; + return; +} + +sPixelFormat::sPixelFormat(uInt8 bitsPerPix, + uInt8 RFP, uInt8 GFP, uInt8 BFP, uInt8 AFP, + uInt8 RMS, uInt8 GMS, uInt8 BMS, uInt8 AMS) + : ogPixelFmt( bitsPerPix, RFP, GFP, BFP, AFP, RMS, GMS, BMS, AMS) { + return; +} // sPixelFormat::sPixelFormat diff --git a/src/lib/views/sunlight/vButton.cpp b/src/lib/views/sunlight/vButton.cpp index ed1fb37..3021e46 100644 --- a/src/lib/views/sunlight/vButton.cpp +++ b/src/lib/views/sunlight/vButton.cpp @@ -4,6 +4,8 @@ #include #include +#include + vButton::vButton(vContext * parent) : vContext(parent) { return; } // vButton::vButton diff --git a/src/lib/views/sunlight/vContext.cpp b/src/lib/views/sunlight/vContext.cpp index e502a73..24f7994 100644 --- a/src/lib/views/sunlight/vContext.cpp +++ b/src/lib/views/sunlight/vContext.cpp @@ -105,7 +105,7 @@ vContext::~vContext(void) { delete realView; - pContext = NULL; + realView = pContext = NULL; curX = curY = width = height = 0; return; } // vContext::~vContext