#include <PDFView.h>
Public Member Functions | |
GooString * | getPassword () |
GtkWidget * | getWindow () |
void | initPan (const int x, const int y) |
void | initZoomRect (const int x, const int y) |
void | adjustZoomRect (const int x, const int y) |
GBool | isSmallOffset (const int x, const int y) |
double | calRatio (rectangle &rect, GBool bZoomin=gTrue) |
int | lessThreshold (const rectangle &rect) |
GBool | doLink (const int pn, int offsetX, int offsetY) |
GBool | doAction (LinkAction *action) |
void | cvtDevToUser (CPageInfo *page, const int offsetX, const int offsetY, double &ux, double &uy) |
int | getLinkPage (LinkAction *action) |
void | issueNewRequests () |
void | issueItem (const int pn, GBool bHead=gTrue, const int time=0) |
void | issuePrevNextPages (const int offset, const int from=0, const int time=0) |
void | issueLinks (CPageInfo *page) |
void | issueLink (Link *p) |
GBool | isPanEnable () |
GBool | isZoomInEnable () |
GBool | isZoomOutEnable () |
GBool | isScribbleEnable () |
GBool | isEraseEnable () |
GBool | isPageMode () |
GBool | isContinousMode () |
void | setPageMode () |
void | setContinousMode () |
GBool | isPortraitView () |
GBool | isLandscapeView () |
CPDFView (GtkWidget *win, Controller *c) | |
~CPDFView (void) | |
void | installEventHandler (GtkWidget *win) |
void | initializeViews () |
void | rotateContinousMode (const int angle) |
void | rotatePageMode (const int angle) |
void | refreshDeviceScreen (eDmQuality quality, GBool bOff=gTrue) |
void | displayPage (const int pageNumber, const ContinousModeScroll mode=ScrollToPage) |
void | onClose () |
void | quit () |
Static Public Member Functions | |
static void | ipcCbk (gpointer client_data, gint *file_descriptor, GdkInputCondition id) |
static gboolean | exposeCbk (GtkWidget *, GdkEventExpose *, gpointer) |
static gboolean | buttonPressCbk (GtkWidget *, GdkEventButton *, gpointer) |
static gboolean | buttonReleaseCbk (GtkWidget *, GdkEventButton *, gpointer) |
static gboolean | motionNotifyCbk (GtkWidget *, GdkEventMotion *, gpointer) |
static gboolean | keyPressCbk (GtkWidget *, GdkEventKey *, gpointer) |
static gboolean | deleteCbk (GtkWidget *, GdkEvent *, gpointer) |
Public Attributes | |
Controller * | ctrl |
rectangle | zoomRect |
point | panPt |
Private Attributes | |
GtkWidget * | drawArea |
GBool | bAuth |
GooString * | password |
int | dialogDone |
Definition at line 44 of file PDFView.h.
CPDFView::CPDFView | ( | GtkWidget * | win, | |
Controller * | c | |||
) |
Definition at line 41 of file PDFView.cpp.
00042 { 00043 drawArea = win; ctrl = c; 00044 00045 // install IPC callback message handler 00046 int nRet = 0, fd = -1; 00047 erServerChannel_t channel; 00048 nRet = erIpcOpenServerChannel(ER_PDF_VIEWER_CHANNEL, &channel); 00049 ctrl->channels.erIpcChannel = channel; 00050 fd = erIpcGetServerFd(channel); 00051 00052 gdk_input_add (fd, 00053 GDK_INPUT_READ, 00054 (GdkInputFunction)ipcCbk, 00055 (gpointer) this); 00056 00057 // password dialog 00058 bAuth = gFalse; 00059 password = NULL; 00060 00061 // others 00062 panPt.x = panPt.y = 0; 00063 zoomRect.left = zoomRect.top = zoomRect.right = zoomRect.bottom = 0; 00064 portraitView.setView(this); 00065 landscapeView.setView(this); 00066 00067 installEventHandler(win); 00068 }
CPDFView::~CPDFView | ( | void | ) |
GooString * CPDFView::getPassword | ( | ) |
Definition at line 687 of file PDFView.cpp.
00688 { 00689 // printf("CPDFView::getPassword\n"); 00690 dialogDone = -1; 00691 bAuth = gTrue; 00692 GtkAuthDialog dlg; 00693 gtk_window_fullscreen(GTK_WINDOW(drawArea)); 00694 if (!dlg.popupAuthDialog(this)) 00695 { 00696 if (password) 00697 { 00698 delete password; 00699 password = NULL; 00700 } 00701 } 00702 else 00703 { 00704 password = new GooString(dlg.getPassword()); 00705 } 00706 return password; 00707 }
GtkWidget* CPDFView::getWindow | ( | ) | [inline] |
void CPDFView::initPan | ( | const int | x, | |
const int | y | |||
) |
void CPDFView::initZoomRect | ( | const int | x, | |
const int | y | |||
) |
void CPDFView::adjustZoomRect | ( | const int | x, | |
const int | y | |||
) |
Definition at line 135 of file PDFView.cpp.
00136 { 00137 if (zoomRect.left > x) 00138 { 00139 zoomRect.left = x; 00140 } 00141 if (zoomRect.top > y) 00142 { 00143 zoomRect.top = y; 00144 } 00145 if (zoomRect.right < x) 00146 { 00147 zoomRect.right = x; 00148 } 00149 if (zoomRect.bottom < y) 00150 { 00151 zoomRect.bottom = y; 00152 } 00153 }
GBool CPDFView::isSmallOffset | ( | const int | x, | |
const int | y | |||
) |
Definition at line 155 of file PDFView.cpp.
00156 { 00157 if (isPanEnable()) 00158 { 00159 return (abs(panPt.x - x) < SmallOffset && 00160 abs(panPt.y - y) < SmallOffset); 00161 } 00162 if (isZoomInEnable() || 00163 isZoomOutEnable()) 00164 { 00165 adjustZoomRect(x, y); 00166 return (abs(zoomRect.left - zoomRect.right) < SmallOffset && 00167 abs(zoomRect.top - zoomRect.bottom) < SmallOffset); 00168 } 00169 return gTrue; 00170 }
double CPDFView::calRatio | ( | rectangle & | rect, | |
GBool | bZoomin = gTrue | |||
) |
Definition at line 329 of file PDFView.cpp.
00330 { 00331 double ratio = 1.0 , tmp = 1.0; 00332 int width = abs(rect.right - rect.left) + 1; // avoid / 0 00333 int height = abs(rect.bottom - rect.top) + 1; // avoid / 0 00334 00335 if (bZoomin) 00336 { 00337 ratio = (double)ctrl->settings.getScreenWidth() / (double)width; 00338 tmp = (double)ctrl->settings.getScreenHeight() / (double)height; 00339 } 00340 else 00341 { 00342 ratio = (double)width / (double)ctrl->settings.getScreenWidth(); 00343 tmp = (double)height / (double)ctrl->settings.getScreenHeight(); 00344 } 00345 if (ratio > tmp) return tmp; 00346 return ratio; 00347 }
int CPDFView::lessThreshold | ( | const rectangle & | rect | ) |
Definition at line 172 of file PDFView.cpp.
00173 { 00174 if (rect.right - rect.left < RectThreshold) 00175 { 00176 return SmallWidth; 00177 } 00178 00179 if (rect.bottom - rect.top < RectThreshold) 00180 { 00181 return SmallHeight; 00182 } 00183 return SmallNone; 00184 }
GBool CPDFView::doLink | ( | const int | pn, | |
int | offsetX, | |||
int | offsetY | |||
) |
Definition at line 619 of file PDFView.cpp.
00620 { 00621 CPageInfo * page = ctrl->pageList.getPage(pn); 00622 if (NULL == page || NULL == page->links) return gFalse; 00623 double ux = 0.0, uy = 0.0; 00624 cvtDevToUser(page, offsetX, offsetY, ux, uy); 00625 LinkAction * action = page->links->find(ux, uy); 00626 if (NULL == action) return gFalse; 00627 return doAction(action); 00628 }
GBool CPDFView::doAction | ( | LinkAction * | action | ) |
Definition at line 630 of file PDFView.cpp.
00631 { 00632 PV_LOGPRINTF("Do some action!"); 00633 LinkActionKind kind; 00634 LinkDest *dest = NULL; 00635 UGooString *namedDest = NULL; 00636 00637 switch (kind = action->getKind()) 00638 { 00639 case actionGoTo: 00640 ctrl->channels.busy_blink(); 00641 PV_LOGPRINTF("actionGoTo"); 00642 dest = ((LinkGoTo *)action)->getDest(); 00643 namedDest = ((LinkGoTo *)action)->getNamedDest(); 00644 if (dest && dest->isPageRef()) 00645 { 00646 Ref pageRef = dest->getPageRef(); 00647 int pageNumber = ctrl->core->getPDFDoc()->findPage(pageRef.num, pageRef.gen); 00648 PV_LOGPRINTF("Goto Page %d", pageNumber); 00649 displayPage(pageNumber); 00650 return gTrue; 00651 } 00652 else if (namedDest) 00653 { 00654 dest = ctrl->core->getPDFDoc()->findDest(namedDest); 00655 if (dest) 00656 { 00657 Ref pageRef = dest->getPageRef(); 00658 int pageNumber = ctrl->core->getPDFDoc()->findPage(pageRef.num, pageRef.gen); 00659 PV_LOGPRINTF("Goto Page %d", pageNumber); 00660 displayPage(pageNumber); 00661 return gTrue; 00662 } 00663 } 00664 break; 00665 case actionLaunch: 00666 PV_LOGPRINTF("actionLaunch!"); 00667 break; 00668 00669 case actionNamed: 00670 PV_LOGPRINTF("actionNamed!"); 00671 break; 00672 case actionURI: 00673 PV_LOGPRINTF("actionURI!"); 00674 break; 00675 case actionMovie: 00676 PV_LOGPRINTF("actionMovie!"); 00677 break; 00678 default: 00679 PV_LOGPRINTF("unknown!"); 00680 break; 00681 } 00682 return gFalse; 00683 }
void CPDFView::cvtDevToUser | ( | CPageInfo * | page, | |
const int | offsetX, | |||
const int | offsetY, | |||
double & | ux, | |||
double & | uy | |||
) |
int CPDFView::getLinkPage | ( | LinkAction * | action | ) |
Definition at line 427 of file PDFView.cpp.
00428 { 00429 if (NULL == action) return -1; 00430 LinkActionKind kind; 00431 LinkDest *dest = NULL; 00432 UGooString *namedDest = NULL; 00433 00434 switch (kind = action->getKind()) 00435 { 00436 case actionGoTo: 00437 dest = ((LinkGoTo *)action)->getDest(); 00438 namedDest = ((LinkGoTo *)action)->getNamedDest(); 00439 if (dest && dest->isPageRef()) 00440 { 00441 Ref pageRef = dest->getPageRef(); 00442 return ctrl->core->getPDFDoc()->findPage(pageRef.num, pageRef.gen); 00443 } 00444 else if (namedDest) 00445 { 00446 dest = ctrl->core->getPDFDoc()->findDest(namedDest); 00447 if (dest) 00448 { 00449 Ref pageRef = dest->getPageRef(); 00450 return ctrl->core->getPDFDoc()->findPage(pageRef.num, pageRef.gen); 00451 } 00452 } 00453 break; 00454 default: 00455 break; 00456 } 00457 return -1; 00458 }
void CPDFView::issueNewRequests | ( | ) |
Definition at line 463 of file PDFView.cpp.
00464 { 00465 CPageInfo * page = ctrl->pageList.getPage(ctrl->settings.getCurrentPage()); 00466 PV_LOGPRINTF("Current page %d %p\n", ctrl->settings.getCurrentPage(), page); 00467 ctrl->thread.clearTodoList(); 00468 if (page) 00469 { 00470 if (page->links) 00471 { 00472 int count = page->links->getNumLinks(); 00473 if (count <= 0) 00474 { 00475 issuePrevNextPages(RenderWidth); 00476 } 00477 else 00478 { 00479 // the new pre-render scheme: 00480 // * pre-render the next/prev 1 00481 // * pre-render the hyperlink 00482 // * pre-render the left next/prev 5 00483 issuePrevNextPages(RenderWidth - RenderFrom, RenderFrom); 00484 issueLinks(page); 00485 issuePrevNextPages(RenderFrom, 0, TimeOffset); 00486 } 00487 } 00488 else 00489 { 00490 issuePrevNextPages(RenderWidth); 00491 } 00492 } 00493 else 00494 { 00495 issuePrevNextPages(RenderWidth); 00496 } 00497 ctrl->thread.signal(); 00498 }
void CPDFView::issueItem | ( | const int | pn, | |
GBool | bHead = gTrue , |
|||
const int | time = 0 | |||
) |
Definition at line 369 of file PDFView.cpp.
00370 { 00371 if (pn < 1 || pn > ctrl->core->getNumPages()) 00372 { 00373 PV_LOGPRINTF("Do not issue page %d", pn); 00374 return; 00375 } 00376 PV_LOGPRINTF("IssueItem %d\n", pn); 00377 TodoItem * item = new TodoItem; 00378 item->pageNumber = pn; 00379 item->rotate = ctrl->settings.getRotate(); 00380 item->zoom = ctrl->calZoom(pn); 00381 item->timeStamp = ctrl->getTimeStamp() + time; 00382 ctrl->thread.addTodoItem(item, bHead); 00383 }
void CPDFView::issuePrevNextPages | ( | const int | offset, | |
const int | from = 0 , |
|||
const int | time = 0 | |||
) |
Definition at line 385 of file PDFView.cpp.
00386 { 00387 if (ctrl->settings.getRenderDir() == RenderPrev) 00388 { 00389 for(int i = width; i >= 1; --i) 00390 { 00391 issueItem(ctrl->settings.getCurrentPage() - from - i, gTrue, timeOffset); 00392 } 00393 } 00394 else if (ctrl->settings.getRenderDir() == RenderNext) 00395 { 00396 for(int i = width; i >= 1; --i) 00397 { 00398 issueItem(ctrl->settings.getCurrentPage() + from + i, gTrue, timeOffset); 00399 } 00400 } 00401 }
void CPDFView::issueLinks | ( | CPageInfo * | page | ) |
Definition at line 403 of file PDFView.cpp.
00404 { 00405 if (NULL == page->links) return; 00406 int count = page->links->getNumLinks(); 00407 PV_LOGPRINTF("Link count %d in page %d", count, page->pageNumber); 00408 for(int i = 0; i < count; ++i) 00409 { 00410 issueLink(page->links->getLink(i)); 00411 } 00412 }
void CPDFView::issueLink | ( | Link * | p | ) |
Definition at line 414 of file PDFView.cpp.
00415 { 00416 if (NULL == p) return; 00417 int pn = getLinkPage(p->getAction()); 00418 if (pn >= 1) 00419 { 00420 PV_LOGPRINTF("Issue page %d", pn); 00421 issueItem(pn); 00422 return; 00423 } 00424 PV_LOGPRINTF("Invalid link page number %d!", pn); 00425 }
GBool CPDFView::isPanEnable | ( | ) |
Definition at line 186 of file PDFView.cpp.
00187 { 00188 return ctrl->channels.isPanEnable(); 00189 }
GBool CPDFView::isZoomInEnable | ( | ) |
Definition at line 191 of file PDFView.cpp.
00192 { 00193 return ctrl->channels.isZoomInEnable(); 00194 }
GBool CPDFView::isZoomOutEnable | ( | ) |
Definition at line 196 of file PDFView.cpp.
00197 { 00198 return ctrl->channels.isZoomOutEnable(); 00199 }
GBool CPDFView::isScribbleEnable | ( | ) |
Definition at line 201 of file PDFView.cpp.
00202 { 00203 return ctrl->channels.isScribbleEnable(); 00204 }
GBool CPDFView::isEraseEnable | ( | ) |
Definition at line 206 of file PDFView.cpp.
00207 { 00208 return ctrl->channels.isEraseEnable(); 00209 }
GBool CPDFView::isPageMode | ( | ) |
GBool CPDFView::isContinousMode | ( | ) |
Definition at line 216 of file PDFView.cpp.
00217 { 00218 return (ctrl->settings.getMode() & ModeContinous); 00219 }
void CPDFView::setPageMode | ( | ) |
void CPDFView::setContinousMode | ( | ) |
Definition at line 226 of file PDFView.cpp.
00227 { 00228 ctrl->settings.setMode(ModeContinous); 00229 }
GBool CPDFView::isPortraitView | ( | ) |
GBool CPDFView::isLandscapeView | ( | ) |
void CPDFView::installEventHandler | ( | GtkWidget * | win | ) |
Definition at line 94 of file PDFView.cpp.
00095 { 00096 drawArea = window; 00097 00098 gtk_signal_connect (GTK_OBJECT (window), "expose_event", 00099 GTK_SIGNAL_FUNC (exposeCbk), this); 00100 00101 gtk_signal_connect (GTK_OBJECT (window), "button_press_event", 00102 GTK_SIGNAL_FUNC (buttonPressCbk), this); 00103 00104 gtk_signal_connect (GTK_OBJECT (window), "button_release_event", 00105 GTK_SIGNAL_FUNC (buttonReleaseCbk), this); 00106 00107 gtk_signal_connect (GTK_OBJECT (window), "motion_notify_event", 00108 GTK_SIGNAL_FUNC (motionNotifyCbk), this); 00109 00110 gtk_signal_connect (GTK_OBJECT (window), "key_press_event", 00111 GTK_SIGNAL_FUNC (keyPressCbk), this); 00112 00113 gtk_signal_connect (GTK_OBJECT (window), "delete_event", 00114 GTK_SIGNAL_FUNC (deleteCbk), this); 00115 }
void CPDFView::initializeViews | ( | ) |
Definition at line 70 of file PDFView.cpp.
00071 { 00072 // close dialog 00073 if (bAuth) 00074 { 00075 bAuth = gFalse; 00076 gtk_window_unfullscreen(GTK_WINDOW(drawArea)); 00077 } 00078 00079 // init the views 00080 if (isLandscapeView()) 00081 { 00082 landscapeView.init(); 00083 } 00084 else 00085 { 00086 portraitView.init(); 00087 } 00088 }
void CPDFView::rotateContinousMode | ( | const int | angle | ) |
Definition at line 572 of file PDFView.cpp.
00573 { 00574 int rot = ctrl->settings.getRotate(); 00575 rot += angle; 00576 if (rot < 0) rot += 360; 00577 else if (rot >= 360) rot -= 360; 00578 ctrl->settings.setRotate(rot); 00579 00580 // switch mode now. not enough to only switch x & y 00581 if (ctrl->settings.getRotate() == 270 || ctrl->settings.getRotate() == 90) 00582 { 00583 int x = ctrl->settings.getScreenX(); 00584 ctrl->settings.setScreenX(ctrl->settings.getScreenY()); 00585 ctrl->settings.setScreenY(x); 00586 } 00587 else 00588 { 00589 int x = ctrl->settings.getScreenX(); 00590 ctrl->settings.setScreenX(ctrl->settings.getScreenY()); 00591 ctrl->settings.setScreenY(x); 00592 } 00593 00594 // when rotate, disable zoomback 00595 ctrl->settings.disableZoomBack(); 00596 00597 initializeViews(); 00598 displayPage(ctrl->settings.getCurrentPage(), ScrollToPosition); 00599 }
void CPDFView::rotatePageMode | ( | const int | angle | ) |
Definition at line 525 of file PDFView.cpp.
00526 { 00527 // get page info 00528 CPageInfo * page = ctrl->pageList.getPage(ctrl->settings.getCurrentPage()); 00529 00530 // calculate intersection 00531 rectangle rect; rect.left = 0; rect.top = 0; 00532 rect.right = ctrl->settings.getScreenWidth(); 00533 rect.bottom = ctrl->settings.getScreenHeight(); 00534 if (ctrl->settings.getScreenX() > 0) rect.left = ctrl->settings.getScreenX(); 00535 if (ctrl->settings.getScreenY() > 0) rect.top = ctrl->settings.getScreenY(); 00536 if (rect.right > ctrl->settings.getScreenX() + page->bitmap->getWidth()) 00537 { 00538 rect.right = ctrl->settings.getScreenX() + page->bitmap->getWidth(); 00539 } 00540 if (rect.bottom > ctrl->settings.getScreenY() + page->bitmap->getHeight()) 00541 { 00542 rect.bottom = ctrl->settings.getScreenY() + page->bitmap->getHeight(); 00543 } 00544 point center; 00545 center.x = ((rect.left + rect.right) >> 1); 00546 center.y = ((rect.top + rect.bottom) >> 1); 00547 int distX = 0, distY = 0; 00548 00549 // calculate the new position 00550 if (angle == 90) 00551 { 00552 distX = center.x - ctrl->settings.getScreenX(); 00553 distY = page->bitmap->getHeight() - center.y + ctrl->settings.getScreenY(); 00554 ctrl->settings.setScreenX(center.x - distY); 00555 ctrl->settings.setScreenY(center.y - distX); 00556 } 00557 else if (angle == -90) 00558 { 00559 distX = page->bitmap->getWidth() - center.x + ctrl->settings.getScreenX(); 00560 distY = center.y - ctrl->settings.getScreenY(); 00561 ctrl->settings.setScreenX(center.x - distY); 00562 ctrl->settings.setScreenY(center.y - distX); 00563 } 00564 int rot = angle + ctrl->settings.getRotate(); 00565 if (rot < 0) rot += 360; 00566 else if (rot >= 360) rot -= 360; 00567 00568 ctrl->settings.setRotate(rot); 00569 displayPage(ctrl->settings.getCurrentPage()); 00570 }
void CPDFView::refreshDeviceScreen | ( | eDmQuality | quality, | |
GBool | bOff = gTrue | |||
) |
void CPDFView::displayPage | ( | const int | pageNumber, | |
const ContinousModeScroll | mode = ScrollToPage | |||
) |
Definition at line 355 of file PDFView.cpp.
00356 { 00357 // which view should be used 00358 if (isPortraitView()) 00359 { 00360 portraitView.displayPage(pageNumber, mode); 00361 } 00362 else if (isLandscapeView()) 00363 { 00364 landscapeView.displayPage(pageNumber, mode); 00365 } 00366 }
void CPDFView::onClose | ( | ) |
Definition at line 117 of file PDFView.cpp.
00118 { 00119 portraitView.clear(); 00120 landscapeView.clear(); 00121 ctrl->scbMgr.close(); 00122 }
void CPDFView::quit | ( | ) |
Definition at line 709 of file PDFView.cpp.
00710 { 00711 // close 00712 onClose(); 00713 00714 // turn on busy indicator 00715 ctrl->channels.busy_blink(); 00716 ctrl->app->quit(!bAuth); 00717 }
void CPDFView::ipcCbk | ( | gpointer | client_data, | |
gint * | file_descriptor, | |||
GdkInputCondition | id | |||
) | [static] |
Definition at line 501 of file PDFView.cpp.
00503 { 00504 CPDFView *viewer = (CPDFView *)client_data; 00505 if (viewer->bAuth) return; // in password dialog 00506 00507 if (viewer->isPortraitView()) 00508 { 00509 portraitView.ipcCbk(fd, id); 00510 } 00511 else if (viewer->isLandscapeView()) 00512 { 00513 landscapeView.ipcCbk(fd, id); 00514 } 00515 }
gboolean CPDFView::exposeCbk | ( | GtkWidget * | widget, | |
GdkEventExpose * | event, | |||
gpointer | ptr | |||
) | [static] |
Definition at line 245 of file PDFView.cpp.
00246 { 00247 CPDFView * view = (CPDFView *)ptr; 00248 if (view->isPortraitView()) 00249 { 00250 if (!portraitView.isReady()) return TRUE; 00251 } 00252 else if (view->isLandscapeView()) 00253 { 00254 if (!landscapeView.isReady()) return TRUE; 00255 } 00256 00257 // draw now 00258 if (view->ctrl->settings.getCurrentPage() > 0) 00259 { 00260 view->displayPage(view->ctrl->settings.getCurrentPage(), ScrollRedraw); 00261 } 00262 return TRUE; 00263 }
gboolean CPDFView::buttonPressCbk | ( | GtkWidget * | widget, | |
GdkEventButton * | event, | |||
gpointer | user_data | |||
) | [static] |
Definition at line 265 of file PDFView.cpp.
00266 { 00267 CPDFView *view = (CPDFView *)user_data; 00268 if (view->isPortraitView()) 00269 { 00270 return portraitView.buttonPressCbk(event); 00271 } 00272 else if (view->isLandscapeView()) 00273 { 00274 return landscapeView.buttonPressCbk(event); 00275 } 00276 return TRUE; 00277 }
gboolean CPDFView::buttonReleaseCbk | ( | GtkWidget * | widget, | |
GdkEventButton * | event, | |||
gpointer | user_data | |||
) | [static] |
Definition at line 279 of file PDFView.cpp.
00280 { 00281 CPDFView *view = (CPDFView *)user_data; 00282 if (view->isPortraitView()) 00283 { 00284 return portraitView.buttonReleaseCbk(event); 00285 } 00286 else if (view->isLandscapeView()) 00287 { 00288 return landscapeView.buttonReleaseCbk(event); 00289 } 00290 return TRUE; 00291 }
gboolean CPDFView::motionNotifyCbk | ( | GtkWidget * | widget, | |
GdkEventMotion * | event, | |||
gpointer | user_data | |||
) | [static] |
Definition at line 293 of file PDFView.cpp.
00294 { 00295 CPDFView *view = (CPDFView *)user_data; 00296 if (view->isPortraitView()) 00297 { 00298 return portraitView.motionNotifyCbk(event); 00299 } 00300 else if (view->isLandscapeView()) 00301 { 00302 return landscapeView.motionNotifyCbk(event); 00303 } 00304 return TRUE; 00305 }
gboolean CPDFView::keyPressCbk | ( | GtkWidget * | widget, | |
GdkEventKey * | event, | |||
gpointer | user_data | |||
) | [static] |
Definition at line 307 of file PDFView.cpp.
00308 { 00309 CPDFView *view = (CPDFView *)user_data; 00310 if (view->isPortraitView()) 00311 { 00312 return portraitView.keyPressCbk(event); 00313 } 00314 else if (view->isLandscapeView()) 00315 { 00316 return landscapeView.keyPressCbk(event); 00317 } 00318 return FALSE; 00319 }
gboolean CPDFView::deleteCbk | ( | GtkWidget * | widget, | |
GdkEvent * | event, | |||
gpointer | user_data | |||
) | [static] |
GtkWidget* CPDFView::drawArea [private] |
GBool CPDFView::bAuth [private] |
GooString* CPDFView::password [private] |
int CPDFView::dialogDone [private] |