X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fwindow.cpp;fp=src%2Fgui%2Fwindow.cpp;h=0000000000000000000000000000000000000000;hb=94e1e961b57f253b760298ab0bae96a7de6d20fa;hp=9b2358bd232b6ec692526dd46089d8e88888268e;hpb=f95620384355f3db89f779e1e7be59260ecfc6ff;p=virtualjaguar diff --git a/src/gui/window.cpp b/src/gui/window.cpp deleted file mode 100644 index 9b2358b..0000000 --- a/src/gui/window.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// -// Window class -// -// by James L. Hammons -// - -#include "window.h" - -#include "guimisc.h" - -Window::Window(uint32 x/*= 0*/, uint32 y/*= 0*/, uint32 w/*= 0*/, uint32 h/*= 0*/, - void (* f)(Element *)/*= NULL*/): Element(x, y, w, h), -// /*clicked(false), inside(false),*/ fgColor(0x4FF0), bgColor(0x1E10), -//4FF0 -> 010011 11111 10000 -> 0100 1101 1111 1111 1000 0100 -> 4D FF 84 -//1E10 -> 000111 10000 10000 -> 0001 1111 1000 0100 1000 0100 -> 1F 84 84 - /*clicked(false), inside(false),*/ fgColor(0xFF84FF4D), bgColor(0xFF84841F), - handler(f) -{ - close = new Button(w - (CLOSEBOX_WIDTH + 1), 1, closeBox, closeBoxHover, closeBoxDown); - list.push_back(close); - close->SetNotificationElement(this); -} - -Window::~Window() -{ - for(uint32 i=0; iHandleKey(key); -} - -void Window::HandleMouseMove(uint32 x, uint32 y) -{ - // Handle the items this window contains... - for(uint32 i=0; iHandleMouseMove(x - extents.x, y - extents.y); -} - -void Window::HandleMouseButton(uint32 x, uint32 y, bool mouseDown) -{ - // Handle the items this window contains... - for(uint32 i=0; iHandleMouseButton(x - extents.x, y - extents.y, mouseDown); -} - -void Window::Draw(uint32 offsetX/*= 0*/, uint32 offsetY/*= 0*/) -{ - uint32 addr = (extents.x + offsetX) + ((extents.y + offsetY) * pitch); - - for(uint32 y=0; yDraw(extents.x, extents.y); -} - -void Window::AddElement(Element * e) -{ - list.push_back(e); -} - -void Window::Notify(Element * e) -{ - if (e == close) - { - SDL_Event event; - event.type = SDL_USEREVENT, event.user.code = WINDOW_CLOSE; - SDL_PushEvent(&event); - } -}