diff options
| author | Chris Apers | 2004-11-09 11:06:40 +0000 | 
|---|---|---|
| committer | Chris Apers | 2004-11-09 11:06:40 +0000 | 
| commit | efb7ffe22f9fbb5f4a98a999d65075eec9844ad9 (patch) | |
| tree | c2ea34613077b7a2616004a45388b1d0caa57772 | |
| parent | 8068fd40d4a9503fa61b3695468cca1afc7d40ec (diff) | |
| download | scummvm-rg350-efb7ffe22f9fbb5f4a98a999d65075eec9844ad9.tar.gz scummvm-rg350-efb7ffe22f9fbb5f4a98a999d65075eec9844ad9.tar.bz2 scummvm-rg350-efb7ffe22f9fbb5f4a98a999d65075eec9844ad9.zip | |
Added pre-init capability
svn-id: r15749
| -rw-r--r-- | backends/PalmOS/Src/forms/formtabs.cpp | 16 | ||||
| -rw-r--r-- | backends/PalmOS/Src/forms/formtabs.h | 4 | 
2 files changed, 17 insertions, 3 deletions
| diff --git a/backends/PalmOS/Src/forms/formtabs.cpp b/backends/PalmOS/Src/forms/formtabs.cpp index dcf2419bf4..d862c9a8bb 100644 --- a/backends/PalmOS/Src/forms/formtabs.cpp +++ b/backends/PalmOS/Src/forms/formtabs.cpp @@ -26,7 +26,7 @@ void TabDeleteTabs(TabType *tabP) {  	delete tabP;  } -Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscID) { +Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscID, TabProc *preInit) {  	FormType *srcP;  	UInt16 cnt;  	void *objP, **dstP; @@ -37,6 +37,11 @@ Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscI  	dstP = (void **)frmP;  	srcP = FrmInitForm(rscID); + +	if (preInit) { +		preInit(srcP); +	} +  	objNum = FrmGetNumberOfObjects(srcP);  	// save tab data @@ -49,7 +54,7 @@ Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscI  	tabP->tabs[tabP->count].last	= FrmGetObjectId(srcP, objNum - 1);  	tabP->count++;  	tabP->active = tabP->count; -	 +  	// create tab  	FntSetFont(stdFont);  	x = 4 + tabP->width; @@ -124,6 +129,13 @@ Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscI  				FrmHideObject((FormType *)*dstP, FrmGetObjectIndex((FormType *)*dstP, id));  				break;  			} + +			case frmBitmapObj: { +/*				UInt16 family = id + 1; +				FrmNewBitmap((FormType **)dstP, id, id, x, y); +				//FrmHideObject((FormType *)*dstP, FrmGetObjectIndex((FormType *)*dstP, id)); +*/				break; +			}  		}  	} diff --git a/backends/PalmOS/Src/forms/formtabs.h b/backends/PalmOS/Src/forms/formtabs.h index 8109034463..a3602f3d98 100644 --- a/backends/PalmOS/Src/forms/formtabs.h +++ b/backends/PalmOS/Src/forms/formtabs.h @@ -13,9 +13,11 @@ typedef struct {  	TabDataPtr tabs;  } TabType, *TabPtr; +typedef void (TabProc)(FormType *); +  TabType	*TabNewTabs		(UInt16 cnt);  void 	 TabDeleteTabs	(TabType *tabP); -Err 	 TabAddContent	(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscID); +Err 	 TabAddContent	(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscID, TabProc *preInit = 0);  void 	 TabSetActive	(FormType *frmP, TabType *tabP, UInt16 num);  #endif
\ No newline at end of file | 
