ToasterBoxWindow::ToasterBoxWindow(wxWindow* parent, wxTimer *_parent2) : ToasterBase(parent, wxNO_BORDER|wxSTAY_ON_TOP|wxFRAME_NO_TASKBAR) { startTime = wxGetLocalTime(); parent2 = _parent2; sleepTime = 10; step = 4; pauseTime = 1700; textColor = *wxWHITE; popupText = _T("Change Me!"); //the size we want the dialog to be wxSize dialogSize(150, 170); count++; bottomRight = wxPoint(wxGetDisplaySize().GetWidth(), wxGetDisplaySize().GetHeight()); SetSize(bottomRight.x, bottomRight.y, dialogSize.GetWidth(), dialogSize.GetHeight()); ToasterBase::Connect( wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)& ToasterBoxWindow::OnEraseBackground); ToasterBase::Connect( wxEVT_PAINT, (wxObjectEventFunction)& ToasterBoxWindow::OnPaint); #ifndef __WXMSW__ PushEventHandler( new wxBackgroundBitmap( charArr2wxBitmap( notif_bg_png, sizeof(notif_bg_png) ) ) ); #endif }
ToasterBoxWindow::ToasterBoxWindow(wxWindow* parent, wxTimer* _parent2) : startTime(wxGetLocalTime()) , parent2(_parent2) , sleepTime(10) , pauseTime(1700) , textColor(*wxWHITE) , headerTextColor(*wxBLUE) , popupText(_T("Change Me!")) , shrink(false) { Create(parent, wxID_ANY); SetWindowStyleFlag(wxNO_BORDER | wxSTAY_ON_TOP | wxFRAME_NO_TASKBAR); count++; //the size we want the dialog to be wxSize dialogSize(150, 170); bottomRight = wxPoint(wxGetDisplaySize().GetWidth(), wxGetDisplaySize().GetHeight()); SetSize(bottomRight.x, bottomRight.y, dialogSize.GetWidth(), dialogSize.GetHeight()); ToasterBase::Connect(wxEVT_PAINT, (wxObjectEventFunction)&ToasterBoxWindow::OnPaint); SetBackgroundBitmap(charArr2wxBitmap(notif_bg_png, sizeof(notif_bg_png))); }