PersistentTransientWindow::PersistentTransientWindow(const std::string& title, const Glib::RefPtr<Gtk::Window>& parent, bool hideOnDelete) : TransientWindow(title, parent, hideOnDelete) { setParentWindow(parent); }
//constructor MGuiWindow::MGuiWindow(const MVector2 & position, const MVector2 & scale, const MVector4 & color, void (* pointerEvent)(MGuiWindow * window, MGuiEvent * guiEvent)): m_breakEvents(false), m_margin(10, 10), m_isScrolled(false), m_scroll(0, 0), m_minScroll(0, 0), m_maxScroll(0, 0), m_hScrollSlide(MVector2(0, scale.y-6), MVector2(50, 6), MVector4(1, 1, 1, 0.3f), NULL), m_vScrollSlide(MVector2(scale.x-6, 0), MVector2(6, 50), MVector4(1, 1, 1, 0.3f), NULL) { m_hScrollSlide.setParentWindow(this); m_vScrollSlide.setParentWindow(this); setParentWindow(NULL); setPosition(position); setScale(scale); setNormalColor(color); setPointerEvent(pointerEvent); // horizontal slide m_hScrollSlide.setScrollAffect(false); m_hScrollSlide.setMinValue(0); m_hScrollSlide.setMaxValue(1); // vertical slide m_vScrollSlide.setScrollAffect(false); m_vScrollSlide.setMinValue(0); m_vScrollSlide.setMaxValue(1); resizeScroll(); }
void setParentApp(App *app) { App::Windows ws = app->windows(); if (ws.size() > 0) { setParentWindow(*(ws[0])); } else { std::cout << "ERROR: Can't attach to app. No windows available." << std::endl; } }
// constructor MGuiImage::MGuiImage(const char * filename, const MVector2 & position, const MVector2 & scale, const MVector4 & color) { setNormalTexture(filename); setParentWindow(NULL); setPosition(position); setScale(scale); setNormalColor(color); }
WinWidget::WinWidget(const WId parent) : QWidget(0, Qt::FramelessWindowHint | Qt::Window) { setParentWindow(parent); resize(200, 150); move(10, 10); setWindowTitle("Test"); }
// constructor MGuiSlide::MGuiSlide(MVector2 position, MVector2 scale, MVector4 color, void (* pointerEvent)(MGuiSlide * slide, MGuiEvent * guiEvent)): m_value(0), m_minValue(0), m_maxValue(1) { m_button.setPosition(position); m_button.setScale(scale); setDirection(MVector2(10, 0)); setParentWindow(NULL); setPosition(position); setScale(getDirection() + scale); setNormalColor(color); setHighLightColor(color); setPressedColor(color); setPointerEvent(pointerEvent); }
//constructor MGuiEditText::MGuiEditText(const char * text, const MVector2 & position, float size, const MVector4 & color, void (* pointerEvent)(MGuiEditText * editText, MGuiEvent * guiEvent)): m_charId(0), m_startSelectionId(0), m_endSelectionId(0), m_limitLength(false), m_maxLength(0), m_isSingleLine(false) { setParentWindow(NULL); setText(text); setPosition(position); setTextSize(size); setNormalColor(color); setHighLightColor(color); setPressedColor(color); setPointerEvent(pointerEvent); autoScaleFromText(); }
WinWidget::WinWidget(const WCHAR *classname, const WCHAR *title) : QWidget(0, Qt::FramelessWindowHint | Qt::Window) { //setAttribute(Qt::WA_TranslucentBackground); //setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_TransparentForMouseEvents); //setAttribute(Qt::WA_DeleteOnClose); //setAttribute(Qt::WA_QuitOnClose); //setWindowState(windowState() | Qt::WindowMaximized); const HWND win = ::FindWindow(classname, title); if (win != NULL && ::IsWindow(win) == TRUE) { qWarning() << "Window found."; setParentWindow(win); } resize(200, 150); move(10, 10); setWindowTitle("Test"); }
ImagineWBSWindow::ImagineWBSWindow(ImagineWBSWindow *window) { setParentWindow(window); };
void QQuickMenuPopupWindow::setParentItem(QQuickItem *item) { QQuickPopupWindow::setParentItem(item); if (item) setParentWindow(item->window()); }