Popup::Popup(Theme &theme, const rect_t &rect, Pane *pContent, IControl *pOwner) : _theme(theme), // init theme before anything else :) _pCapture(NULL), _pFocus(NULL), _pPane(NULL), _pHover(NULL), _bInternal(false) { setPane(pContent); // TODO rect; // needed? pOwner; // needed? }
Popup::Popup(Theme &theme) : _theme(theme), // init theme before anything else :) _pCapture(NULL), _pFocus(NULL), _pPane(NULL), _pHover(NULL), _bInternal(false) { Pane *pPane = new Pane(0, _theme, eDown); pPane->setWeight(eDown, 1); //pPane->watch(this); //pPane->setDesktop(this); Fill *pFill = new Fill(0, _theme); pPane->Add(pFill, 0, 2048, 1); setPane(pPane); }
XFE_MailDownloadView::XFE_MailDownloadView(XFE_Component *toplevel_component, Widget parent, XFE_View *parent_view, MWContext *context, MSG_Pane *parent_pane, MSG_Pane *p) : XFE_MNView(toplevel_component, parent_view, context, p) { Widget form; XmString xmstr = XmStringCreate(XP_GetString(XFE_DOWNLOADING_NEW_MESSAGES), XmFONTLIST_DEFAULT_TAG); XmFontList fontList; form = XtCreateWidget("topArea", xmFormWidgetClass, parent, NULL, 0); m_label = XtVaCreateManagedWidget("label", xmLabelWidgetClass, form, XmNlabelString, xmstr, NULL); m_logo = new XFE_Logo((XFE_Frame*)toplevel_component, form, "logo"); XtVaGetValues(m_label, XmNfontList, &fontList, NULL); // we need more space, or else the window is *tiny* XtVaSetValues(m_label, XmNwidth, XmStringWidth(fontList, xmstr) * 2, NULL); XmStringFree(xmstr); /* now do the attachments. */ XtVaSetValues(m_label, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_WIDGET, XmNrightWidget, m_logo->getBaseWidget(), XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET, XmNtopWidget, m_logo->getBaseWidget(), XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET, XmNbottomWidget, m_logo->getBaseWidget(), NULL); XtVaSetValues(m_logo->getBaseWidget(), XmNleftAttachment, XmATTACH_NONE, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_NONE, XmNtopAttachment, XmATTACH_FORM, NULL); m_logo->show(); if (!p) setPane(MSG_CreateProgressPane(m_contextData, XFE_MNView::getMaster(), parent_pane)); setBaseWidget(form); }
XFE_SubscribeView::XFE_SubscribeView(XFE_Component *toplevel_component, Widget parent, XFE_View *parent_view, MWContext *context, MSG_Host *host, MSG_Pane *p) : XFE_MNView(toplevel_component, parent_view, context, p) { Widget folder; XFE_SubAllView *suballview; XFE_SubSearchView *subsearchview; XFE_SubNewView *subnewview; int all_buttons_maxwidth, search_buttons_maxwidth, new_buttons_maxwidth; int max_button_width; if (!p) { setPane(MSG_CreateSubscribePaneForHost(m_contextData, XFE_MNView::m_master, host)); XP_ASSERT(m_pane != 0); } getToplevel()->registerInterest(XFE_View::chromeNeedsUpdating, this, (XFE_FunctionNotification)updateButtons_cb); folder = XtVaCreateWidget("subscribeFolder", xmlFolderWidgetClass, parent, NULL); setBaseWidget(folder); XtAddCallback(folder, XmNactivateCallback, tab_activate_callback, this); suballview = new XFE_SubAllView(toplevel_component, folder, this, m_contextData, m_pane); subsearchview = new XFE_SubSearchView(toplevel_component, folder, this, m_contextData, m_pane); subnewview = new XFE_SubNewView(toplevel_component, folder, this, m_contextData, m_pane); addView(suballview); addView(subsearchview); addView(subnewview); all_buttons_maxwidth = suballview->getButtonsMaxWidth(); search_buttons_maxwidth = subsearchview->getButtonsMaxWidth(); new_buttons_maxwidth = subnewview->getButtonsMaxWidth(); max_button_width = all_buttons_maxwidth; if (search_buttons_maxwidth > max_button_width) max_button_width = search_buttons_maxwidth; if (new_buttons_maxwidth > max_button_width) max_button_width = new_buttons_maxwidth; suballview->setButtonsWidth(max_button_width); subsearchview->setButtonsWidth(max_button_width); subnewview->setButtonsWidth(max_button_width); suballview->show(); subsearchview->show(); subnewview->show(); // make the subtabview generate the list of of servers. XFE_SubTabView::syncServerList(); static MSG_SubscribeCallbacks subscribe_callbacks = { XFE_SubscribeView::do_fetch_group, XFE_SubscribeView::fetch_completed }; // since the all tab is the visible one when we start. tab_activate(0); MSG_SubscribeSetCallbacks(m_pane, &subscribe_callbacks, this); }