#include <ap_UnixDialog_Goto.h>
Public Member Functions | |
AP_UnixDialog_Goto (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id) | |
virtual | ~AP_UnixDialog_Goto (void) |
virtual void | runModeless (XAP_Frame *pFrame) |
virtual void | notifyActiveFrame (XAP_Frame *pFrame) |
virtual void | activate (void) |
virtual void | destroy (void) |
void | onPageChanged (void) |
void | onLineChanged (void) |
void | onBookmarkDblClicked (void) |
void | onXMLIDDblClicked (void) |
void | onAnnoDblClicked (void) |
void | onJumpClicked (void) |
void | onPrevClicked (void) |
void | onNextClicked (void) |
void | updateCache (AP_JumpTarget target) |
void | updateDocCount (void) |
void | updatePosition (void) |
const GtkWidget * | getWindow (void) |
Static Public Member Functions | |
static XAP_Dialog * | static_constructor (XAP_DialogFactory *, XAP_Dialog_Id id) |
Protected Member Functions | |
void | _constructWindow (XAP_Frame *pFrame) |
void | _updateWindow (void) |
Private Types | |
enum | { COLUMN_NAME = 0, NUM_COLUMNS } |
enum | { COLUMN_ANNO_ID = 0, COLUMN_ANNO_TITLE, COLUMN_ANNO_AUTHOR, NUM_ANNO_COLUMNS } |
Private Member Functions | |
void | _selectPrevBookmark (void) |
Try to select the bookmark before the current one. | |
void | _selectNextBookmark (void) |
Try to select the bookmark after the current one. | |
std::string | _getSelectedBookmarkLabel () |
std::string | _getSelectedXMLIDLabel () |
std::string | _getSelectedAnnotationLabel () |
void | setupXMLIDList (GtkWidget *w) |
void | updateXMLIDList (GtkWidget *w) |
void | setupAnnotationList (GtkWidget *w) |
void | updateAnnotationList (GtkWidget *w) |
Private Attributes | |
GtkWidget * | m_wDialog |
GtkWidget * | m_nbNotebook |
GtkWidget * | m_lbPage |
GtkWidget * | m_lbLine |
GtkWidget * | m_lbBookmarks |
GtkWidget * | m_lbXMLids |
GtkWidget * | m_lbAnnotations |
GtkWidget * | m_sbPage |
GtkWidget * | m_sbLine |
GtkWidget * | m_lvBookmarks |
GtkWidget * | m_btJump |
GtkWidget * | m_btPrev |
GtkWidget * | m_btNext |
GtkWidget * | m_lvXMLIDs |
GtkWidget * | m_lvAnno |
GtkWidget * | m_btClose |
guint | m_iPageConnect |
guint | m_iLineConnect |
AP_JumpTarget | m_JumpTarget |
FV_DocCount | m_DocCount |
anonymous enum [private] |
AP_UnixDialog_Goto::AP_UnixDialog_Goto | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
Ctor.
Referenced by static_constructor().
AP_UnixDialog_Goto::~AP_UnixDialog_Goto | ( | void | ) | [virtual] |
Dtor.
References UT_DEBUGMSG.
void AP_UnixDialog_Goto::_constructWindow | ( | XAP_Frame * | pFrame | ) | [protected] |
Build dialog.
References AP_JUMPTARGET_ANNOTATION, AP_JUMPTARGET_BOOKMARK, AP_JUMPTARGET_LINE, AP_JUMPTARGET_PAGE, AP_JUMPTARGET_XMLID, AP_UnixDialog_Goto__onBookmarkDblClicked(), AP_UnixDialog_Goto__onDeleteWindow(), AP_UnixDialog_Goto__onDialogResponse(), AP_UnixDialog_Goto__onFocusBookmarks(), AP_UnixDialog_Goto__onFocusLine(), AP_UnixDialog_Goto__onFocusPage(), AP_UnixDialog_Goto__onJumpClicked(), AP_UnixDialog_Goto__onLineChanged(), AP_UnixDialog_Goto__onNextClicked(), AP_UnixDialog_Goto__onPageChanged(), AP_UnixDialog_Goto__onPrevClicked(), AP_UnixDialog_Goto__onSwitchPage(), COLUMN_NAME, gchar, AP_Dialog_Goto::getJumpTargets(), XAP_App::getStringSet(), localizeLabel(), m_btClose, m_btJump, m_btNext, m_btPrev, m_iLineConnect, m_iPageConnect, m_lbAnnotations, m_lbBookmarks, m_lbLine, m_lbPage, m_lbXMLids, m_lvAnno, m_lvBookmarks, m_lvXMLIDs, m_nbNotebook, XAP_Dialog::m_pApp, m_sbLine, m_sbPage, m_wDialog, newDialogBuilder(), NUM_COLUMNS, setupAnnotationList(), setupXMLIDList(), targets, text, and UT_DEBUGMSG.
Referenced by runModeless().
std::string AP_UnixDialog_Goto::_getSelectedAnnotationLabel | ( | ) | [private] |
References COLUMN_ANNO_ID, getSelectedUInt(), m_lvAnno, tostr(), and UT_DEBUGMSG.
Referenced by onJumpClicked().
std::string AP_UnixDialog_Goto::_getSelectedBookmarkLabel | ( | ) | [private] |
Get the label of the currently selected bookmark in the list.
References COLUMN_NAME, getSelectedText(), m_lvBookmarks, and UT_DEBUGMSG.
Referenced by onJumpClicked().
std::string AP_UnixDialog_Goto::_getSelectedXMLIDLabel | ( | ) | [private] |
References COLUMN_NAME, getSelectedText(), m_lvXMLIDs, and UT_DEBUGMSG.
Referenced by onJumpClicked().
void AP_UnixDialog_Goto::_selectNextBookmark | ( | void | ) | [private] |
Try to select the bookmark after the current one.
If none is selected the first in the list is picked. Wraps around.
References m_lvBookmarks, selectNext(), and UT_DEBUGMSG.
Referenced by onNextClicked().
void AP_UnixDialog_Goto::_selectPrevBookmark | ( | void | ) | [private] |
Try to select the bookmark before the current one.
If none is selected the last in the list is picked. Wraps around.
References m_lvBookmarks, selectPrev(), and UT_DEBUGMSG.
Referenced by onPrevClicked().
void AP_UnixDialog_Goto::_updateWindow | ( | void | ) | [protected] |
Update dialog's data.
References COLUMN_NAME, AP_Dialog_Goto::ConstructWindowName(), AP_Dialog_Goto::getExistingBookmarksCount(), AP_Dialog_Goto::getNthExistingBookmark(), m_lvAnno, m_lvBookmarks, m_lvXMLIDs, m_wDialog, AP_Dialog_Goto::m_WindowName, updateAnnotationList(), updateDocCount(), updatePosition(), updateXMLIDList(), and UT_DEBUGMSG.
Referenced by activate(), notifyActiveFrame(), and runModeless().
void AP_UnixDialog_Goto::activate | ( | void | ) | [virtual] |
Implements XAP_Dialog_Modeless.
References _updateWindow(), m_wDialog, UT_ASSERT, and UT_DEBUGMSG.
void AP_UnixDialog_Goto::destroy | ( | void | ) | [virtual] |
Implements XAP_Dialog_Modeless.
References m_wDialog, XAP_Dialog_Modeless::modeless_cleanup(), and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onDeleteWindow(), and AP_UnixDialog_Goto__onDialogResponse().
const GtkWidget* AP_UnixDialog_Goto::getWindow | ( | void | ) | [inline] |
References m_wDialog.
Referenced by AP_UnixDialog_Goto__onDeleteWindow().
void AP_UnixDialog_Goto::notifyActiveFrame | ( | XAP_Frame * | pFrame | ) | [virtual] |
Reimplemented from XAP_Dialog_Modeless.
References _updateWindow(), m_JumpTarget, m_wDialog, UT_ASSERT, and UT_DEBUGMSG.
void AP_UnixDialog_Goto::onAnnoDblClicked | ( | void | ) |
References m_JumpTarget, and onJumpClicked().
Referenced by AP_UnixDialog_Goto__onAnnoDblClicked().
void AP_UnixDialog_Goto::onBookmarkDblClicked | ( | void | ) |
Event handler for treeview "bookmarks".
References m_JumpTarget, and onJumpClicked().
Referenced by AP_UnixDialog_Goto__onBookmarkDblClicked().
void AP_UnixDialog_Goto::onJumpClicked | ( | void | ) |
Event handler for button "jump".
References _getSelectedAnnotationLabel(), _getSelectedBookmarkLabel(), _getSelectedXMLIDLabel(), AP_JUMPTARGET_ANNOTATION, AP_JUMPTARGET_BOOKMARK, AP_JUMPTARGET_LINE, AP_JUMPTARGET_PAGE, AP_JUMPTARGET_XMLID, m_iLineConnect, m_JumpTarget, m_sbLine, m_sbPage, AP_Dialog_Goto::performGoto(), text, tostr(), and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onJumpClicked(), onAnnoDblClicked(), onBookmarkDblClicked(), onLineChanged(), onNextClicked(), onPageChanged(), onPrevClicked(), and onXMLIDDblClicked().
void AP_UnixDialog_Goto::onLineChanged | ( | void | ) |
Event handler for spinbutton "line".
References line(), FV_DocCount::line, m_DocCount, m_JumpTarget, m_sbLine, onJumpClicked(), and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onLineChanged().
void AP_UnixDialog_Goto::onNextClicked | ( | void | ) |
Event handler for button "next".
References _selectNextBookmark(), AP_JUMPTARGET_ANNOTATION, AP_JUMPTARGET_BOOKMARK, AP_JUMPTARGET_LINE, AP_JUMPTARGET_PAGE, AP_JUMPTARGET_XMLID, m_JumpTarget, m_lvAnno, m_lvXMLIDs, m_sbLine, m_sbPage, onJumpClicked(), selectNext(), and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onNextClicked().
void AP_UnixDialog_Goto::onPageChanged | ( | void | ) |
Event handler for spinbutton "page".
References m_DocCount, m_JumpTarget, m_sbPage, onJumpClicked(), FV_DocCount::page, and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onPageChanged().
void AP_UnixDialog_Goto::onPrevClicked | ( | void | ) |
Event handler for button "prev".
References _selectPrevBookmark(), AP_JUMPTARGET_ANNOTATION, AP_JUMPTARGET_BOOKMARK, AP_JUMPTARGET_LINE, AP_JUMPTARGET_PAGE, AP_JUMPTARGET_XMLID, FV_DocCount::line, m_DocCount, m_JumpTarget, m_lvAnno, m_lvXMLIDs, m_sbLine, m_sbPage, onJumpClicked(), FV_DocCount::page, selectPrev(), and UT_DEBUGMSG.
Referenced by AP_UnixDialog_Goto__onPrevClicked().
void AP_UnixDialog_Goto::onXMLIDDblClicked | ( | void | ) |
References m_JumpTarget, and onJumpClicked().
Referenced by AP_UnixDialog_Goto__onXMLIDDblClicked().
void AP_UnixDialog_Goto::runModeless | ( | XAP_Frame * | pFrame | ) | [virtual] |
Implements XAP_Dialog_Modeless.
References _constructWindow(), _updateWindow(), abiSetupModelessDialog(), m_wDialog, UT_ASSERT, and UT_DEBUGMSG.
void AP_UnixDialog_Goto::setupAnnotationList | ( | GtkWidget * | w | ) | [private] |
void AP_UnixDialog_Goto::setupXMLIDList | ( | GtkWidget * | w | ) | [private] |
References AP_UnixDialog_Goto__onFocusXMLIDs(), AP_UnixDialog_Goto__onXMLIDDblClicked(), COLUMN_NAME, and NUM_COLUMNS.
Referenced by _constructWindow().
XAP_Dialog * AP_UnixDialog_Goto::static_constructor | ( | XAP_DialogFactory * | pFactory, | |
XAP_Dialog_Id | id | |||
) | [static] |
Static ctor.
References AP_UnixDialog_Goto().
void AP_UnixDialog_Goto::updateAnnotationList | ( | GtkWidget * | w | ) | [private] |
References COLUMN_ANNO_ID, COLUMN_ANNO_TITLE, FV_View::countAnnotations(), FV_View::getAnnotationAuthor(), FV_View::getAnnotationTitle(), AP_Dialog_Goto::getView(), tostr(), and UT_DEBUGMSG.
Referenced by _updateWindow().
void AP_UnixDialog_Goto::updateCache | ( | AP_JumpTarget | target | ) |
Set jump target and update cached data like number of lines and pages.
References m_JumpTarget, and updateDocCount().
Referenced by AP_UnixDialog_Goto__onFocusAnno(), AP_UnixDialog_Goto__onFocusBookmarks(), AP_UnixDialog_Goto__onFocusLine(), AP_UnixDialog_Goto__onFocusPage(), and AP_UnixDialog_Goto__onFocusXMLIDs().
void AP_UnixDialog_Goto::updateDocCount | ( | void | ) |
Update cached data like number of lines and pages.
References FV_View::countWords(), AP_Dialog_Goto::getView(), FV_DocCount::line, m_DocCount, FV_DocCount::page, and UT_DEBUGMSG.
Referenced by _updateWindow(), and updateCache().
void AP_UnixDialog_Goto::updatePosition | ( | void | ) |
References FV_View::getCurrentPageNumForStatusBar(), AP_Dialog_Goto::getView(), m_iLineConnect, m_iPageConnect, m_sbLine, and m_sbPage.
Referenced by _updateWindow(), and AP_UnixDialog_Goto__onSwitchPage().
void AP_UnixDialog_Goto::updateXMLIDList | ( | GtkWidget * | w | ) | [private] |
References COLUMN_NAME, AP_Dialog_Goto::getRDF(), and UT_DEBUGMSG.
Referenced by _updateWindow().
GtkWidget* AP_UnixDialog_Goto::m_btClose [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_btJump [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_btNext [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_btPrev [private] |
Referenced by _constructWindow().
FV_DocCount AP_UnixDialog_Goto::m_DocCount [private] |
Referenced by onLineChanged(), onPageChanged(), onPrevClicked(), and updateDocCount().
guint AP_UnixDialog_Goto::m_iLineConnect [private] |
Referenced by _constructWindow(), onJumpClicked(), and updatePosition().
guint AP_UnixDialog_Goto::m_iPageConnect [private] |
Referenced by _constructWindow(), and updatePosition().
GtkWidget* AP_UnixDialog_Goto::m_lbAnnotations [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_lbBookmarks [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_lbLine [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_lbPage [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_lbXMLids [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_lvAnno [private] |
Referenced by _constructWindow(), _getSelectedAnnotationLabel(), _updateWindow(), onNextClicked(), and onPrevClicked().
GtkWidget* AP_UnixDialog_Goto::m_lvBookmarks [private] |
Referenced by _constructWindow(), _getSelectedBookmarkLabel(), _selectNextBookmark(), _selectPrevBookmark(), and _updateWindow().
GtkWidget* AP_UnixDialog_Goto::m_lvXMLIDs [private] |
Referenced by _constructWindow(), _getSelectedXMLIDLabel(), _updateWindow(), onNextClicked(), and onPrevClicked().
GtkWidget* AP_UnixDialog_Goto::m_nbNotebook [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_Goto::m_sbLine [private] |
Referenced by _constructWindow(), onJumpClicked(), onLineChanged(), onNextClicked(), onPrevClicked(), and updatePosition().
GtkWidget* AP_UnixDialog_Goto::m_sbPage [private] |
Referenced by _constructWindow(), onJumpClicked(), onNextClicked(), onPageChanged(), onPrevClicked(), and updatePosition().
GtkWidget* AP_UnixDialog_Goto::m_wDialog [private] |
Referenced by _constructWindow(), _updateWindow(), activate(), destroy(), getWindow(), notifyActiveFrame(), and runModeless().