#include "ScribbleDefine.h"

Go to the source code of this file.
Functions | |
| void | jump_to_page (PScribbleUICtx pScribbleUICtx) |
| void | resetCurrentPage (PScribbleUICtx pScribbleUICtx, const int iNewCurrPageNum) |
| gboolean | addOnepage (PScribbleUICtx pScribbleUICtx) |
| gboolean | delOnepage (PScribbleUICtx pScribbleUICtx) |
| void | exitAllThreads () |
| void | quit (gpointer data) |
| gboolean addOnepage | ( | PScribbleUICtx | pScribbleUICtx | ) |
Definition at line 108 of file ScribbleUI.c.
00109 { 00110 PFileManager pFM=&pScribbleUICtx->fileManager; 00111 insertNewPageAfterCurr(pFM); 00112 SB_LOGPRINTF("after insert[total=%d,curropen=%d]\n", 00113 getTotalPage(pFM),getCurrPageNo(pFM)); 00114 00115 //goto the new page,it will flush the pagebar. 00116 resetCurrentPage(pScribbleUICtx,getCurrPageNo(pFM)+1); 00117 return TRUE; 00118 }

| gboolean delOnepage | ( | PScribbleUICtx | pScribbleUICtx | ) |
Definition at line 121 of file ScribbleUI.c.
00122 { 00123 PFileManager pFM=&pScribbleUICtx->fileManager; 00124 if( 0!=deleteCurrPage(pFM) ) 00125 { 00126 SB_ERRORPRINTF("del fail\n"); 00127 return FALSE; 00128 } 00129 SB_LOGPRINTF("after del[total=%d,curropen=%d]\n", 00130 getTotalPage(pFM),getCurrPageNo(pFM)); 00131 00132 flushPageBar(pFM); 00133 //reset toolbar 00134 toolbar_reinit( getTotalPage(pFM) ); 00135 //goto the new page. 00136 jump_to_page(pScribbleUICtx); 00137 return TRUE; 00138 }

| void exitAllThreads | ( | ) |
| void jump_to_page | ( | PScribbleUICtx | pScribbleUICtx | ) |
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.
Definition at line 58 of file ScribbleUI.c.
00059 { 00060 SB_LOGPRINTF("__start__...\n"); 00061 erbusy_blink(); 00062 if ( 0!= loadPageAndResultImg(pScribbleUICtx) ) 00063 { 00064 erbusy_off(); 00065 SB_ERRORPRINTF("Error loading page and result image\n"); 00066 } 00067 else 00068 { 00069 gtk_widget_queue_draw(pScribbleUICtx->drawing_area); 00070 } 00071 SB_LOGPRINTF("__finish__...\n"); 00072 }

| void quit | ( | gpointer | data | ) |
void destroyScribbleUICtx(PScribbleUICtx pScribbleUICtx) { if(pScribbleUICtx) { destroyScribbleCoreCtx(&pScribbleUICtx->scribbleCoreCtx); FreeFileManager(&pScribbleUICtx->fileManager); } }
Definition at line 399 of file ScribbleUI.c.
00400 { 00401 SB_LOGPRINTF("__start__\n"); 00402 00403 // show busy, stop GTK main loop 00404 erbusy_blink(); 00405 gtk_main_quit(); 00406 }

| void resetCurrentPage | ( | PScribbleUICtx | pScribbleUICtx, | |
| const int | iNewCurrPageNum | |||
| ) |
Definition at line 75 of file ScribbleUI.c.
00077 { 00078 SB_LOGPRINTF("__start__\n"); 00079 PFileManager pFM=&pScribbleUICtx->fileManager; 00080 int iOldCurrPage=getCurrPageNo(pFM); 00081 SB_LOGPRINTF("\nold current=%d,wanto=%d\n",iOldCurrPage,iNewPageNum); 00082 if( iNewPageNum==iOldCurrPage ) 00083 { 00084 SB_LOGPRINTF("no need to chage page,curr==%d\n",iNewPageNum); 00085 return; 00086 } 00087 //when switch, save current page. 00088 savePageAndResultImg(pScribbleUICtx,FALSE); 00089 00090 jumptoScribPage(pFM,iNewPageNum); 00091 int iNewCurrPage=getCurrPageNo(pFM); 00092 SB_LOGPRINTF("\nnew current=%d\n",iNewCurrPage); 00093 if( iOldCurrPage==iNewCurrPage ) 00094 { 00095 SB_LOGPRINTF("no need to chage page,last curr==%d\n",iNewCurrPage); 00096 return; 00097 } 00098 00099 SB_LOGPRINTF("will jump to %d\n",getCurrPageNo(pFM)); 00100 flushPageBar(pFM); 00101 //reset toolbar 00102 toolbar_reinit( getTotalPage(pFM) ); 00103 jump_to_page(pScribbleUICtx); 00104 SB_LOGPRINTF("__finish__\n"); 00105 }

1.5.6