Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

XAP_Dialog_ListDocuments Class Reference

#include <xap_Dlg_ListDocuments.h>

Inheritance diagram for XAP_Dialog_ListDocuments:
XAP_Dialog_NonPersistent XAP_Dialog XAP_UnixDialog_ListDocuments XAP_Win32Dialog_ListDocuments

List of all members.

Public Types

enum  tAnswer { a_OK, a_CANCEL }

Public Member Functions

 XAP_Dialog_ListDocuments (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id)
virtual ~XAP_Dialog_ListDocuments (void)
virtual void runModal (XAP_Frame *pFrame)=0
XAP_Dialog_ListDocuments::tAnswer getAnswer (void) const
AD_DocumentgetDocument (void) const
void setIncludeActiveDoc (bool b)

Protected Member Functions

void _setAnswer (XAP_Dialog_ListDocuments::tAnswer a)
UT_sint32 _getDocumentCount ()
const char * _getNthDocumentName (UT_sint32 n) const
void _setSelDocumentIndx (UT_sint32 i)
const char * _getTitle () const
const char * _getOKButtonText () const
const char * _getHeading () const

Private Member Functions

void _init ()

Private Attributes

XAP_Dialog_ListDocuments::tAnswer m_answer
UT_sint32 m_ndxSelDoc
UT_Vector m_vDocs
bool m_bIncludeActiveDoc

Detailed Description

This dialogue lists documents that are open; by default the current document is excluded from the list. This can be changed by calling setIncludeActiveDocument(true) before the dialogue is displayed.

PLATFORM NOTES -------------- Platform subclasses need to provide the usual static_constructor() and runModal() methods.

The dialogue contains a single column list which is filled by document names using _getDocumentCount() and _getNthDocumentName(). There is a heading text for the list, obtained through _getHeading();

When the user selects a particular entry on the list, _setSelDocumentIndx() should be called to store the index of the selection (if the subclass sorts the list, it needs to ensure that the index stored is the original index of that entry).

There should be two buttons: OK and Cancel; the text for the OK button needs to be obtained using _getOKButtonText().

Title for the dialogue window is obtained through _getTitle().

(this dialogue is very much like ListRevisions, except the list has only one column and the OK button label is not static)

Member Enumeration Documentation


Constructor & Destructor Documentation

XAP_Dialog_ListDocuments::XAP_Dialog_ListDocuments ( XAP_DialogFactory pDlgFactory,
XAP_Dialog_Id  id 

References _init().

XAP_Dialog_ListDocuments::~XAP_Dialog_ListDocuments ( void   )  [virtual]

Member Function Documentation

UT_sint32 XAP_Dialog_ListDocuments::_getDocumentCount (  )  [inline, protected]
const char * XAP_Dialog_ListDocuments::_getHeading (  )  const [protected]
const char * XAP_Dialog_ListDocuments::_getTitle (  )  const [protected]
void XAP_Dialog_ListDocuments::_setAnswer ( XAP_Dialog_ListDocuments::tAnswer  a  )  [inline, protected]
void XAP_Dialog_ListDocuments::_setSelDocumentIndx ( UT_sint32  i  )  [protected]
XAP_Dialog_ListDocuments::tAnswer XAP_Dialog_ListDocuments::getAnswer ( void   )  const [inline]

Referenced by s_doListDocuments().

AD_Document * XAP_Dialog_ListDocuments::getDocument ( void   )  const
virtual void XAP_Dialog_ListDocuments::runModal ( XAP_Frame pFrame  )  [pure virtual]
void XAP_Dialog_ListDocuments::setIncludeActiveDoc ( bool  b  ) 

References _init(), and m_bIncludeActiveDoc.

Referenced by s_doListDocuments().

Member Data Documentation

The documentation for this class was generated from the following files: