void XFE_LdapSearchView::buildResultTable() { int num_columns = 5; int visible_num_columns = 4; static int column_widths[] = {10, 20, 20, 10, 10}; m_outliner = new XFE_Outliner("addressList", this, getToplevel(), m_result.container, False, // constantSize True, // hasHeadings num_columns, visible_num_columns, column_widths, OUTLINER_GEOMETRY_PREF); Pixel bg; XtVaGetValues(m_outliner->getBaseWidget(), XmNbackground, &bg, 0); if (!m_personIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg, &m_personIcon, NULL, MN_Person.width, MN_Person.height, MN_Person.mono_bits, MN_Person.color_bits, MN_Person.mask_bits, FALSE); m_outliner->setMultiSelectAllowed(True); #if !defined(USE_MOTIF_DND) m_outliner->setDragType(FE_DND_LDAP_ENTRY, &m_personIcon, this); #endif /* USE_MOTIF_DND */ m_outliner->setHideColumnsAllowed(True); }
XFE_ABDirListView::XFE_ABDirListView(XFE_Component *toplevel_component, Widget parent, XFE_View *parent_view, MWContext *context, XP_List *directories): XFE_MNListView(toplevel_component, parent_view, context, (MSG_Pane *)NULL), #if !defined(USE_ABCOM) m_directories(directories) #else m_containerLine(NULL), m_activeContainer(NULL) #endif /* USE_ABCOM */ { /* initialize */ m_dir = 0; m_dirLine = 0; m_ancestorInfo = 0; m_deleted_directories = NULL; /* For outliner */ int num_columns = OUTLINER_COLUMN_LAST; static int column_widths[] = {23}; m_outliner = new XFE_Outliner("dirList", this, toplevel_component, parent, False, // constantSize True, // hasHeadings num_columns, num_columns,// num_visible column_widths, AB_DIR_OUTLINER_GEOMETRY_PREF); m_outliner->setHideColumnsAllowed(False); m_outliner->setPipeColumn(OUTLINER_COLUMN_NAME); /* BEGIN_3P: XmLGrid */ XtVaSetValues(m_outliner->getBaseWidget(), XtVaTypedArg, XmNblankBackground, XmRString, "white", 6, // XmNselectionPolicy, XmSELECT_MULTIPLE_ROW, XmNvisibleRows, 15, NULL); XtVaSetValues(m_outliner->getBaseWidget(), XmNcellDefaults, True, XtVaTypedArg, XmNcellBackground, XmRString, "white", 6, NULL); /* END_3P: XmLGrid */ #if defined(USE_ABCOM) // todo: check return val int error = AB_CreateContainerPane(&m_pane, context, fe_getMNMaster()); error = AB_SetShowPropertySheetForDirFunc(m_pane, &XFE_ABDirListView::ShowPropertySheetForDirFunc); error = AB_InitializeContainerPane(m_pane); m_nDirs = MSG_GetNumLines(m_pane); #if defined(DEBUG_tao) printf("\n MSG_GetNumLines, m_nDirs=%d\n", m_nDirs); #endif #else /* XFE_Outliner constructor does not allocate any content row * XFE_Outliner::change(int first, int length, int newnumrows) */ if (directories) { m_nDirs = XP_ListCount(directories); }/* if */ #endif /* USE_ABCOM */ m_outliner->change(0, m_nDirs, m_nDirs); m_outliner->show(); if (m_nDirs) m_outliner->selectItemExclusive(0); setBaseWidget(m_outliner->getBaseWidget()); XtVaSetValues(getBaseWidget(), XmNpaneMinimum, 1, XmNpaneMaximum, 10000, NULL); /* initialize the icons if they haven't already been */ Pixel bg_pixel; XtVaGetValues(m_outliner->getBaseWidget(), XmNbackground, &bg_pixel, 0); if (!m_openParentIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), /* umm. fix me */ BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg_pixel, &m_openParentIcon, NULL, oparent.width, oparent.height, oparent.mono_bits, oparent.color_bits, oparent.mask_bits, FALSE); if (!m_closedParentIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), /* umm. fix me */ BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg_pixel, &m_closedParentIcon, NULL, cparent.width, cparent.height, cparent.mono_bits, cparent.color_bits, cparent.mask_bits, FALSE); if (!m_pabIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), /* umm. fix me */ BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg_pixel, &m_pabIcon, NULL, MNC_AddressSmall.width, MNC_AddressSmall.height, MNC_AddressSmall.mono_bits, MNC_AddressSmall.color_bits, MNC_AddressSmall.mask_bits, FALSE); if (!m_ldapDirIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), /* umm. fix me */ BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg_pixel, &m_ldapDirIcon, NULL, MN_FolderServer.width, MN_FolderServer.height, MN_FolderServer.mono_bits, MN_FolderServer.color_bits, MN_FolderServer.mask_bits, FALSE); if (!m_mListIcon.pixmap) fe_NewMakeIcon(getToplevel()->getBaseWidget(), /* umm. fix me */ BlackPixelOfScreen(XtScreen(m_outliner->getBaseWidget())), bg_pixel, &m_mListIcon, NULL, MN_People.width, MN_People.height, MN_People.mono_bits, MN_People.color_bits, MN_People.mask_bits, FALSE); } XFE_ABDirListView::~XFE_ABDirListView() { } #if defined(USE_ABCOM) int XFE_ABDirListView::ShowPropertySheetForDirFunc(DIR_Server *server, MWContext *context, MSG_Pane *pane, XP_Bool newDirectory) { #if defined(DEBUG_tao) printf("\n XFE_ABDirListView::ShowPropertySheetForDirFunc, newDirectory=%d\n", newDirectory); #endif XFE_ABDirPropertyDlg* Dlg = new XFE_ABDirPropertyDlg(CONTEXT_WIDGET(context), "abDirProperties", True, context); Dlg->setDlgValues(server); Dlg->setPane(pane); Dlg->show(); return 1; }