You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(36) |
Sep
(44) |
Oct
(25) |
Nov
(2) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
(4) |
Aug
(8) |
Sep
(16) |
Oct
|
Nov
(2) |
Dec
(28) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(5) |
Aug
(7) |
Sep
(9) |
Oct
(31) |
Nov
(25) |
Dec
(21) |
2011 |
Jan
(2) |
Feb
(12) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mapi B. <ma...@us...> - 2009-11-03 10:05:00
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19243 Modified Files: EasyCalc.cpp EasyCalc.gif EasyCalc.layout Log Message: 1.25c Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EasyCalc.layout 2 Nov 2009 17:36:50 -0000 1.7 --- EasyCalc.layout 3 Nov 2009 10:04:52 -0000 1.8 *************** *** 202,206 **** # e^(ix) 2^x e^x 10^x [ ] # EE log2 ln log ( ) ! Key: 48,77 6,97,32,22 11,102,22,12 11,101 Key: 61,62 45,97,32,22 50,102,22,12 50,101 Key: 30,38 84,97,32,22 89,102,22,12 89,101 --- 202,206 ---- # e^(ix) 2^x e^x 10^x [ ] # EE log2 ln log ( ) ! Key: 49,77 6,97,32,22 11,102,22,12 11,101 Key: 61,62 45,97,32,22 50,102,22,12 50,101 Key: 30,38 84,97,32,22 89,102,22,12 89,101 *************** *** 221,238 **** Key: 35,50 201,149,32,22 206,154,22,12 206,153 # 4th row ! # A B C acos ! # 4 5 6 x cos Key: 4,10 6,163,40,29 11,168,30,19 11,167 Key: 5,11 53,163,40,29 58,168,30,19 58,167 Key: 6,12 101,163,40,29 106,168,30,19 106,167 ! Key: 24 148,163,40,29 153,168,30,19 153,167 Key: 36,51 201,174,32,22 201,179,22,12 201,178 # 5th row ! # i e pi # 1 2 3 - ANS Key: 1,45 6,199,40,29 11,204,30,19 11,203 Key: 2,46 53,199,40,29 58,204,30,19 58,203 Key: 3,40 101,199,40,29 106,204,30,19 106,203 ! Key: 22 148,199,40,29 153,204,30,19 153,203 Key: 26 196,199,40,29 201,204,30,19 201,203 # 6th row --- 221,238 ---- Key: 35,50 201,149,32,22 206,154,22,12 206,153 # 4th row ! # A B C ° acos ! # 4 5 6 * cos Key: 4,10 6,163,40,29 11,168,30,19 11,167 Key: 5,11 53,163,40,29 58,168,30,19 58,167 Key: 6,12 101,163,40,29 106,168,30,19 106,167 ! Key: 24,41 148,163,40,29 153,168,30,19 153,167 Key: 36,51 201,174,32,22 201,179,22,12 201,178 # 5th row ! # i e pi ' # 1 2 3 - ANS Key: 1,45 6,199,40,29 11,204,30,19 11,203 Key: 2,46 53,199,40,29 58,204,30,19 58,203 Key: 3,40 101,199,40,29 106,204,30,19 106,203 ! Key: 22,42 148,199,40,29 153,204,30,19 153,203 Key: 26 196,199,40,29 201,204,30,19 201,203 # 6th row Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsUxRtM1 and /tmp/cvsrvfQyH differ Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EasyCalc.cpp 2 Nov 2009 17:36:50 -0000 1.6 --- EasyCalc.cpp 3 Nov 2009 10:04:52 -0000 1.7 *************** *** 58,62 **** #define MAX_LOADSTRING 100 ! #define EASYCALC_APPVERSION _T("1.25b") #define WM_APP_ENDVMENU (WM_APP+1) --- 58,62 ---- #define MAX_LOADSTRING 100 ! #define EASYCALC_APPVERSION _T("1.25c") #define WM_APP_ENDVMENU (WM_APP+1) |
From: Mapi B. <ma...@us...> - 2009-11-03 10:04:17
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19197 Modified Files: Main.cpp Log Message: 1.25c Index: Main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/Main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Main.cpp 25 Oct 2009 17:52:15 -0000 1.3 --- Main.cpp 3 Nov 2009 10:04:08 -0000 1.4 *************** *** 318,323 **** if ((skin->get_insert_pos(hwnd_edit) == 0) && operatr) { skin->insert_input_text(hwnd_edit, _T("ans")); ! if (startp != endp) endp += 3; } int len = _tcslen(text); --- 318,325 ---- if ((skin->get_insert_pos(hwnd_edit) == 0) && operatr) { skin->insert_input_text(hwnd_edit, _T("ans")); ! if (startp != endp) { ! startp += 3; endp += 3; + } } int len = _tcslen(text); |
From: Mapi B. <ma...@us...> - 2009-11-03 10:03:53
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19149 Modified Files: ReadMe.txt Log Message: 1.25c Index: ReadMe.txt =================================================================== RCS file: /cvsroot/easycalc/PPCport/ReadMe.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ReadMe.txt 2 Nov 2009 17:05:08 -0000 1.5 --- ReadMe.txt 3 Nov 2009 10:03:42 -0000 1.6 *************** *** 21,26 **** --- 21,42 ---- + Uninstall: + ---------- + - Simply delete the following files from the place where they were put: + EasyCalc.exe + EasyCalc.gif + EasyCalc.layout + lang.rcp + state.bin + Releases: --------- + * 1.25c PPC: + - Error in .layout file, EXP/EE key was pointing at ')'. + - Bug in text selection (coming from legacy code) after key text insert, + which was causing x^y and x^(1/y) to select wrong length of text + when at beginning of input line. + - Added the ° (degree) and ' (minutes) keys as shift on '*' and '-' + * 1.25b PPC: - Display bugs on togonio() and torad() fixed. *************** *** 34,37 **** --- 50,54 ---- - Set selection of text and default focus to edit boxes in dialogs for ease of use. + * 1.25a PPC: - initial PPC port release *************** *** 96,99 **** --- 113,121 ---- selected, it is put between brackets instead of being overwritten. + - Corrected bug in text selection after key text insert, which was causing + x^y and x^(1/y) to select wrong length of text when at beginning of input + line. This was only showing on x^(1/y) in the legacy version, because of + the text insert difference on x^y between the two versions. + - ask() panel has the classical V, F and f buttons to enter text (no button in the legacy Palm app, just an input text area). *************** *** 103,108 **** boxes, items must be all the same. ! - Added an Append button in addition to Insert, to add an items at end of ! list in the List Editor. - In List Editor, New list, Append and Insert now loop on getting values, --- 125,130 ---- boxes, items must be all the same. ! - In List Editor, added an Append button in addition to Insert, to add item(s) ! at end of list. - In List Editor, New list, Append and Insert now loop on getting values, *************** *** 110,113 **** --- 132,150 ---- Press Cancel to end the loop. + - Viewing results longer than the result display size is not done by a tap + and drag, but by clicking on the arrows at left or right of the screen. + Will see how to do the tap and drag thing also in PocketPC version later. + + + Still missing in 1.25c: + ----------------------- + - Matrix editor + - Solver interface + - Financial Manager + - Import / export to notepad (memopad in PalmOS) + - Support for multiple skins (only 1 for now) + - Graphes + - ... that should be all ... + Bugs: |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:47
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26597 Modified Files: core_globals.cpp Log Message: 1.25b Index: core_globals.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_globals.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_globals.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- core_globals.cpp 2 Nov 2009 17:22:33 -0000 1.3 *************** *** 35,39 **** int pending_command = 0; ! bool mode_shift; bool mode_running = false; int (*mode_interruptible)(int) = NULL; --- 35,39 ---- int pending_command = 0; ! bool mode_shift = false; bool mode_running = false; int (*mode_interruptible)(int) = NULL; |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:44
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26302 Modified Files: ansops.cpp core_display.cpp core_display.h core_globals.h core_main.cpp core_main.h varmgr.cpp varmgr.h Added Files: lstedit.cpp lstedit.h Log Message: 1.25b Index: core_globals.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_globals.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core_globals.h 21 Oct 2009 20:55:03 -0000 1.4 --- core_globals.h 2 Nov 2009 17:20:08 -0000 1.5 *************** *** 20,63 **** - //#include "EasyCalc.h" - - - /**********/ - /* Errors */ - /**********/ - #define ERR_NONE 0 - #define ERR_ALPHA_DATA_IS_INVALID 1 - #define ERR_INSUFFICIENT_MEMORY 2 - #define ERR_NOT_YET_IMPLEMENTED 3 - #define ERR_OUT_OF_RANGE 4 - #define ERR_DIVIDE_BY_0 5 - #define ERR_INVALID_TYPE 6 - #define ERR_INVALID_DATA 7 - #define ERR_DIMENSION_ERROR 8 - #define ERR_SIZE_ERROR 9 - #define ERR_INTERNAL_ERROR 10 - #define ERR_NONEXISTENT 11 - #define ERR_RESTRICTED_OPERATION 12 - #define ERR_YES 13 - #define ERR_NO 14 - #define ERR_STOP 15 - #define ERR_LABEL_NOT_FOUND 16 - #define ERR_NO_REAL_VARIABLES 17 - #define ERR_NO_COMPLEX_VARIABLES 18 - #define ERR_NO_MATRIX_VARIABLES 19 - #define ERR_NO_MENU_VARIABLES 20 - #define ERR_STAT_MATH_ERROR 21 - #define ERR_INVALID_FORECAST_MODEL 22 - #define ERR_SOLVE_INTEG_RTN_LOST 23 - #define ERR_SINGULAR_MATRIX 24 - #define ERR_SOLVE_SOLVE 25 - #define ERR_INTEG_INTEG 26 - #define ERR_RUN 27 - #define ERR_INTERRUPTED 28 - #define ERR_PRINTING_IS_DISABLED 29 - #define ERR_INTERRUPTIBLE 30 - #define ERR_NO_VARIABLES 31 - - /*************/ /* Key codes */ --- 20,23 ---- *************** *** 71,76 **** #define KEY_SHIFT -5 #define KEY_NONE -6 ! //#define KEY_EXIT 33 ! //#define KEY_RUN 36 /*********************/ --- 31,35 ---- #define KEY_SHIFT -5 #define KEY_NONE -6 ! #define RESULT_AREA -99 /*********************/ *************** *** 119,200 **** - /*********/ - /* Menus */ - /*********/ - #define MENU_NONE -1 - #define MENU_SHORTCUT -2 - #define MENU_ALPHA1 0 - #define MENU_ALPHA2 1 - #define MENU_ALPHA_ABCDE1 2 - #define MENU_ALPHA_ABCDE2 3 - #define MENU_ALPHA_FGHI 4 - #define MENU_ALPHA_JKLM 5 - #define MENU_ALPHA_NOPQ1 6 - #define MENU_ALPHA_NOPQ2 7 - #define MENU_ALPHA_RSTUV1 8 - #define MENU_ALPHA_RSTUV2 9 - #define MENU_ALPHA_WXYZ 10 - #define MENU_ALPHA_PAREN 11 - #define MENU_ALPHA_ARROW 12 - #define MENU_ALPHA_COMP 13 - #define MENU_ALPHA_MATH 14 - #define MENU_ALPHA_PUNC1 15 - #define MENU_ALPHA_PUNC2 16 - #define MENU_ALPHA_MISC1 17 - #define MENU_ALPHA_MISC2 18 - #define MENU_ST 19 - #define MENU_IND_ST 20 - #define MENU_IND 21 - #define MENU_MODES1 22 - #define MENU_MODES2 23 - #define MENU_DISP 24 - #define MENU_CLEAR1 25 - #define MENU_CLEAR2 26 - #define MENU_CONVERT1 27 - #define MENU_CONVERT2 28 - #define MENU_FLAGS 29 - #define MENU_PROB 30 - #define MENU_CUSTOM1 31 - #define MENU_CUSTOM2 32 - #define MENU_CUSTOM3 33 - #define MENU_PGM_FCN1 34 - #define MENU_PGM_FCN2 35 - #define MENU_PGM_FCN3 36 - #define MENU_PGM_FCN4 37 - #define MENU_PGM_XCOMP0 38 - #define MENU_PGM_XCOMPY 39 - #define MENU_PRINT1 40 - #define MENU_PRINT2 41 - #define MENU_PRINT3 42 - #define MENU_TOP_FCN 43 - #define MENU_CATALOG 44 - #define MENU_BLANK 45 - #define MENU_PROGRAMMABLE 46 - #define MENU_VARMENU 47 - #define MENU_STAT1 48 - #define MENU_STAT2 49 - #define MENU_STAT_CFIT 50 - #define MENU_STAT_MODL 51 - #define MENU_MATRIX1 52 - #define MENU_MATRIX2 53 - #define MENU_MATRIX3 54 - #define MENU_MATRIX_SIMQ 55 - #define MENU_MATRIX_EDIT1 56 - #define MENU_MATRIX_EDIT2 57 - #define MENU_BASE 58 - #define MENU_BASE_A_THRU_F 59 - #define MENU_BASE_LOGIC 60 - #define MENU_SOLVE 61 - #define MENU_INTEG 62 - #define MENU_INTEG_PARAMS 63 - - /***********************/ /* Variable data types */ /***********************/ - - - /******************/ /* Emulator state */ --- 78,85 ---- --- NEW FILE: lstedit.h --- /* * $Id: lstedit.h,v 1.1 2009/11/02 17:20:08 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _LSTEDIT_H_ #define _LSTEDIT_H_ #include "core/mlib/konvert.h" #define LIST_COUNT 3 #define LIST1 1 #define LIST2 2 #define LIST3 3 typedef struct { TCHAR list[LIST_COUNT][MAX_FUNCNAME+1]; } tlistPrefs; void lstedit_init(Boolean showAns); void lstedit_load_lists(void); void lstedit_tbl_load(void); void lstedit_init_firstitem(int controlId, Complex *cplx); CError lstedit_append_item(int controlId, Complex *cplx); CError lstedit_insert_item(int controlId, Complex *cplx, int row); CError lstedit_get_item(int controlId, Complex *cplx, int row); CError lstedit_replace_item(int controlId, Complex *cplx, int row); int lstedit_item_length(int controlId, int row); int lstedit_list_length(int controlId); CError lstedit_delete_item(int controlId, int row); void lstedit_reselect(Int16 controlId); void lstedit_tbl_deselect(void); void lstedit_tbl_scroll(Int16 delta); CError lstedit_save_lists(void); void lstedit_destroy(void); //Boolean ListEditHandleEvent(EventPtr event); //void lstedit_popup_ans(void); #endif Index: ansops.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/ansops.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ansops.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- ansops.cpp 2 Nov 2009 17:20:08 -0000 1.3 *************** *** 106,110 **** rpn_delete(ans); MemPtrFree(result); - return; - 1; //result_draw(); } --- 106,108 ---- Index: core_main.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_main.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_main.h 17 Oct 2009 13:46:30 -0000 1.2 --- core_main.h 2 Nov 2009 17:20:08 -0000 1.3 *************** *** 36,42 **** void core_keytimeout1() MAIN_SECT; void core_keytimeout2() MAIN_SECT; - void core_timeout3(int repaint) MAIN_SECT; - int core_alpha_menu() MAIN_SECT; - int core_hex_menu() MAIN_SECT; int core_keydown(int key, int *enqueued, int *repeat) MAIN_SECT; int core_keyup(Skin *skin, void *hWnd_p) MAIN_SECT; --- 36,39 ---- *************** *** 45,50 **** /* Other functions */ /*******************/ - void set_running(bool state) MAIN_SECT; - void continue_running() MAIN_SECT; #endif --- 42,45 ---- --- NEW FILE: lstedit.cpp --- /* * $Id: lstedit.cpp,v 1.1 2009/11/02 17:20:08 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #include "stdafx.h" #include "compat/PalmOS.h" //#include <LstGlue.h> //#include <WinGlue.h> //#include "calcrsc.h" #include "lstedit.h" #include "konvert.h" #include "calc.h" #include "slist.h" #include "stack.h" #include "calcDB.h" #include "display.h" #include "varmgr.h" #include "defuns.h" #include "system - UI/StateManager.h" #include "system - UI/EasyCalc.h" #include "compat/Lang.h" #ifdef SUPPORT_DIA #include "DIA.h" #endif static Int16 firstLine; static Int16 maxLines = 1; static struct { Int16 col; Int16 row; Boolean offscreen; }tblSelection = {-1,-1,true}; static tlistPrefs *listPrefs; static List *loadedList[LIST_COUNT] = {NULL,NULL,NULL}; /*********************************************************************** * * FUNCTION: lstedit_tbl_contents * * DESCRIPTION: Draws a normal cell of table * * PARAMETERS: See PalmOS reference * * RETURN: Nothing * ***********************************************************************/ //static void //lstedit_tbl_contents(void *table,Int16 row,Int16 column, // RectangleType *bounds) PARSER; //static void //lstedit_tbl_contents(void *table,Int16 row,Int16 column, // RectangleType *bounds) //{ // Int16 real; // TCHAR *text; // FontID oldfont; // // real = firstLine + row; // if (loadedList[column-1] == NULL // || loadedList[column-1]->size <= real) // return; // // oldfont = FntSetFont(stdFont); // text = display_complex(loadedList[column-1]->item[real]); // WinGlueDrawTruncChars(text,StrLen(text), // bounds->topLeft.x+2,bounds->topLeft.y, // bounds->extent.x-2); // MemPtrFree(text); // FntSetFont(oldfont); //} /*********************************************************************** * * FUNCTION: lstedit_delete_lists * * DESCRIPTION: Free memory ocupied by loaded lists * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ static void lstedit_delete_lists (void) PARSER; static void lstedit_delete_lists(void) { Int16 i; for (i=0 ; i<LIST_COUNT ; i++) if (loadedList[i] != NULL) { list_delete(loadedList[i]); loadedList[i] = NULL; } } /*********************************************************************** * * FUNCTION: lstedit_save_lists * * DESCRIPTION: Saves loaded lists back to database. Should be called * after every modification * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_save_lists (void) PARSER; CError lstedit_save_lists (void) { Int16 i; Trpn item; CodeStack *stack; CError err = c_noerror; stack = stack_new(1); for (i=0 ; i<LIST_COUNT ; i++) if (StrLen(listPrefs->list[i])) { err = stack_add_val(stack, &loadedList[i], list); if (!err) { item = stack_pop(stack); err = db_write_variable(listPrefs->list[i], item); rpn_delete(item); } } stack_delete(stack); return err; } /*********************************************************************** * * FUNCTION: lstedit_upd_maxlines * * DESCRIPTION: Update the maxLines variable, containing the length * of longest loaded list * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ static void lstedit_upd_maxlines (void) PARSER; static void lstedit_upd_maxlines (void) { Int16 i; maxLines = 0; for (i=0 ; i<LIST_COUNT ; i++) if ((loadedList[i] != NULL) && (loadedList[i]->size > maxLines)) maxLines = loadedList[i]->size; } /*********************************************************************** * * FUNCTION: lstedit_load_lists * * DESCRIPTION: Reads list name from Preferences and loads them * into global loadedLists variable * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ void lstedit_load_lists (void) PARSER; void lstedit_load_lists (void) { Int16 i; Trpn item; CError err; lstedit_delete_lists(); for (i=0 ; i<LIST_COUNT ; i++) if (StrLen(listPrefs->list[i])) { item = db_read_variable(listPrefs->list[i], &err); if (!err && item.type == list) { loadedList[i] = list_dup(item.u.listval); } else StrCopy(listPrefs->list[i],_T("")); if (!err) rpn_delete(item); } LstEditSetLabel(1, listPrefs->list[0]); LstEditSetLabel(2, listPrefs->list[1]); LstEditSetLabel(3, listPrefs->list[2]); lstedit_upd_maxlines(); } /*********************************************************************** * * FUNCTION: lstedit_tbl_load * * DESCRIPTION: Load index values in the first column of ListEditor, * starting from 1, and load list contents on screen. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ void lstedit_tbl_load (void) PARSER; void lstedit_tbl_load (void) { TCHAR *text1, *text2, *text3; Int16 i; // First, clear contents LstEditSetRow(-1, 0, NULL, NULL, NULL); // Then fill table for (i=0 ; i<maxLines ; i++) { if ((loadedList[0] == NULL) || (loadedList[0]->size <= i)) text1 = NULL; else text1 = display_complex(loadedList[0]->item[i]); if ((loadedList[1] == NULL) || (loadedList[1]->size <= i)) text2 = NULL; else text2 = display_complex(loadedList[1]->item[i]); if ((loadedList[2] == NULL) || (loadedList[2]->size <= i)) text3 = NULL; else text3 = display_complex(loadedList[2]->item[i]); LstEditSetRow(i, i+1, text1, text2, text3); MemPtrFree(text1); MemPtrFree(text2); MemPtrFree(text3); } } /*********************************************************************** * * FUNCTION: lstedit_init * * DESCRIPTION: Constructor for List Editor * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ void lstedit_init (Boolean showAns) PARSER; void lstedit_init (Boolean showAns) { listPrefs = &(stateMgr->state.listPrefs); firstLine = 0; tblSelection.col = tblSelection.row = -1; if (showAns) { StrCopy(listPrefs->list[0], _T("ans")); } // Initialize column header drop downs lstedit_reselect(LIST1); lstedit_reselect(LIST2); lstedit_reselect(LIST3); // Load lists and set correct values in headers lstedit_load_lists(); } /*********************************************************************** * * FUNCTION: lstedit_tbl_scroll * * DESCRIPTION: Scroll the table specified number of rows * * PARAMETERS: tbl - pointer to table * delta - how many lines (+down, -up) to scroll * * RETURN: Nothing * ***********************************************************************/ void lstedit_tbl_scroll (Int16 delta) PARSER; void lstedit_tbl_scroll (Int16 delta) { firstLine +=delta; if (firstLine < 0) firstLine = 0; lstedit_tbl_load(); } /*********************************************************************** * * FUNCTION: lstedit_destroy * * DESCRIPTION: Destructor for List Editor * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ void lstedit_destroy (void) PARSER; void lstedit_destroy (void) { lstedit_delete_lists(); } /*********************************************************************** * * FUNCTION: lstedit_tbl_deselect * * DESCRIPTION: Deselect a variable, clear label that shows contents * of variable * * PARAMETERS: tbl - pointer to the table * * RETURN: Nothing * ***********************************************************************/ void lstedit_tbl_deselect (void) PARSER; void lstedit_tbl_deselect (void) { if (tblSelection.row != -1) { LstEditDeselect(); tblSelection.row = tblSelection.col = -1; } } /*********************************************************************** * * FUNCTION: lstedit_init_firstitem * * DESCRIPTION: (Mapi) Initialize a loaded list with an item. Was part of * lstedit_reselect() before, is now a call back from UI. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ void lstedit_init_firstitem (int controlId, Complex *cplx) PARSER; void lstedit_init_firstitem (int controlId, Complex *cplx) { int i = controlId - LIST1; if (loadedList[i]) MemPtrFree(loadedList[i]); loadedList[i] = list_new(1); loadedList[i]->item[0] = *cplx; tblSelection.offscreen = true; tblSelection.row = 0; tblSelection.col = i + 1; } /*********************************************************************** * * FUNCTION: lstedit_append_item * * DESCRIPTION: (Mapi) Add an item to a list. New. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_append_item (int controlId, Complex *cplx) PARSER; CError lstedit_append_item (int controlId, Complex *cplx) { int row = loadedList[controlId - LIST1]->size; // Insert at end. return (lstedit_insert_item(controlId, cplx, row)); } /*********************************************************************** * * FUNCTION: lstedit_insert_item * * DESCRIPTION: (Mapi) Add an item to a list at given place. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_insert_item (int controlId, Complex *cplx, int row) PARSER; CError lstedit_insert_item (int controlId, Complex *cplx, int row) { int l = controlId - LIST1; List *lst, *oldlst; CError err = c_noerror; int i; lst = list_new(loadedList[l]->size+1); if (!lst) { return (c_memory); } if (row > loadedList[l]->size) row = loadedList[l]->size; // Security .. for (i=0 ; i<row ; i++) lst->item[i] = loadedList[l]->item[i]; lst->item[row] = *cplx; for (i=row ; i<loadedList[l]->size ; i++) lst->item[i+1] = loadedList[l]->item[i]; oldlst = loadedList[l]; loadedList[l] = lst; err = lstedit_save_lists(); if (err) { loadedList[l] = oldlst; /* restore original one */ list_delete(lst); return (err); } else list_delete(oldlst); lstedit_upd_maxlines(); tblSelection.offscreen = true; return (err); } /*********************************************************************** * * FUNCTION: lstedit_get_item * * DESCRIPTION: (Mapi) Get item value from a list. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_get_item (int controlId, Complex *cplx, int row) PARSER; CError lstedit_get_item (int controlId, Complex *cplx, int row) { int l = controlId - LIST1; CError err = c_noerror; if (row > loadedList[l]->size) return (c_range); // Security .. *cplx = loadedList[l]->item[row]; return (err); } /*********************************************************************** * * FUNCTION: lstedit_replace_item * * DESCRIPTION: (Mapi) Replace an item value in a list. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_replace_item (int controlId, Complex *cplx, int row) PARSER; CError lstedit_replace_item (int controlId, Complex *cplx, int row) { int l = controlId - LIST1; CError err = c_noerror; if (row > loadedList[l]->size) return (c_range); // Security .. loadedList[l]->item[row] = *cplx; err = lstedit_save_lists(); tblSelection.offscreen = true; return (err); } /*********************************************************************** * * FUNCTION: lstedit_item_length * * DESCRIPTION: (Mapi) Retrieve display length of an item. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ int lstedit_item_length (int controlId, int row) PARSER; int lstedit_item_length (int controlId, int row) { TCHAR *text = display_complex(loadedList[controlId-LIST1]->item[row]); int len = _tcslen(text); MemPtrFree(text); return (len); } /*********************************************************************** * * FUNCTION: lstedit_list_length * * DESCRIPTION: (Mapi) Retrieve length of a list. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ int lstedit_list_length (int controlId) PARSER; int lstedit_list_length (int controlId) { return (loadedList[controlId-LIST1]->size); } /*********************************************************************** * * FUNCTION: lstedit_delete_item * * DESCRIPTION: (Mapi) Delete an item from a list at given place. * * PARAMETERS: Nothing * * RETURN: Nothing * ***********************************************************************/ CError lstedit_delete_item (int controlId, int row) PARSER; CError lstedit_delete_item (int controlId, int row) { int l = controlId - LIST1; if (loadedList[l]->size == 1) return (c_range); for (int i=row+1 ; i<loadedList[l]->size ; i++) loadedList[l]->item[i-1] = loadedList[l]->item[i]; --loadedList[l]->size; lstedit_save_lists(); /* should succeed since list gets smaller */ lstedit_upd_maxlines(); tblSelection.offscreen = true; return (c_noerror); } /*********************************************************************** * * FUNCTION: lstedit_reselect * * DESCRIPTION: Shows a popup dialog with existing list and 'New' and * 'Delete'. Creates new list, delete new list or just * selects a new list * * PARAMETERS: controlId - popuptrigger that was pressed * ***********************************************************************/ void lstedit_reselect (Int16 controlId) PARSER; void lstedit_reselect (Int16 controlId) { dbList *varlist; TCHAR **values; Int16 i; varlist = db_get_list(list); values = (TCHAR **) MemPtrNew(sizeof(*values) * (varlist->size)); for (i=0 ; i<varlist->size ; i++) values[i] = varlist->list[i]; LstEditSetListChoices(controlId, values, varlist->size); LstEditSetLabel(controlId, listPrefs->list[controlId-LIST1]); /* Set incremental search */ // No equivalent in Windows (in fact, this is done natively, but I don't know // how many chars .. (up to 5 in the Glue API). // LstGlueSetIncrementalSearch(slst, true); MemPtrFree(values); db_delete_list(varlist); } Index: varmgr.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** varmgr.h 25 Oct 2009 17:52:15 -0000 1.3 --- varmgr.h 2 Nov 2009 17:20:08 -0000 1.4 *************** *** 36,40 **** TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); --- 36,40 ---- TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList, bool valueAns); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); Index: varmgr.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** varmgr.cpp 25 Oct 2009 17:52:15 -0000 1.3 --- varmgr.cpp 2 Nov 2009 17:20:08 -0000 1.4 *************** *** 208,213 **** * ***********************************************************************/ ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) IFACE; ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) { Trpn item; CError err; --- 208,215 ---- * ***********************************************************************/ ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, ! bool fromList, bool valueAns) IFACE; ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, ! bool fromList, bool valueAns) { Trpn item; CError err; *************** *** 224,234 **** return (false); ! item = db_read_variable(_T("ans"),&err); ! if (err) { ! FrmAlert(altAnsProblem, hWnd_p); ! return (false); } - db_write_variable(varname,item); - rpn_delete(item); return (true); --- 226,238 ---- return (false); ! if (valueAns) { ! item = db_read_variable(_T("ans"),&err); ! if (err) { ! FrmAlert(altAnsProblem, hWnd_p); ! return (false); ! } ! db_write_variable(varname,item); ! rpn_delete(item); } return (true); *************** *** 270,277 **** * ***********************************************************************/ ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList) { db_delete_list(varlist); if (saveasvar) { ! return (varmgr_save_variable(text, hWnd_calc, fromList)); } return (true); --- 274,282 ---- * ***********************************************************************/ ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, ! bool fromList, bool valueAns) { db_delete_list(varlist); if (saveasvar) { ! return (varmgr_save_variable(text, hWnd_calc, fromList, valueAns)); } return (true); *************** *** 448,531 **** /*********************************************************************** * - * FUNCTION: varmgr_edit - * - * DESCRIPTION: Popup a variable edit dialog - * - * PARAMETERS: varname - name of the variable - * title - title of the new form - * type - function or variable - * callback - function, that should be called - * upon succesful save (usually update) - * editname - user can edit the variable name and can - * and can create a new variable/function - * - * RETURN: true - variable was changed - * false - user pressed cancel - * - ***********************************************************************/ - /*Boolean - varmgr_get_complex(Complex *value,TCHAR *title) - { - FormPtr frm; - Int16 button; - Boolean res; - TCHAR *text; - FieldPtr field; - CodeStack *stack; - CError err; - Complex result; - - frm = FrmInitForm(dinputForm); - #ifdef HANDERA_SDK - if (handera) - VgaFormModify(frm, vgaFormModify160To240); - #endif - FrmSetTitle(frm,title); - FrmSetFocus(frm,FrmGetObjectIndex(frm,dinputField)); - field = FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,dinputField)); - - text = display_complex(*value); - FldInsert(field,text,StrLen(text)); - FldSetSelection(field,0,StrLen(text)); - MemPtrFree(text); - - while (1) { - button = FrmDoDialog(frm); - if (button == dinputOK) { - text = FldGetTextPtr(field); - if (!text) - FrmAlert(altCompute); - else { - stack = text_to_stack(text,&err); - if (!err) { - err = stack_compute(stack); - if (!err) - err = stack_get_val(stack,&result, - complex); - stack_delete(stack); - } - if (err) - alertErrorMessage(err); - else { - res = true; - break; - } - } - } - else { - res = false; - break; - } - } - FrmDeleteForm(frm); - - if (res) - *value = result; - - return res; - }*/ - - /*********************************************************************** - * * FUNCTION: varmgr_get_double * --- 453,456 ---- *************** *** 596,650 **** return res; }*/ - - /*********************************************************************** - * - * FUNCTION: varmgr_get_varstring - * - * DESCRIPTION: Popup a small form asking user for entering a variable - * name and check it before returning - * - * PARAMETERS: title - title the form should have - * - * RETURN: true - user pressed OK and varname was valid - * false - user pressed Cancel - * varname - the result of expression user entered - * - ***********************************************************************/ - /*Boolean - varmgr_get_varstring(TCHAR *varname,TCHAR *title) - { - FormPtr frm; - Int16 button; - Boolean res; - TCHAR *text; - FieldPtr field; - - frm = FrmInitForm(dinputForm); - #ifdef HANDERA_SDK - if (handera) - VgaFormModify(frm, vgaFormModify160To240); - #endif - FrmSetTitle(frm,title); - FrmSetFocus(frm,FrmGetObjectIndex(frm,dinputField)); - field = FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,dinputField)); - while (1) { - button = FrmDoDialog(frm); - if (button == dinputOK) { - text = FldGetTextPtr(field); - if (!text || !varfunc_name_ok(text,variable)) - FrmAlert(altBadVariableName); - else { - StrCopy(varname,text); - res = true; - break; - } - } - else { - res = false; - break; - } - } - FrmDeleteForm(frm); - - return res; - }*/ --- 521,522 ---- Index: core_display.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_display.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_display.h 17 Oct 2009 13:46:30 -0000 1.2 --- core_display.h 2 Nov 2009 17:20:08 -0000 1.3 *************** *** 44,54 **** #ifndef _CORE_DISPLAY_C_ ! extern TCHAR *resMenuDesc[]; // Array of strings for the result actions menu. ! extern TCHAR *strErrCodes[]; // Error strings #endif void squeak(void); - void redisplay(void); - void set_menu(int level, int menuid); void result_copy(Skin *skin) IFACE; --- 44,54 ---- #ifndef _CORE_DISPLAY_C_ ! extern TCHAR *resMenuDesc[]; // Array of strings for the result actions menu. ! extern TCHAR *strErrCodes[]; // Error strings ! extern TresultPrefs resultPrefs; // Description of result in result screen ! #endif void squeak(void); void result_copy(Skin *skin) IFACE; Index: core_main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core_main.cpp 25 Oct 2009 17:52:14 -0000 1.3 --- core_main.cpp 2 Nov 2009 17:20:08 -0000 1.4 *************** *** 29,33 **** #include "core_main.h" #include "core/core_globals.h" - #include "core_tables.h" #include "core_display.h" #include "core/Main.h" --- 29,32 ---- *************** *** 64,68 **** -------------------------------------------------------------------------------*/ static void stop_interruptible() MAIN_SECT; - static int handle_error(int error) MAIN_SECT; --- 63,66 ---- *************** *** 158,214 **** /******************************************************************************** - * FUNCTION: core_timeout3() * - * A wakeup call that the core can request by calling shell_request_timeout3(). * - * Used to implement the brief linger period after MEM, SHOW, and shift- * - * VARMENU. The 'repaint' parameter says whether the callback is invoked * - * because the timeout period expired (1), or because a key event is on its * - * way (0); if a key event is on its way, the emulator core should not repaint * - * the screen, in order to avoid flashing. * - ********************************************************************************/ - void core_timeout3(int repaint) { - // Function not used by EasyCalc - // /* Remove the output of SHOW, MEM, or shift-VARMENU from the display */ - // if (pending_command == CMD_LINGER1) - // pending_command = CMD_CANCELLED; - // else if (pending_command == CMD_LINGER2) { - // flags.f.message = 0; - // flags.f.two_line_message = 0; - // pending_command = CMD_NONE; - // if (repaint) - // redisplay(); - // } - } - - /******************************************************************************** - * FUNCTION: core_alpha_menu() * - * The shell uses this function to check if the core is in "alpha" mode (i.e. * - * the ALPHA menu or any of its submenus is active). This affects how events * - * from the keyboard (the real PC keyboard, not the on-screen one emulated by * - * the calc) or PalmOS Graffiti device are handled: in alpha mode, printable * - * ASCII characters are sent straight to the core; outside alpha mode, all * - * key events are translated sequences of key events according to the keymap * - * file. * - ********************************************************************************/ - int core_alpha_menu() { - // int *menu = get_front_menu(); - // return ((menu != NULL) && (*menu >= MENU_ALPHA1) && (*menu <= MENU_ALPHA_MISC2)); - return (0); - } - - /******************************************************************************** - * FUNCTION: core_hex_menu() * - * The shell uses this function to check if the core is in "hex" mode (i.e. * - * the A..F submenu of the BASE application is active). This affects how events * - * from the keyboard (the real PC keyboard, not the on-screen one emulated by * - * the calc) are handled: in hex mode, 'A' through 'F' and 'a' through 'f' are * - * translated to keycodes 1 through 6, regardless of the keyboard map. * - ********************************************************************************/ - int core_hex_menu() { - // int *menu = get_front_menu(); - // return ((menu != NULL) && (*menu == MENU_BASE_A_THRU_F)); - return (0); - } - - /******************************************************************************** * FUNCTION: core_keydown() * * This function informs the emulator core that a key was pressed. Keys * --- 156,159 ---- *************** *** 250,380 **** #define keydown(a,b) (repeating_key = b) - /* if (mode_interruptible != NULL) { - */ /* We're in the middle of an interruptible function - * (e.g., INVRT, PRP); queue up any keystrokes and invoke - * the appropriate callback to keep the funtion moving along - */ - /* int error, keep_running; - if (key != 0) { *//* Enqueue... */ - /* *enqueued = 1; - if (key == KEY_EXIT || - (mode_stoppable && !mode_shift && (key == KEY_RUN))) { - keybuf_tail = keybuf_head; - stop_interruptible(); - return (0); - } else { - if (((keybuf_head + 1) & 15) != keybuf_tail) { - if (mode_shift) - key = -key; - keybuf[keybuf_head] = key; - keybuf_head = (keybuf_head + 1) & 15; - } - } - set_shift(false); - } - error = mode_interruptible(0); - if (error == ERR_INTERRUPTIBLE) *//* Still not done */ - /* return (1); - mode_interruptible = NULL; - keep_running = handle_error(error); - if (mode_running) { - if (!keep_running) - set_running(false); - } else { - shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, false); - pending_command = CMD_NONE; - } - if (mode_running || (keybuf_tail != keybuf_head)) - return (1); - else { - redisplay(); - return (0); - } - } - - if (mode_running && !mode_getkey) { - */ /* We're running; queue up any keystrokes and invoke - * continue_running() to keep the program moving along - */ - /* if (key != 0) { - if (key == KEY_EXIT) { - keybuf_tail = keybuf_head; - set_shift(false); - set_running(false); - pending_command = CMD_CANCELLED; - return (0); - } - */ /* Enqueue... */ - /* *enqueued = 1; - if (!mode_shift && (key == KEY_RUN)) { - keybuf_tail = keybuf_head; - set_running(false); - redisplay(); - return (0); - } - if (((keybuf_head + 1) & 15) != keybuf_tail) { - if (mode_shift) - key = -key; - keybuf[keybuf_head] = key; - keybuf_head = (keybuf_head + 1) & 15; - } - set_shift(false); - } - continue_running(); - if ((mode_running && !mode_getkey) || (keybuf_tail != keybuf_head)) - return (1); - else { - if (mode_getkey) - */ /* Technically, the program is still running, but we turn - * off the 'running' annunciator so that the user has some - * cue that they may now type. - */ - /* shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, false); - else - redisplay(); - return (0); - } - } - */ - - /* If we get here, mode_running must be false. - * or a program is running but hanging in GETKEY; - */ - /* if (keybuf_tail != keybuf_head) { - */ /* We're not running, or a program is waiting in GETKEY; - * feed queued-up keystroke to keydown() - */ - /* int oldshift = 0; - int oldkey = keybuf[keybuf_tail]; - if (oldkey < 0) { - oldkey = -oldkey; - oldshift = 1; - } - keybuf_tail = (keybuf_tail + 1) & 15; - */ /* If we're in GETKEY mode, the 'running' annunciator is off; - * see the code circa 30 lines back. - * We now turn it back on since program execution resumes. - */ - /* if (mode_getkey && mode_running) - shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); - */ /* Feed the dequeued key to the usual suspects */ - /* keydown(oldshift, oldkey); - core_keyup(); - */ /* We've just de-queued a key; may have to enqueue - * one as well, if the user is actually managing to - * type while we're unwinding the keyboard buffer - */ - /* if (key != 0) { - if (((keybuf_head + 1) & 15) != keybuf_tail) { - if (mode_shift) - key = -key; - keybuf[keybuf_head] = key; - keybuf_head = (keybuf_head + 1) & 15; - } - set_shift(false); - } - return (mode_running || (keybuf_head != keybuf_tail)); - } - */ /* No program is running, or it is running but waiting for a --- 195,198 ---- *************** *** 416,534 **** ********************************************************************************/ int core_keyup(Skin *skin, void *hWnd_p) { - /* int error = ERR_NONE; - - if ((pending_command == CMD_LINGER1) || (pending_command == CMD_LINGER2)) { - pending_command = CMD_LINGER2; - return (mode_running || (keybuf_head != keybuf_tail)); - } - - if (pending_command == CMD_SILENT_OFF) { - shell_powerdown(); - pending_command = CMD_NONE; - return (0); - } - - if (pending_command == CMD_NONE) - return (mode_running || (keybuf_head != keybuf_tail)); - */ - /* - if (remove_program_catalog) { - if (mode_transientmenu == MENU_CATALOG) - set_menu(MENULEVEL_TRANSIENT, MENU_NONE); - else if (mode_plainmenu == MENU_CATALOG) - set_menu(MENULEVEL_PLAIN, MENU_NONE); - remove_program_catalog = 0; - } - - if ((pending_command == CMD_CANCELLED) || (pending_command == CMD_NULL)) { - pending_command = CMD_NONE; - redisplay(); - return (mode_running || (keybuf_head != keybuf_tail)); - } - - mode_varmenu = (pending_command == CMD_VMSTO) - || (pending_command == CMD_VMSTO2) - || (pending_command == CMD_VMSOLVE) - || (pending_command == CMD_VMEXEC); - - if (input_length > 0) { - */ /* INPUT active */ - /* if ((pending_command == CMD_RUN) || (pending_command == CMD_SST)) { - int err = generic_sto(&input_arg, 0); - if ((flags.f.trace_print || flags.f.normal_print) - && flags.f.printer_exists) { - char lbuf[12], rbuf[100]; - int llen, rlen; - string_copy(lbuf, &llen, input_name, input_length); - lbuf[llen++] = '='; - rlen = vartype2string(reg_x, rbuf, 100); - print_wide(lbuf, llen, rbuf, rlen); - } - input_length = 0; - if (err != ERR_NONE) { - pending_command = CMD_NONE; - display_error(err, 1); - redisplay(); - return (mode_running || (keybuf_head != keybuf_tail)); - } - } else if ((pending_command == CMD_GTO) - || (pending_command == CMD_GTODOT) - || (pending_command == CMD_GTODOTDOT) - || (pending_command == CMD_RTN)) - */ /* NOTE: set_running(true) also ends INPUT mode, so commands that - * cause program execution to start do not have to be handled here. - */ - /* input_length = 0; - } - - if (pending_command == CMD_VMEXEC) { - string_copy(reg_alpha, ®_alpha_length, - pending_command_arg.val.text, pending_command_arg.length); - goto do_run; - } - if (pending_command == CMD_RUN) { - do_run: - if ((flags.f.trace_print || flags.f.normal_print) - && flags.f.printer_exists) - print_command(pending_command, &pending_command_arg); - pending_command = CMD_NONE; - if (pc == -1) - pc = 0; - set_running(true); - return (1); - } - - if (pending_command == CMD_SST) { - int cmd; - arg_struct arg; - oldpc = pc; - if (pc == -1) - pc = 0; - get_next_command(&pc, &cmd, &arg, 1); - if ((flags.f.trace_print || flags.f.normal_print) - && flags.f.printer_exists) - print_program_line(current_prgm, oldpc); - mode_disable_stack_lift = false; - set_running(true); - error = cmdlist(cmd)->handler(&arg); - set_running(false); - } else { - if ((flags.f.trace_print || flags.f.normal_print) - && flags.f.printer_exists) - print_command(pending_command, &pending_command_arg); - mode_disable_stack_lift = false; - error = cmdlist(pending_command)->handler(&pending_command_arg); - } - - if (error == ERR_INTERRUPTIBLE) { - shell_annunciators(-1, -1, -1, 1, -1, -1); - return (1); - } - - handle_error(error); - pending_command = CMD_NONE; - if (!mode_getkey) - redisplay(); - */ if (mode_shift && (repeating_key != KEY_SHIFT) && (repeating_key != KEY_BCKSPC)) { // Release shift when another key is pressed, --- 234,237 ---- *************** *** 555,712 **** return ((mode_running && !mode_getkey) || (keybuf_head != keybuf_tail)); } - - /******************************************************************************** - * FUNCTION: set_running * - * Go to running mode and display it. * - ********************************************************************************/ - void set_running(bool state) { - if (mode_running != state) { - mode_running = state; - shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, state); - } - if (state) { - /* Cancel any pending INPUT command */ - // input_length = 0; - // mode_goose = -2; - // prgm_highlight_row = 1; - } - } - - /******************************************************************************** - * FUNCTION: stop_interruptible() * - * Run programs. * - ********************************************************************************/ - void continue_running() { - /* int error; - while (!shell_wants_cpu()) { - int cmd; - arg_struct arg; - oldpc = pc; - if (pc == -1) - pc = 0; - else if (pc >= prgms[current_prgm].size) { - pc = -1; - set_running(false); - return; - } - get_next_command(&pc, &cmd, &arg, 1); - if (flags.f.trace_print && flags.f.printer_exists) - print_program_line(current_prgm, oldpc); - mode_disable_stack_lift = false; - error = cmdlist(cmd)->handler(&arg); - if (error == ERR_INTERRUPTIBLE) - return; - if (!handle_error(error)) - return; - if (mode_getkey) - return; - }*/ - } - - /******************************************************************************** - * FUNCTION: stop_interruptible() * - * Stops current running function. * - ********************************************************************************/ - static void stop_interruptible() { - int error = mode_interruptible(1); - handle_error(error); - mode_interruptible = NULL; - if (mode_running) - set_running(false); - else - shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, false); - pending_command = CMD_NONE; - redisplay(); - } - - /******************************************************************************** - * FUNCTION: handle_error() * - ********************************************************************************/ - static int handle_error(int error) { - /* if (mode_running) { - if (error == ERR_RUN) - error = ERR_NONE; - if (error == ERR_NONE || error == ERR_NO || error == ERR_YES - || error == ERR_STOP) - flags.f.stack_lift_disable = mode_disable_stack_lift; - if (error == ERR_NO) { - if (prgms[current_prgm].text[pc] != CMD_END) - pc += get_command_length(current_prgm, pc); - } else if (error == ERR_STOP) { - if (pc >= prgms[current_prgm].size) - pc = -1; - set_running(false); - return 0; - } else if (error != ERR_NONE && error != ERR_YES) { - if (flags.f.error_ignore) { - flags.f.error_ignore = 0; - return 1; - } - if (solve_active() && (error == ERR_OUT_OF_RANGE - || error == ERR_DIVIDE_BY_0 - || error == ERR_INVALID_DATA - || error == ERR_STAT_MATH_ERROR)) { - unwind_stack_until_solve(); - error = return_to_solve(1); - if (error == ERR_STOP) - set_running(false); - if (error == ERR_NONE || error == ERR_RUN || error == ERR_STOP) - return 0; - } - pc = oldpc; - display_error(error, 1); - set_running(false); - return 0; - } - return 1; - } else if (pending_command == CMD_SST) { - if (error == ERR_RUN) - error = ERR_NONE; - if (error == ERR_NONE || error == ERR_NO || error == ERR_YES - || error == ERR_STOP) - flags.f.stack_lift_disable = mode_disable_stack_lift; - if (error == ERR_NO) { - if (prgms[current_prgm].text[pc] != CMD_END) - pc += get_command_length(current_prgm, pc); - goto noerr; - } else if (error == ERR_NONE || error == ERR_YES || error == ERR_STOP) { - noerr: - error = ERR_NONE; - if (pc > prgms[current_prgm].size) - pc = -1; - } else { - if (flags.f.error_ignore) { - flags.f.error_ignore = 0; - goto noerr; - } - if (solve_active() && (error == ERR_OUT_OF_RANGE - || error == ERR_DIVIDE_BY_0 - || error == ERR_INVALID_DATA - || error == ERR_STAT_MATH_ERROR)) { - unwind_stack_until_solve(); - error = return_to_solve(1); - if (error == ERR_NONE || error == ERR_RUN || error == ERR_STOP) - goto noerr; - } - pc = oldpc; - display_error(error, 1); - } - return 0; - } else { - if (error == ERR_RUN) { - set_running(true); - error = ERR_NONE; - } - if (error == ERR_NONE || error == ERR_NO || error == ERR_YES - || error == ERR_STOP) - flags.f.stack_lift_disable = mode_disable_stack_lift; - else if (flags.f.error_ignore) { - flags.f.error_ignore = 0; - error = ERR_NONE; - } - if (error != ERR_NONE && error != ERR_STOP) - display_error(error, 1); - return 0; - }*/ - return (0); - } \ No newline at end of file --- 258,259 ---- Index: core_display.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_display.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_display.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- core_display.cpp 2 Nov 2009 17:20:08 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- #include "stdafx.h" + #include "compat/PalmOS.h" #include "core/core_globals.h" *************** *** 96,100 **** - Module variables. - -------------------------------------------------------------------------------*/ ! static TresultPrefs resultPrefs; --- 97,101 ---- - Module variables. - -------------------------------------------------------------------------------*/ ! TresultPrefs resultPrefs; *************** *** 115,460 **** } - /******************************************************************************** - * FUNCTION: redisplay() * - ********************************************************************************/ - void redisplay() { - /* int menu_id; - int avail_rows = 2; - int i; - - if (mode_clall) { - clear_display(); - draw_string(0, 0, "Clear All Memory?", 17); - draw_key(0, 0, 0, "YES", 3); - draw_key(1, 0, 0, "", 0); - draw_key(2, 0, 0, "", 0); - draw_key(3, 0, 0, "", 0); - draw_key(4, 0, 0, "", 0); - draw_key(5, 0, 0, "NO", 2); - flush_display(); - return; - } - - if (flags.f.two_line_message) - return; - if (flags.f.message) - clear_row(1); - else - clear_display(); - - if (mode_commandmenu != MENU_NONE) - menu_id = mode_commandmenu; - else if (mode_alphamenu != MENU_NONE) - menu_id = mode_alphamenu; - else if (mode_transientmenu != MENU_NONE) - menu_id = mode_transientmenu; - else if (mode_plainmenu != MENU_NONE) - menu_id = mode_plainmenu; - else if (mode_appmenu != MENU_NONE) - menu_id = mode_appmenu; - else - menu_id = MENU_NONE; - if (menu_id == MENU_CATALOG) { - draw_catalog(); - avail_rows = 1; - } else if (menu_id == MENU_VARMENU) { - draw_varmenu(); - if (varmenu_length == 0) { - redisplay(); - return; - } - avail_rows = 1; - } else if (menu_id == MENU_CUSTOM1 || menu_id == MENU_CUSTOM2 - || menu_id == MENU_CUSTOM3) { - int r = menu_id - MENU_CUSTOM1; - if (flags.f.local_label - && !(mode_command_entry && incomplete_argtype == ARG_CKEY)) { - for (i = 0; i < 5; i++) { - char c = (r == 0 ? 'A' : 'F') + i; - draw_key(i, 0, 0, &c, 1); - } - draw_key(5, 0, 0, "XEQ", 3); - } else { - for (i = 0; i < 6; i++) { - draw_key(i, 0, 1, custommenu_label[r][i], - custommenu_length[r][i]); - } - } - avail_rows = 1; - } else if (menu_id == MENU_PROGRAMMABLE) { - for (i = 0; i < 6; i++) - draw_key(i, 0, 0, progmenu_label[i], progmenu_length[i]); - avail_rows = 1; - } else if (menu_id != MENU_NONE) { - const menu_spec *m = menus + menu_id; - for (i = 0; i < 6; i++) { - const menu_item_spec *mi = m->child + i; - if (mi->menuid == MENU_NONE || (mi->menuid & 0x3000) == 0) - draw_key(i, 0, 0, mi->title, mi->title_length); - else { - int cmd_id = mi->menuid & 0xfff; - const command_spec *cmd = cmdlist(cmd_id); - int is_flag = (mi->menuid & 0x2000) != 0; - if (is_flag) { - */ /* Take a closer look at the command ID and highlight - * the menu item if appropriate -- that is, clear 'is_flag' - * if highlighting is *not* appropriate - */ - /* switch (cmd_id) { - case CMD_FIX: - is_flag = flags.f.fix_or_all - && !flags.f.eng_or_all; - break; - case CMD_SCI: - is_flag = !flags.f.fix_or_all - && !flags.f.eng_or_all; - break; - case CMD_ENG: - is_flag = !flags.f.fix_or_all - && flags.f.eng_or_all; - break; - case CMD_ALL: - is_flag = flags.f.fix_or_all - && flags.f.eng_or_all; - break; - case CMD_RDXDOT: - is_flag = flags.f.decimal_point; - break; - case CMD_RDXCOMMA: - is_flag = !flags.f.decimal_point; - break; - case CMD_DEG: - is_flag = !flags.f.rad && !flags.f.grad; - break; - case CMD_RAD: - is_flag = flags.f.rad && !flags.f.grad; - break; - case CMD_GRAD: - is_flag = flags.f.grad; - break; - case CMD_POLAR: - is_flag = flags.f.polar; - break; - case CMD_RECT: - is_flag = !flags.f.polar; - break; - case CMD_QUIET: - is_flag = !flags.f.audio_enable; - break; - case CMD_CPXRES: - is_flag = !flags.f.real_result_only; - break; - case CMD_REALRES: - is_flag = flags.f.real_result_only; - break; - case CMD_KEYASN: - is_flag = !flags.f.local_label; - break; - case CMD_LCLBL: - is_flag = flags.f.local_label; - break; - case CMD_PON: - is_flag = flags.f.printer_exists; - break; - case CMD_POFF: - is_flag = !flags.f.printer_exists; - break; - case CMD_MAN: - is_flag = !flags.f.trace_print - && !flags.f.normal_print; - break; - case CMD_NORM: - is_flag = !flags.f.trace_print - && flags.f.normal_print; - break; - case CMD_TRACE: - is_flag = flags.f.trace_print; - break; - case CMD_ALLSIGMA: - is_flag = flags.f.all_sigma; - ... [truncated message content] |
Update of /cvsroot/easycalc/PPCport/core/mlib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26731 Modified Files: calcDB.cpp display.cpp history.cpp konvert.cpp matrix.cpp specfun.cpp Added Files: txtask.cpp txtask.h Log Message: 1.25b --- NEW FILE: txtask.h --- /* * $Id: txtask.h,v 1.1 2009/11/02 17:24:39 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _TXTASK_H_ #define _TXTASK_H_ #define TXTASK_ASK 1200 CError txtask_ask(Functype *func, CodeStack *stack); #endif Index: matrix.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/matrix.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** matrix.cpp 17 Oct 2009 13:48:34 -0000 1.1 --- matrix.cpp 2 Nov 2009 17:24:39 -0000 1.2 *************** *** 19,29 **** * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. ! * * You can contact me at 'on...@pe...'. * * 2002-07-28 - John Hodapp <bi...@em...> ! * Added routines QRQ and QRR for QR Factorizaton of MXN Matrix * 2002-08-11 - John Hodapp <bi...@em...> ! * Added routines QRS to solve Polynomial Ax=b for vector x * using QR routine. Requires room for x (can be set to zeros) [...2331 lines suppressed...] ! return list_func(func,stack); ! if (type == cmatrix) ! return cmatrix_dim(func,stack); ! err = stack_get_val(stack,&m,matrix); ! if (err) ! return err; ! ! result = list_new(2); ! result->item[0].imag = result->item[1].imag = 0.0; ! result->item[0].real = m->rows; ! result->item[1].real = m->cols; ! ! err = stack_add_val(stack,&result,list); ! ! list_delete(result); ! matrix_delete(m); ! return err; } Index: specfun.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/specfun.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** specfun.cpp 17 Oct 2009 13:48:34 -0000 1.1 --- specfun.cpp 2 Nov 2009 17:24:39 -0000 1.2 *************** *** 431,433 **** return(p); } - --- 431,432 ---- Index: display.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/display.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** display.cpp 17 Oct 2009 13:48:34 -0000 1.5 --- display.cpp 2 Nov 2009 17:24:39 -0000 1.6 *************** *** 95,99 **** TCHAR *result; ! result = (TCHAR *) MemPtrNew((dispPrefs.decPoints+64)*sizeof(TCHAR)); /* The ipart shouldn't be more then 10 */ fp_print_double(result,number); --- 95,99 ---- TCHAR *result; ! result = (TCHAR *) MemPtrNew((dispPrefs.decPoints+64)*sizeof(TCHAR)); /* The ipart shouldn't be more than 10 */ fp_print_double(result,number); Index: history.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/history.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** history.cpp 17 Oct 2009 13:48:34 -0000 1.3 --- history.cpp 2 Nov 2009 17:24:39 -0000 1.4 *************** *** 35,39 **** #include "history.h" #include "display.h" ! #include "dbutil.h" static DmOpenRef dbRef; --- 35,39 ---- #include "history.h" #include "display.h" ! #include "compat/dbutil.h" static DmOpenRef dbRef; Index: konvert.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/konvert.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** konvert.cpp 17 Oct 2009 13:48:34 -0000 1.5 --- konvert.cpp 2 Nov 2009 17:24:39 -0000 1.6 *************** *** 172,176 **** {_T("fin_fv"),MATH_FINFV,math_financial,6}, {_T("fin_pmt"),MATH_FINPMT,math_financial,6}, ! // TODO {_T("ask"),TXTASK_ASK,txtask_ask,0}, {_T("gcd"), MATH_GCD, math_gcd, 0, true, true}, {_T("lcm"), MATH_LCM, math_gcd, 0, true, true}, --- 172,176 ---- {_T("fin_fv"),MATH_FINFV,math_financial,6}, {_T("fin_pmt"),MATH_FINPMT,math_financial,6}, ! {_T("ask"),TXTASK_ASK,txtask_ask,0}, {_T("gcd"), MATH_GCD, math_gcd, 0, true, true}, {_T("lcm"), MATH_LCM, math_gcd, 0, true, true}, Index: calcDB.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/calcDB.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** calcDB.cpp 17 Oct 2009 13:48:34 -0000 1.5 --- calcDB.cpp 2 Nov 2009 17:24:39 -0000 1.6 *************** *** 31,35 **** #include "calcDB.h" #include "stack.h" ! #include "dbutil.h" static DmOpenRef gDB; --- 31,35 ---- #include "calcDB.h" #include "stack.h" ! #include "compat/dbutil.h" static DmOpenRef gDB; *************** *** 196,199 **** --- 196,201 ---- StrCopy(record->u.stack.header.param_name,parameter_name); + // Mapi: Fix ?? + // Or Microsoft compiler isn't handling that one the same way than Palm app compilers // ptr = (byte *) &(record->u.stack.data); ptr = (byte *) (record->u.stack.data); --- NEW FILE: txtask.cpp --- /* * $Id: txtask.cpp,v 1.1 2009/11/02 17:24:39 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2002 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #include "stdafx.h" #include "compat/PalmOS.h" #include "compat/segment.h" //#include "calcrsc.h" #include "konvert.h" #include "core/calc.h" #include "funcs.h" #include "display.h" #include "stack.h" #include "txtask.h" #include "system - UI/EasyCalc.h" CError txtask_ask (Functype *func, CodeStack *stack) { t_asktxt_param param; TCHAR *title, *text = NULL; CError err; Trpn tmpitem; CodeStack *tmpstack; Boolean res = 0; if (func->paramcount == 1) { /* Do not show dialog on graphs */ if (DisableInput) return (c_interrupted); err = stack_get_val(stack, &title, string); if (err) return (err); } else if (func->paramcount == 2) { tmpitem = stack_pop(stack); err = stack_get_val(stack, &title, string); if (err) { rpn_delete(tmpitem); return (err); } /* Return default value if graphing */ if (DisableInput) { MemPtrFree(title); stack_push(stack, tmpitem); return (c_noerror); } /* If it is variable, try to eval it, if it doesn't exist, * ignore it */ if (tmpitem.type==variable) err = rpn_eval_variable(&tmpitem, tmpitem); if (!err) text = display_default(tmpitem, true); rpn_delete(tmpitem); } else return (c_badargcount); param.asktxt = title; param.defaultvalue = text; res = popupAskTxt(¶m); MemPtrFree(text); if (res) { text = param.answertxt; if (!text) FrmAlertMain(altCompute); else { tmpstack = text_to_stack(text,&err); if (!err) { err = stack_compute(tmpstack); if (!err) tmpitem = stack_pop(tmpstack); stack_delete(tmpstack); } if (err) alertErrorMessage(err); } MemPtrFree(text); } MemPtrFree(title); if (res) { stack_push(stack, tmpitem); return (c_noerror); } return (c_interrupted); } |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:34
|
Update of /cvsroot/easycalc/PPCport/discarded In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26895 Added Files: clie-util.c clie.c clie.h clie_readme.txt Log Message: 1.25b --- NEW FILE: clie_readme.txt --- The files clie.c, clie.h and clie-util.c now support both PalmOS 5 hires and Sony PalmOS 4 hires. Sony PalmOS 5 uses the generic PalmOS 5 hires code. The text below by Arno Welzel is now mostly obsolete. It is left to preserve the history. Ton van Overbeek, 2006-08 ------------------------------------------------------------------------------ Changes for EasyCalc 1.20/hr Arno Welzel / 2003-05 1. Sony Clie SDK 3.0 All changes are based on the Sony Clie SDK 3.0. This SDK may be obtained at http://www.us.sonypdadev.com/develop_tool/sdk_30.html IMPORTANT: The header files are not usable "out of the box" with prc-tools! Some files have to be modified in the following way, e.h. Libraries/SonyHRLib.h: typedef enum tagHRTrapNumEnum { HRTrapGetAPIVersion = sysLibTrapCustom, HRTrapWinClipRectangle, HRTrapWinCopyRectangle, ... } This has to be changed to: //typedef enum tagHRTrapNumEnum //{ #define HRTrapGetAPIVersion (sysLibTrapCustom+0) //= sysLibTrapCustom, #define HRTrapWinClipRectangle (sysLibTrapCustom+1) // #define HRTrapWinCopyRectangle (sysLibTrapCustom+2) // ... // } I provide a version of these files, which are already changed. 2. Makefile The makefile modified to include the Sony SDK header files, which should be available in the path /PalmDev/clie-sdk. Additionally, a new file clie.c with its header clie.h has to be included in the build: CFLAGS=-Wall -Wno-switch -O2 -I./include -I. -I/PalmDev/clie-sdk/include -I/PalmDev/clie-sdk/include/Libraries -I/PalmDev/clie-sdk/include/System CALC_OBJS = calc.o clie.o mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \ mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \ mlib/MathLib.o mlib/display.o mlib/history.o mlib/complex.o \ finance.o result.o ansops.o defmgr.o mlib/meqstack.o \ mlib/txtask.o \ main.o memo.o varmgr.o $(TARGET)-sections.o 3. New files For a number of functions to handle the Clie specific stuff there is a new file clie.c with a header clie.h. 4. Changes calc.c - new global variable palmOS50 as an indicator for OS 5.0 (this is neccessary to do the proper coordinate handling for the result display) - gadget_bounds() contains adjustments for high resolution display on Sony Clie - StartApplication() contains additional initialization code for Sony Clie HR mode graph.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well grtaps.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well result.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well --- NEW FILE: clie.c --- (This appears to be a binary file; contents omitted.) --- NEW FILE: clie-util.c --- (This appears to be a binary file; contents omitted.) --- NEW FILE: clie.h --- /* * $Id: clie.h,v 1.1 2009/11/02 17:26:58 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _CLIE_H_ #define _CLIE_H_ enum { hrNone = 0, hrSony, hrPalm }; extern UInt16 gHrMode; extern Int16 gSonyFactor; extern UInt16 gHrLibApiVersion; // HRLib version extern UInt16 gHrLibRefNum; // HRLib reference number extern Boolean gHrLibIsV2; // True when HR Lib is ver.2 or later extern UInt16 GetHRLibVersion(UInt16 *hrLibRefNum); extern void clie_drawpixel(Coord x, Coord y); extern void clie_drawline(Coord x1, Coord y1, Coord x2, Coord y2); extern void clie_invertline(Coord x1, Coord y1, Coord x2, Coord y2); extern void clie_cliprectangle(RectangleType *rP); extern void clie_eraserectangle(RectangleType *rP, UInt16 cornerDiam); extern WinHandle clie_createoffscreenwindow(Coord width, Coord height, WindowFormatType format, UInt16 *error); extern void clie_copyrectangle(WinHandle srcWin, WinHandle dstWin, RectangleType *srcRect, Coord destX, Coord destY, WinDrawOperation mode); extern void clie_setclip(RectangleType *rP); extern void clie_getclip(RectangleType *rP); extern void clie_drawrectangleframe(FrameType frame, const RectangleType *rP); extern void clie_getwindowextent(Coord *extentX, Coord *extentY); extern void clie_drawbitmap(BitmapPtr bitmapP, Coord x, Coord y); extern void clie_drawchars(const Char *chars, Int16 len, Coord x, Coord y); #endif |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:31
|
Update of /cvsroot/easycalc/PPCport/discarded/calc-dia In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27144/calc-dia Log Message: Directory /cvsroot/easycalc/PPCport/discarded/calc-dia added to the repository |
Update of /cvsroot/easycalc/PPCport/discarded/calc-dia In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27240 Added Files: config.h DIA.c DIA.h DIA.txt resize.c resize.h resizeconsts.h sects.h util_dia.h Log Message: 1.25b --- NEW FILE: config.h --- /* File name: config.h Copyright 2006 Ton van Overbeek This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. * * Summary * Config file for PalmResize DIA support in EasyCalc. * */ #ifndef _CONFIG_H_ #define _CONFIG_H_ #ifdef SONY_SDK #define SUPPORT_DIA_SONY #endif #ifdef HANDERA_SDK #define SUPPORT_DIA_HANDERA #endif #endif --- NEW FILE: DIA.h --- /* $Id: DIA.h,v 1.1 2009/11/02 17:29:23 mapibid Exp $ */ /******************************************************************************* Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #ifndef _ARP_DIA_H #define _ARP_DIA_H #ifndef _Str #define _Str(x) #x #endif /* */ //#include "viewer.h" #include "resize.h" typedef enum { DIA_HARDWARE_NONE = 0, DIA_HARDWARE_HANDERA, DIA_HARDWARE_SONY1, DIA_HARDWARE_SONY2, DIA_HARDWARE_PALM10, DIA_HARDWARE_PALM11, DIA_HARDWARE_UNKNOWN } DIAHardwareType; #ifdef SUPPORT_DIA extern DIAHardwareType InitializeDIA(void) DIA_SECTION; extern void TerminateDIA(void) DIA_SECTION; extern void SetDIAState(DIAStateType state) DIA_SECTION; extern void SetDIAAllowResize(Boolean allow) DIA_SECTION; extern Boolean HandleResizeNotification(UInt32 notificationType) DIA_SECTION; extern DIAStateType GetDIAState(void) DIA_SECTION; extern void SetCustomDIAPolicy(UInt16 formID) DIA_SECTION; extern DIAHardwareType GetDIAHardware(void) DIA_SECTION; extern void SetDIAConstraints(WinHandle winH, Boolean defaultBig, Boolean allowBig) DIA_SECTION; /* Check which DIA state covers more screen space */ extern Int16 CompareDIAState(DIAStateType x, DIAStateType y) DIA_SECTION; extern void GetHiddenStatusBarArea(RectangleType * area) DIA_SECTION; /* These two functions should NOT be used by code other than that in resize.c and DIA.c. */ extern void PushCoordinateSystemToStandard(void) DIA_SECTION; extern void PopCoordinateSystem(void) DIA_SECTION; extern FontID HanderaAdjustFont(FontID font) DIA_SECTION; extern Coord HanderaCoord(Coord x) DIA_SECTION; #else /* */ #define InitializeDIA() DIA_HARDWARE_NONE #define TerminateDIA() #define SetDIAState( s ) #define SetDIAAllowResize( a ) #define HandleResizeNotification( n ) false #define GetDIAState() DIA_STATE_MAX #define SetCustomDIAPolicy( f ) #define GetDIAHardware() DIA_HARDWARE_NONE #define SetDIAConstraints( w, d, a ) #define CompareDIAState( x, y ) 0 #define GetHiddenStatusBarArea( a ) MemSet( a, sizeof( RectangleType ), 0 ) #define HanderaAdjustFont( font ) ( font ) #define HanderaCoord( x ) ( x ) #endif /* */ #endif /* _ARP_DIA_H */ --- NEW FILE: DIA.txt --- $Id: DIA.txt,v 1.1 2009/11/02 17:29:23 mapibid Exp $ The code in DIA.c does the low-level stuff of communicating with the DIA hardware or more generally hardware that supports non-standard screen sizes. The code has been tested with Sony OS4, Sony OS5 (portrait and landscape), Handera (portrait), Palm OS5.2+ (portrait and landscape), Dana Alphasmart (wide or tall). This code is covered by the following license: Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the PalmResize Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. To support DIA in your application, you need to do a couple of things. 0. Obtain the Sony SDK: http://www.jp.sonystyle.com/Clie-dev/develop_tool/index.html if you want to support Sony code. Obtain the Handera SDK if you want to support Handera code. 1. To support Sony, compile DIA.c with -DSUPPORT_DIA_SONY. To support Handera, compile DIA.c with -DSUPPORT_DIA_HANDERA. Additionally, you must always have -DSUPPORT_DIA if you want any DIA support, or you can put #define SUPPORT_DIA in a config.h file (which must in any case be available but can be empty). HAVE_SILKSCREEN is a synonym for SUPPORT_DIA. Also, ensure that you have a sects.h file that correctly sets the code sections for DIA_SECTION and RESIZE_SECTION. If your application doesn't do sectioning, you can just do: #define DIA_SECTION #define RESIZE_SECTION You also need to ensure that you have defined SafeMemPtrNew() and SafeMemPtrFree() code and you have prototypes for these in util.h. SafeMemPtrFree() should return if fed a NULL pointer, else call MemPtrFree(), and SafeMemPtrNew() should produce a fatal application error if MemPtrNew() fails. If you don't care about error checking, you can always do something like: #define SafeMemPtrNew MemPtrNew #define SafeMemPtrFree( p ) if ( ( p ) != NULL ) MemPtrFree( ( p ) ) For Palm DIA support, you need the 5r3 SDK, and all should be well: no need for special #defines. 2. In your application initialization (E.g., StartApplication()) code, call InitializeResizeSupport( indexDIADataID ) make sure this happens before the event handlers for your forms are set. In your application de-initialization, call TerminateResizeSupport(). 3. In the place in your application where you handle notifications, before processing any notifications, add a call to: Boolean HandleResizeNotification( UInt32 notificationType ) This routine returns true if it has handled a resize notification, in which case you do not need to handle the notification yourself. Note that the relevant notification is automatically registered for by InitializeResizeSupport() and that the notification type depends on your hardware platform. 4. Before setting the event handler for form formID, call SetResizePolicy( formID ). 5. In each form event handler, make sure that before doing any handling yourself, you call the function: Boolean ResizeHandleEvent( EventType* event ) RESIZE_SECTION; If this function returns true, your event handler should return true; otherwise, you should handle the event yourself. This applies even to form event handlers where you do not want any resizing. However, you do not need to include resize data resources for such forms--just the call to ResizeHandleEvent(). Earlier versions of PalmResize required calling separate handling functions for different event types. This is deprecated now and may no longer work in the future. 5. Modify your .rcp file to include information on how to resize forms. This is done by including a number of WORDLIST (wrdl) resources. The first and the only non-optional one is an index resource of word pairs. WORDLIST ID indexDIADataID BEGIN fromID1 toID1 fromID2 toID2 ... END The ID indexDIADataID is the same as the one in the InitializeResizeSupport() call. The list of word pairs then each contains the ID of a form resource followed by the ID of the WORDLIST resource that contains the DIA resize data for that form. DIA is disabled for any forms not listed in the index: virtual graffiti is popped up and resize is disabled if possible. It is perfectly acceptable to have no forms in the index or not all of them. Unless this conflicts with other WORDLIST IDs you might be using, it is easiest to use the same ID for the resize data as for the form, so PalmBible+'s index, for instance, starts: frmMain frmMain frmVersionInfo frmVersionInfo frmMemoEdit frmMemoEdit 6. Now include specific information on how to resize the forms in your application. You should #include "resizeconsts.h" in your .rcp file to define various bitmapped flags. Each set of information has the following format: WORDLIST ID resizeFormID BEGIN formFlags binNumber preferredState // Object data objectNum1 flags1 0 objectNum2 flags2 0 ... END formFlags is either 0 or a combination of: DIA_FORM_KEEP_LAST DIA_FORM_USE_BIN DIA_FORM_NO_RESIZE DIA_FORM_HANDERA These flags, as all flags, can be added together, e.g.: DIA_FORM_KEEP_LAST + DIA_FORM_USE_BIN DIA_FORM_KEEP_LAST: The form keeps the DIA state that was in force before it was opened, unless the form uses a bin, and the bin has defined data. If this flag is set, binNumber is ignored (but must still be included--perhaps set to zero). DIA_FORM_USE_BIN: A given application can include a number of "DIA state bins." All forms that use the same bin share the same DIA setting, and if a user resizes a form in the bin, all the other forms in the bin are resized. For instance, modal dialogs might be put all in one bin. Or, items which do not require graffiti might be put in another bin. When an application starts up, unless the bin data is loaded from the application's preferences database, each bin entry is undefined. The DIA_FORM_USE_BIN flag interacts with the DIA_FORM_KEEP_LAST flag as follows: if the bin has not yet been defined, the bin and the form get the DIA state in force when the form was opened. Without a DIA_FORM_KEEP_LAST flag, the bin starts off being set to preferredState. Without either of these flags, whenever the form is opened, the DIA is set to preferredState. DIA_FORM_HANDERA: The form is pre-measured for Handera 240x240 screens and does not need to be re-adjusted for them. Otherwise, if DIA support is linked in, the form is re-adjusted from 160x160 to 240x240. preferredState is one of: DIA_STATE_MAX DIA_STATE_MIN DIA_STATE_NO_STATUS_BAR If DIA_FORM_KEEP_LAST is specified, this is ignored but must still be included. The MAX and MIN refer to the size of the DIA area. Thus, with DIA_STATE_MAX, the screen is typically minimized to the standard 160x160 (or 320x320) area. With DIA_STATE_MIN, the DIA is contracted, and the maximum screen size is available. DIA_STATE_NO_STATUS_BAR is the same as DIA_STATE_MIN on Handera units, but on the Sony NR/NX/NZ/UX/TH and Palm DIA devices it opens a full screen mode with no status bar. Make sure you give the user a way of exiting this! Sony recommends you do this by letting the user tap on the place where the status bar used to be in order to restore the status bar. Finally, you get a list of object resize data. This is the part of the resize information that will take the most work. By default, objects do not resize--they stay the same size, and the same position relative to the top left corner of the display. Any objects which you want to move or resize with DIA changes must be listed here. The first object (whose objectNum1 is ignored, but must still be included, e.g., set to 0) is always the form itself, and its resizing is relative to the whole screen. The other objects resize relative to the form. At least the form itself must be included. Each object resize line starts with the object ID (ignored for the form itself, and set to the special value GSI_OBJECT_ID (65280) for the graffiti state indicator--make sure this value is not used for anything else in your form), then has a word specifying a combination of flags or 0 if the object does not need to change size or position, followed by a reserved word that should contain 0. The object flags are a combination of: DIA_X_RATIO DIA_Y_RATIO DIA_W_RATIO DIA_H_RATIO DIA_X_RIGHT DIA_Y_BOTTOM DIA_X_PLUS_DW DIA_Y_PLUS_DH DIA_W_PLUS_DW DIA_H_PLUS_DH DIA_X_PLUS_1_2_DW DIA_Y_PLUS_1_2_DH DIA_W_PLUS_1_2_DW DIA_H_PLUS_1_2_DH DIA_X_PLUS_1_3_DW DIA_Y_PLUS_1_3_DH DIA_W_PLUS_1_3_DW DIA_H_PLUS_1_3_DH DIA_X_PLUS_2_3_DW DIA_Y_PLUS_2_3_DH DIA_W_PLUS_2_3_DW DIA_H_PLUS_2_3_DH DIA_X_PLUS_1_4_DW DIA_Y_PLUS_1_4_DH DIA_W_PLUS_1_4_DW DIA_H_PLUS_1_4_DH DIA_X_PLUS_3_4_DW DIA_Y_PLUS_3_4_DH DIA_W_PLUS_3_4_DW DIA_H_PLUS_3_4_DH These flags specify how the four relevant positioning values are changed. These values are X (horizontal coordinate), Y (vertical coordinate), W (width), H (height). You can at most include one DIA_X_* flag, one DIA_Y_* flag, one DIA_W* and one DIA_H* flag. If you omit a flag for one of the positioning values, the value is unchanged. The positioning values have the following meanings: *_RATIO : Keep the ration of the value relative to the extent of the form/display (i.e., for objects other than the form, extent of the form, and for the form, extent of the display) constant. Thus, if the object was originally 37% of the height of the form down in the form, then DIA_Y_RATIO will try to keep the object at 37% of the height of the resized form down in the form. If the object took up half of the width of the form, it will still do so if you set DIA_W_RATIO. X_RIGHT : This ensures that the distance from the right edge of the screen to the right edge of the object does not change with resizing. If the form is widened, the object moves right. Y_BOTTOM : This ensures that the distance from the bottom edge of the screen to the bottom edge of the object does not change with resizing. If the form is lengthened, the object moves down. *_PLUS_D[WH] : This says that the value should have added to it the amount of the change in the width (DW) or height (DH) that the form/display had. *_PLUS_*_D[WH] : This is the same as *_PLUS_D[WH] except only the specified fraction of the change in the width or height is added. The fraction is one of 1_2 (1/2), 1_3 (1/3), 2_3 (2/3), 1_4 (1/4) or 3_4 (1/4). Use this when you have two to four objects horizontally or vertically arranged which you would like to resize equally. Make sure that objects to the right or below them get the right *_PLUS_*_D[WH] or X_RIGHT or Y_BOTTOM attributes. For instance, if you have two side-by-side list boxes, you might do: listbox1 DIA_W_PLUS_1_2_DW+DIA_H_PLUS_DH 0 listbox2 DIA_X_PLUS_1_2_DW+DIA_W_PLUS_1_2_DW+DIA_H_PLUS_DH 0 This way, listbox1 and listbox2 each get the full benefit of any form lengthening (DIA_H_PLUS_DH), and each get half of the benefit of the form widening (DIA_W_PLUS_1_2_DW). Moreover, we made sure that listbox2 would be placed further to the right to compensate for listbox1 widening, as needed. Additionally, there is a DIA_H_GRANULAR attribute which forces the height for a list or field to be an integral number of rows, unless this would force the height to be zero. 7. Unfortunately, currently (as of pilrc 3.2 beta 1), pilrc does not support arithmetic in WORDLIST resources. This is a serious problem for adding up flags. The recommended solution is the following. Run the .rcp file through cpp, after first changing final \ to @backslash@ with sed (otherwise multiline strings are mangled; if there aren't any such, nevermind). Then run the resulting file through the doaddition.pl perl script which (a) does the arithmetic inside WORDLIST resources and changes each final @backslash@ back to \. doaddition.pl is not very smart. Make sure that WORDLIST is all caps and that WORDLIST, BEGIN and END are all flush on the left margin in the .rcp file. The following should do the trick: sed 's/\\$$/@backslash@/' < file.rcp | cpp | perl doaddition.pl > file.rcp.out Then run pilrc on file.rcp.out. 8. If you have the Sony status bar hidden, Sony recommends that you allow the user to restore the area via a tap in that hidden area. To this end, you can use void GetHiddenStatusBarArea( RectangleType* area ) to get the area covered by the status bar (in current coordinates under OS5, and in standard coordinates otherwise). If the status bar is showing, an empty rectangle is returned. 9. Finally, you can call void ResizeRefreshCurrentForm( void ); to refresh the current form's DIA settings and redraw the form. Normally there should be no need to call this if you've followed the above instructions. A need to call this suggests a bug in resize.c or in your code. But this may be a temporary work-around until the bug is fixed. 10. For Handera support, your .rcp file should contain: HEX "sKst" ID 1000 0x00 0x00 0x00 0x00 You also need the Handera SDK. It's no longer available from the Handera website. You can get it from the non-free directory of the source distribution of the latest PalmBible+ release: palmbibleplus.sf.net . Moreover, to avoid using 2/3 size fonts, you should replace all calls FntSetFont( f ) with calls FntSetFont( HanderaAdjustFont( f ) ). You can also use HanderaCoord( x ) to convert from standard 160x160 coordinates to 240x240. Both functions just return their argument unchanged not on a Handera system. 11. For Dana AlphaSmart support, your .rcp file should contain: HEX "wTap" ID 1000 0x00 0x00 0x00 0x01 12. You can save and restore the user's DIA bin settings to prefs, so that each bin keeps the same state between sessions. To restore settings, right after calling InitializeResizeSupport(), call extern void LoadResizePrefs( UInt32 appID, UInt16 prefID ) RESIZE_SECTION; with your apps appID and with a prefID you aren't using as a preference ID for anything else. To save settings, right before calling TerminateResizeSupport(), call: extern void SaveResizePrefs( UInt32 appID, UInt16 prefID, Int16 version ) RESIZE_SECTION; The arguments have the same meaning, except you need to specify a version number for your pref. You can just put 0 each time if you want. 13. If you need to make additional modifications to your form after a resize, these modifications should be made in a handler for winDisplayChangedEvent. Note that after a ResizeSupportInitialize() call, this event is emitted on all supported hardware when the silk/DIA area resizes or when the screen orientation changes, so you don't have to worry about the fact that, say, normally Sony OS4 units don't emit it. If you opt to use the deprecated method of calling ResizeHandleWinDisplayChangedEvent() from the handler instead of calling ResizeHandleEvent(), you should make custom modifications after ResizeHandleWinDisplayChangedEvent() is done. Note that you can reliably count on a frmUpdateFormEvent happening (with updateCode == redrawUpdateCode) at some point soon after the winDisplayChangedEvent handler gets done, so you do not need to enqueue a frmUpdateFormEvent yourself. You can also do all your changes from within a frmUpdateFormEvent handler. Such additional changes need to be made, for instance, for tables. While palmResize will resize the outside dimensions, you need to decide whether to resize the cells, insert more cells, or whatever. 14. A demo of how to run palmResize is in the demo directory. You may need to edit the Makefile to get it to compile. --- NEW FILE: resizeconsts.h --- /* $Id: resizeconsts.h,v 1.1 2009/11/02 17:29:23 mapibid Exp $ */ /******************************************************************************* Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the PalmResize Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ /* Object attribute flags */ #define DIA_MASK_X 15 /* 0x000F */ #define DIA_MASK_Y 240 /* 0x00F0 */ #define DIA_MASK_W 1792 /* 0x0700 */ #define DIA_MASK_H 28672 /* 0x7000 */ #define DIA_SHIFT_X 0 #define DIA_SHIFT_Y 4 #define DIA_SHIFT_W 8 #define DIA_SHIFT_H 12 #define DIA_X_FIX 0 /* 0x0000 */ #define DIA_Y_FIX 0 /* 0x0000 */ #define DIA_W_FIX 0 /* 0x0000 */ #define DIA_H_FIX 0 /* 0x0000 */ #define DIA_X_RATIO 7 /* 0x0007 */ #define DIA_Y_RATIO 112 /* 0x0070 */ #define DIA_W_RATIO 1792 /* 0x0700 */ #define DIA_H_RATIO 28672 /* 0x7000 */ #define DIA_X_RIGHT 8 /* 0x0008 */ #define DIA_Y_BOTTOM 128 /* 0x0080 */ #define DIA_X_PLUS_DW 1 /* 0x0001 */ #define DIA_Y_PLUS_DH 16 /* 0x0010 */ #define DIA_W_PLUS_DW 256 /* 0x0100 */ #define DIA_H_PLUS_DH 4096 /* 0x1000 */ #define DIA_X_PLUS_1_2_DW 2 /* 0x0002 */ #define DIA_Y_PLUS_1_2_DH 32 /* 0x0020 */ #define DIA_W_PLUS_1_2_DW 512 /* 0x0200 */ #define DIA_H_PLUS_1_2_DH 8192 /* 0x2000 */ #define DIA_X_PLUS_1_3_DW 3 /* 0x0003 */ #define DIA_Y_PLUS_1_3_DH 48 /* 0x0030 */ #define DIA_W_PLUS_1_3_DW 768 /* 0x0300 */ #define DIA_H_PLUS_1_3_DH 12288 /* 0x3000 */ #define DIA_X_PLUS_2_3_DW 4 /* 0x0004 */ #define DIA_Y_PLUS_2_3_DH 64 /* 0x0040 */ #define DIA_W_PLUS_2_3_DW 1024 /* 0x0400 */ #define DIA_H_PLUS_2_3_DH 16384 /* 0x4000 */ #define DIA_X_PLUS_1_4_DW 5 /* 0x0005 */ #define DIA_Y_PLUS_1_4_DH 80 /* 0x0050 */ #define DIA_W_PLUS_1_4_DW 1280 /* 0x0500 */ #define DIA_H_PLUS_1_4_DH 20480 /* 0x5000 */ #define DIA_X_PLUS_3_4_DW 6 /* 0x0006 */ #define DIA_Y_PLUS_3_4_DH 96 /* 0x0060 */ #define DIA_W_PLUS_3_4_DW 1536 /* 0x0600 */ #define DIA_H_PLUS_3_4_DH 24576 /* 0x6000 */ #define DIA_H_GRANULAR 32768 /* 0x8000 */ /* Form attribute flags */ /* Try to keep the same DIA state as in previous form */ #define DIA_FORM_KEEP_LAST 1 /* Keep the same DIA state as previous form using the same bin */ /* If DIA_FORM_KEEP_LAST and DIA_FORM_USE_BIN are both set, then we keep last DIA state to get the initial DIA state for the bin the first time a form from that bin is used. */ #define DIA_FORM_USE_BIN 2 /* Disable DIA state change */ #define DIA_FORM_NO_RESIZE 4 /* Handera-specific form */ #define DIA_FORM_HANDERA 8 #define STD_EXTENT_X 160 #define STD_EXTENT_Y 160 #define MAX_EXTENT_X 4096 #define MAX_EXTENT_Y 4096 #define DIA_STATE_MAX 0 #define DIA_STATE_MIN 1 #define DIA_STATE_NO_STATUS_BAR 2 #define DIA_STATE_UNDEFINED 255 /* No actual object is allowed to have this--this is used within resize config info */ #define GSI_OBJECT_ID 65280 /* 0xFF00 */ --- NEW FILE: sects.h --- /* File name: sects.h Copyright 2006 Ton van Overbeek This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. * * Summary * Section defines for PalmResize DIA support in EasyCalc. * */ #ifndef _SECTS_H_ #define _SECTS_H_ #include "segment.h" #define RESIZE_SECTION GRAPH_SECTION #define DIA_SECTION GRAPH_SECTION #endif --- NEW FILE: DIA.c --- /* $Id: DIA.c,v 1.1 2009/11/02 17:29:23 mapibid Exp $ */ /******************************************************************************* Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include "resize.h" #include "DIA.h" #ifdef SUPPORT_DIA_HANDERA #include <Vga.h> #include <Silk.h> #endif #ifdef SUPPORT_DIA_SONY #include <SonyCLIE.h> #ifndef vskResizeVertically # define vskResizeVertically 1 #endif #ifndef vskResizeHorizontally # define vskResizeHorizontally 2 #endif #endif #define COORDSYS_STACK_LEN 10 #ifdef SUPPORT_DIA static DIAHardwareType hardware = DIA_HARDWARE_NONE; static UInt32 displayChangeNotification = 0; static Boolean haveNotification; static UInt16 card; static LocalID db; static Boolean palmHiRes; static UInt16 coordSysStack[10]; static UInt16 coordSysStackPtr = 0; #ifdef SUPPORT_DIA_SONY static Boolean sony1AllowResize = false; static UInt16 sonyRefNum; #endif #ifdef SUPPORT_DIA_HANDERA static VgaRotateModeType savedHanderaRotation; static VgaScreenModeType savedHanderaScreenMode; #endif #ifdef SUPPORT_DIA_HANDERA static DIAHardwareType InitializeHandera(void) { UInt32 version; if (_TRGSilkFeaturePresent(&version)) { VgaRotateModeType rotation; VgaScreenModeType screenMode; VgaGetScreenMode(&screenMode, &rotation); savedHanderaScreenMode = screenMode; savedHanderaRotation = rotation; if (screenMode != screenMode1To1) VgaSetScreenMode(screenMode1To1, rotation); return DIA_HARDWARE_HANDERA; } else { return DIA_HARDWARE_NONE; } } #else # define InitializeHandera() DIA_HARDWARE_NONE #endif #ifdef SUPPORT_DIA_SONY static DIAHardwareType InitializeSony(void) { Err err; UInt32 version; err = SysLibFind(sonySysLibNameSilk, &sonyRefNum); if (err == sysErrLibNotFound) { err = SysLibLoad('libr', sonySysFileCSilkLib, &sonyRefNum); } if (err != errNone) return DIA_HARDWARE_NONE; if (errNone == FtrGet(sonySysFtrCreator, sonySysFtrNumVskVersion, &version)) { /* * Version 2 and up */ err = VskOpen(sonyRefNum); if (errNone == err) return DIA_HARDWARE_SONY2; } else { /* * Version 1 and up */ err = SilkLibOpen(sonyRefNum); if (errNone == err) { /* * Make sure we are in a Hi-Res mode */ UInt32 width; UInt32 height; UInt16 sonyHiResRefNum; err = SysLibFind(sonySysLibNameHR, &sonyHiResRefNum); if (err == sysErrLibNotFound) err = SysLibLoad('libr', sonySysFileCHRLib, &sonyHiResRefNum); if (err == errNone) { err = HROpen(sonyHiResRefNum); HRWinScreenMode(sonyHiResRefNum, winScreenModeGet, &width, &height, NULL, NULL); if (width < hrWidth) { width = hrWidth; height = hrHeight; if (errNone != HRWinScreenMode(sonyHiResRefNum, winScreenModeSet, &width, &height, NULL, NULL)) { HRClose(sonyHiResRefNum); return DIA_HARDWARE_NONE; } } HRClose(sonyHiResRefNum); } else return DIA_HARDWARE_NONE; } SilkLibDisableResize(sonyRefNum); sony1AllowResize = false; return DIA_HARDWARE_SONY1; } return DIA_HARDWARE_NONE; } #else # define InitializeSony() DIA_HARDWARE_NONE #endif #ifdef HAVE_PALM_DIA_SDK static DIAHardwareType InitializePalm(void) { UInt32 version; Err err; err = FtrGet(pinCreator, pinFtrAPIVersion, &version); if (err != errNone) return DIA_HARDWARE_NONE; if (pinAPIVersion1_1 <= version) return DIA_HARDWARE_PALM11; else if (pinAPIVersion1_0 <= version) return DIA_HARDWARE_PALM10; else return DIA_HARDWARE_NONE; } #else # define InitializePalm() DIA_HARDWARE_NONE #endif /* Check if this is an unknown device with non-standard screen size so we can make proper use of the screen size. */ static DIAHardwareType InitializeUnknown(void) { Coord extentX; Coord extentY; PushCoordinateSystemToStandard(); WinGetDisplayExtent(&extentX, &extentY); PopCoordinateSystem(); if (extentX != STD_EXTENT_X || extentY != STD_EXTENT_Y) return DIA_HARDWARE_UNKNOWN; else return DIA_HARDWARE_NONE; } static void RegisterNotification(void) { Err err; haveNotification = false; switch (hardware) { #ifdef SUPPORT_DIA_SONY case DIA_HARDWARE_SONY1: case DIA_HARDWARE_SONY2: displayChangeNotification = sysNotifyDisplayChangeEvent; break; #endif #ifdef SUPPORT_DIA_HANDERA case DIA_HARDWARE_HANDERA: displayChangeNotification = trgNotifySilkEvent; break; #endif #ifdef HAVE_PALM_DIA_SDK case DIA_HARDWARE_PALM10: case DIA_HARDWARE_PALM11: displayChangeNotification = sysNotifyDisplayResizedEvent; break; #endif default: return; } err = SysCurAppDatabase(&card, &db); if (err != errNone) return; err = SysNotifyRegister(card, db, displayChangeNotification, NULL, sysNotifyNormalPriority, 0); haveNotification = (err == errNone); } static void UnregisterNotification(void) { if (haveNotification) { SysNotifyUnregister(card, db, displayChangeNotification, sysNotifyNormalPriority); haveNotification = false; } } DIAHardwareType InitializeDIA(void) { Err err; UInt32 version; err = FtrGet(sysFtrCreator, sysFtrNumWinVersion, &version); palmHiRes = (err == errNone && 4 <= version); hardware = InitializeHandera(); if (hardware == DIA_HARDWARE_NONE) hardware = InitializePalm(); if (hardware == DIA_HARDWARE_NONE) hardware = InitializeSony(); if (hardware == DIA_HARDWARE_NONE) hardware = InitializeUnknown(); RegisterNotification(); return hardware; } void TerminateDIA(void) { UnregisterNotification(); if (GetDIAState() == DIA_STATE_NO_STATUS_BAR) SetDIAState(DIA_STATE_MIN); switch (hardware) { #ifdef SUPPORT_DIA_SONY case DIA_HARDWARE_SONY1: SilkLibClose(sonyRefNum); break; case DIA_HARDWARE_SONY2: VskClose(sonyRefNum); break; #endif #ifdef SUPPORT_DIA_HANDERA case DIA_HARDWARE_HANDERA:{ VgaRotateModeType rotation; VgaScreenModeType screenMode; VgaGetScreenMode(&screenMode, &rotation); if (screenMode != savedHanderaScreenMode || savedHanderaRotation != rotation) { VgaSetScreenMode(savedHanderaScreenMode, savedHanderaRotation); } } #endif default: break; } hardware = DIA_HARDWARE_NONE; } void SetDIAState(DIAStateType state) { if (DIA_HARDWARE_HANDERA == hardware && GetDIAState() == state) return; switch (hardware) { #ifdef SUPPORT_DIA_SONY case DIA_HARDWARE_SONY1:{ Boolean oldAllow; oldAllow = sony1AllowResize; if (!oldAllow) SetDIAAllowResize(true); switch (state) { case DIA_STATE_MAX: SilkLibResizeDispWin(sonyRefNum, silkResizeNormal); break; case DIA_STATE_MIN: SilkLibResizeDispWin(sonyRefNum, silkResizeToStatus); break; case DIA_STATE_NO_STATUS_BAR: SilkLibResizeDispWin(sonyRefNum, silkResizeMax); break; default: break; } break; if (!oldAllow) SetDIAAllowResize(false); } case DIA_HARDWARE_SONY2:{ Boolean oldAllow; UInt16 allowState; if (errNone == VskGetState(sonyRefNum, vskStateEnable, &allowState)) oldAllow = (allowState != 0); else oldAllow = false; if (!oldAllow) { SetDIAAllowResize(true); } switch (state) { case DIA_STATE_MAX: VskSetState(sonyRefNum, vskStateResize, vskResizeMax); break; case DIA_STATE_MIN: VskSetState(sonyRefNum, vskStateResize, vskResizeMin); break; case DIA_STATE_NO_STATUS_BAR: VskSetState(sonyRefNum, vskStateResize, vskResizeNone); break; default: break; } break; if (!oldAllow) SetDIAAllowResize(false); } #endif #ifdef SUPPORT_DIA_HANDERA case DIA_HARDWARE_HANDERA: switch (state) { case DIA_STATE_MAX: SilkMaximizeWindow(); break; case DIA_STATE_MIN: case DIA_STATE_NO_STATUS_BAR: SilkMinimizeWindow(); break; default: break; } break; #endif #ifdef HAVE_PALM_DIA_SDK case DIA_HARDWARE_PALM10: case DIA_HARDWARE_PALM11: switch (state) { case DIA_STATE_MAX: StatShow(); PINSetInputAreaState(pinInputAreaOpen); break; case DIA_STATE_MIN: PINSetInputAreaState(pinInputAreaClosed); StatShow(); break; case DIA_STATE_NO_STATUS_BAR: StatHide(); if (PINGetInputAreaState() == pinInputAreaOpen) PINSetInputAreaState(pinInputAreaClosed); /* extra hide for some devices */ if ( GetDIAState() != DIA_STATE_NO_STATUS_BAR ) StatHide(); break; default: break; } break; #endif default: break; } } DIAStateType GetDIAState(void) { switch (hardware) { #ifdef SUPPORT_DIA_SONY case DIA_HARDWARE_SONY1:{ Coord extentY; PushCoordinateSystemToStandard(); WinGetDisplayExtent(NULL, &extentY); PopCoordinateSystem(); if (240 <= extentY) return DIA_STATE_NO_STATUS_BAR; else if (225 <= extentY) return DIA_STATE_MIN; else return DIA_STATE_MAX; break; } case DIA_HARDWARE_SONY2:{ UInt16 state; Err err; err = VskGetState(sonyRefNum, vskStateResize, &state); if (err != errNone) return DIA_STATE_UNDEFINED; switch (state) { case vskResizeMax: return DIA_STATE_MAX; case vskResizeMin: return DIA_STATE_MIN; case vskResizeNone: return DIA_STATE_NO_STATUS_BAR; default: return DIA_STATE_UNDEFINED; } } #endif #ifdef SUPPORT_DIA_HANDERA case DIA_HARDWARE_HANDERA: if (SilkWindowMaximized()) return DIA_STATE_MAX; else return DIA_STATE_MIN; #endif #ifdef HAVE_PALM_DIA_SDK case DIA_HARDWARE_PALM10: case DIA_HARDWARE_PALM11: switch (PINGetInputAreaState()) { case pinInputAreaOpen: return DIA_STATE_MAX; case pinInputAreaClosed: case pinInputAreaNone:{ Err err; UInt32 value; err = StatGetAttribute(statAttrBarVisible, &value); if (err != errNone || value != 0) return DIA_STATE_MIN; else return DIA_STATE_NO_STATUS_BAR; } default: return DIA_STATE_UNDEFINED; } #endif default: return DIA_STATE_MAX; } } void SetDIAAllowResize(Boolean allow) { switch (hardware) { #ifdef SUPPORT_DIA_SONY case DIA_HARDWARE_SONY2: if (allow) { /* * If available, enable horizontal resize */ if (0x03 <= VskGetAPIVersion(sonyRefNum)) VskSetState(sonyRefNum, vskStateEnable, vskResizeHorizontally); /* * Enable vertical resize */ VskSetState(sonyRefNum, vskStateEnable, vskResizeVertically); } else { VskSetState(sonyRefNum, vskStateEnable, 0); } break; case DIA_HARDWARE_SONY1: if (allow) SilkLibEnableResize(sonyRefNum); else SilkLibDisableResize(sonyRefNum); sony1AllowResize = allow; break; #endif #ifdef HAVE_PALM_DIA_SDK case DIA_HARDWARE_PALM11: case DIA_HARDWARE_PALM10: PINSetInputTriggerState(allow ? pinInputTriggerEnabled : pinInputTriggerDisabled); SysSetOrientationTriggerState(allow ? sysOrientationTriggerEnabled : sysOrientationTriggerDisabled); break; #endif /* * Note: On Handera, resizing is always enabled */ default: break; } } static Boolean MatchLastExtents(void) { static Coord lastX; static Coord lastY; Coord extentX; Coord extentY; extentX = lastX; extentY = lastY; PushCoordinateSystemToStandard(); WinGetDisplayExtent(&lastX, &lastY); PopCoordinateSystem(); return extentX == lastX && extentY == lastY; } Boolean HandleResizeNotification(UInt32 notificationType) { switch (notificationType) { #ifdef SUPPORT_DIA_SONY case sysNotifyDisplayChangeEvent: #endif #ifdef HAVE_PALM_DIA_SDK case sysNotifyDisplayResizedEvent: #endif #ifdef SUPPORT_DIA_HANDERA case trgNotifySilkEvent: #endif { EventType e; if (!MatchLastExtents()) { SetHaveWinDisplayChangedEvent(true); if (hardware != DIA_HARDWARE_PALM11) { MemSet(&e, sizeof(EventType), 0); e.eType = winDisplayChangedEvent; EvtAddUniqueEventToQueue(&e, 0, true); } } return true; } default: return false; } } void SetCustomDIAPolicy(UInt16 formID) { #ifdef HAVE_PALM_DIA_SDK if (hardware == DIA_HARDWARE_PALM10 || hardware == DIA_HARDWARE_PALM11) { FormType *formPtr; formPtr = FrmGetFormPtr(formID); if (formPtr != NULL) { FrmSetDIAPolicyAttr(formPtr, frmDIAPolicyCustom); } } #endif } DIAHardwareType GetDIAHardware(void) { return hardware; } void SetDIAConstraints(WinHandle winH, Boolean big, Boolean allowBig) { #ifdef HAVE_PALM_DIA_SDK if (hardware == DIA_HARDWARE_PALM10 || hardware == DIA_HARDWARE_PALM11) { PushCoordinateSystemToStandard(); WinSetConstraintsSize(winH, STD_EXTENT_Y, big ? MAX_EXTENT_Y : STD_EXTENT_Y, allowBig ? MAX_EXTENT_Y : STD_EXTENT_Y, STD_EXTENT_X, big ? MAX_EXTENT_X : STD_EXTENT_X, allowBig ? MAX_EXTENT_X : STD_EXTENT_X); PopCoordinateSystem(); } #endif } /* Check which DIA state covers more screen space */ Int16 CompareDIAState(DIAStateType x, DIAStateType y) { if (y == DIA_STATE_UNDEFINED) y = DIA_STATE_MAX; if (x == DIA_STATE_UNDEFINED) x = DIA_STATE_MAX; if (x == y) return 0; switch (x) { case DIA_STATE_MIN: return y == DIA_STATE_NO_STATUS_BAR ? 1 : -1; case DIA_STATE_NO_STATUS_BAR: return -1; case DIA_STATE_MAX: default: return 1; } } static UInt16 SafeWinSetCoordinateSystem(UInt16 coordSys) { if (!palmHiRes || NULL == WinGetDrawWindow()) return kCoordinatesStandard; else return WinSetCoordinateSystem(coordSys); } void PushCoordinateSystemToStandard(void) { coordSysStack[coordSysStackPtr++] = SafeWinSetCoordinateSystem(kCoordinatesStandard); } void PopCoordinateSystem(void) { SafeWinSetCoordinateSystem(coordSysStack[--coordSysStackPtr]); } void GetHiddenStatusBarArea(RectangleType * area) { MemSet(area, sizeof(RectangleType), 0); if (DIA_STATE_NO_STATUS_BAR != GetDIAState()) { return; } switch (hardware) { case DIA_HARDWARE_SONY2: case DIA_HARDWARE_SONY1: case DIA_HARDWARE_PALM11: case DIA_HARDWARE_PALM10:{ Coord extentX; Coord extentY; WinGetDisplayExtent(&extentX, &extentY); switch (extentX) { case 160: /* 160 x 240 */ area->topLeft.x = 0; area->topLeft.y = 225; area->extent.x = 160; area->extent.y = 240 - 225; break; case 240: /* 240 x 160 */ area->topLeft.x = 225; area->topLeft.y = 0; area->extent.x = 240 - 225; area->extent.y = 160; break; case 320: /* 320 x 480 */ area->topLeft.x = 0; area->topLeft.y = 450; area->extent.x = 320; area->extent.y = 480 - 450; break; case 480: /* 480 x 320 */ area->topLeft.x = 450; area->topLeft.y = 0; area->extent.x = 480 - 450; area->extent.y = 320; break; default: break; } break; } default: break; } } FontID HanderaAdjustFont(FontID font) { #ifdef SUPPORT_DIA_HANDERA if (hardware == DIA_HARDWARE_HANDERA && 0 == (font & fntAppFontCustomBase)) return VgaBaseToVgaFont(font); else #endif return font; } Coord HanderaCoord(Coord x) { #ifdef SUPPORT_DIA_HANDERA return hardware == DIA_HARDWARE_HANDERA ? x * 3 / 2 : x; #else return x; #endif } #endif --- NEW FILE: util_dia.h --- /* File name: util_dia.h Copyright 2006 Ton van Overbeek This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. * * Summary * Utility definitions for PalmResize DIA support. * */ #ifndef _UTIL_DIA_H_ #define _UTIL_DIA_H_ #define SafeMemPtrNew MemPtrNew #define SafeMemPtrFree(p) if ((p) != NULL) MemPtrFree((p)) #endif --- NEW FILE: resize.h --- /* $Id: resize.h,v 1.1 2009/11/02 17:29:23 mapibid Exp $ */ /******************************************************************************* Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #ifndef PLUCKER_RESIZE_H #define PLUCKER_RESIZE_H //#include "viewer.h" #include <PalmOS.h> //#include "PalmBible.h" #include "config.h" #include "sects.h" #if ! defined( SUPPORT_DIA ) && defined( HAVE_SILKSCREEN ) # define SUPPORT_DIA #endif /* */ #if ! defined( SUPPORT_DIA_SONY ) && defined( HAVE_SONY_SDK ) # define SUPPORT_DIA_SONY #endif /* */ #if ! defined( SUPPORT_DIA_HANDERA ) && defined( HAVE_HANDERA_SDK ) # define SUPPORT_DIA_HANDERA #endif /* */ #ifndef winDisplayChangedEvent # define winDisplayChangedEvent 0x4101 #else /* */ # define HAVE_PALM_DIA_SDK #endif /* */ #include "resizeconsts.h" #define WORD_LIST_TYPE 'wrdl' typedef struct { UInt16 objectID; UInt16 flags; UInt16 reserved; } DIAConfigEntryType; typedef UInt8 DIAStateType; typedef struct { UInt16 sizeInWords; UInt16 flags; UInt16 bin; UInt16 preferredState; DIAConfigEntryType objectList[0]; } DIAConfigType; typedef struct { UInt16 from; UInt16 to; } DIAIndexEntryType; typedef struct { UInt16 count; DIAIndexEntryType mapList[0]; } DIAIndexType; typedef struct { UInt16 formID; UInt16 numObjects; Boolean open; MemHandle configHandle; Coord lastExtentX; Coord lastExtentY; RectangleType lastBounds; Boolean forceRedraw; DIAConfigType * config; RectangleType * originalBounds; } DIAFormEntryType; #ifdef SUPPORT_DIA extern void InitializeResizeSupport(UInt16 formMapId) RESIZE_SECTION; extern void TerminateResizeSupport(void) RESIZE_SECTION; extern void SetResizePolicy(UInt16 formID) RESIZE_SECTION; extern Boolean ResizeHandleFrmOpenEvent(void) RESIZE_SECTION; extern Boolean ResizeHandleFrmCloseEvent(void) RESIZE_SECTION; extern Boolean ResizeHandleWinDisplayChangedEvent(void) RESIZE_SECTION; extern Boolean ResizeHandleWinExitEvent(void) RESIZE_SECTION; extern Boolean ResizeHandleWinEnterEvent(void) RESIZE_SECTION; extern Boolean ResizeHandleFrmRedrawUpdateCode(void) RESIZE_SECTION; extern void LoadResizePrefs(UInt32 appID, UInt16 prefID) RESIZE_SECTION; extern void SaveResizePrefs(UInt32 appID, UInt16 prefID, Int16 version) RESIZE_SECTION; extern void ResizeRefreshCurrentForm(void) RESIZE_SECTION; extern void SetHaveWinDisplayChangedEvent(Boolean value) RESIZE_SECTION; extern Boolean ResizeForm(UInt16 formID) RESIZE_SECTION; extern Boolean ResizeHandleEvent(EventType * event) RESIZE_SECTION; #else /* */ #define InitializeResizeSupport( x ) #define TerminateResizeSupport() #define SetResizePolicy( x ) #define ResizeHandleFrmOpenEvent() true #define ResizeHandleFrmCloseEvent() true #define ResizeHandleWinDisplayChangedEvent() true #define ResizeHandleWinExitEvent() true #define ResizeHandleWinEnterEvent() true #define LoadResizePrefs( a, b ) #define SaveResizePrefs( a, b, c ) #define ResizeRefreshCurrentForm() #define SetHaveWinDisplayChangedEvent( x ) #define ResizeHandleFrmRedrawUpdateCode() true #define ResizeForm( a ) false #define ResizeHandleEvent( e ) false #endif /* */ #endif /* _ARP_RESIZE_H */ --- NEW FILE: resize.c --- /* $Id: resize.c,v 1.1 2009/11/02 17:29:23 mapibid Exp $ */ /******************************************************************************* Copyright (c) 2004, Alexander R. Pruss All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <PalmOS.h> #include <LstGlue.h> #include "util_dia.h" #include "DIA.h" #ifdef SUPPORT_DIA_HANDERA #include <Vga.h> #endif #ifdef SUPPORT_DIA #define DebugInfo(s) /* { char _tempstring[500];StrPrintF(_tempstring,"%s(%d) ",s,active.formID);\ ClipboardAppendItem(clipboardText,_tempstring,StrLen(_tempstring)); } */ typedef struct { UInt16 formID; FormType *formPtr; UInt16 index; UInt16 flags; DIAFormEntryType *entry; } ResizeTemporaryData; static void UniqueUpdateForm( UInt16 formID, UInt16 code ); static DIAFormEntryType *formList = NULL; static DIAStateType *bins; static UInt16 numBins; static UInt16 formCount = 0; static ResizeTemporaryData active; static Boolean haveWinDisplayChangedEvent = false; RESIZE_SECTION static UInt16 StandardExtent(void) { #ifdef SUPPORT_DIA_HANDERA if (GetDIAHardware() == DIA_HARDWARE_HANDERA) return 240; else #endif return 160; } /* Update form, but only once */ void UniqueUpdateForm(UInt16 formID, UInt16 code) { EventType e; MemSet(&e, sizeof(EventType), 0); e.eType = frmUpdateEvent; e.data.frmUpdate.formID = formID; e.data.frmUpdate.updateCode = code; EvtAddUniqueEventToQueue(&e, 0, true); DebugInfo("Queuing frmUpdateForm"); } /* Same as FrmGetObjectIndex() but works with GSI_OBJECT_ID, too */ RESIZE_SECTION static UInt16 MyFrmGetObjectIndex(FormPtr formPtr, UInt16 id) { UInt16 i; if (id != GSI_OBJECT_ID) return FrmGetObjectIndex(formPtr, id); for (i = FrmGetNumberOfObjects(formPtr) - 1; 0 < i; i--) { if (FrmGetObjectType(formPtr, i) == frmGraffitiStateObj) { return i; } } return 0; } RESIZE_SECTION static void WinGlueGetBounds(WinHandle winH, RectangleType * rect) { Err err; UInt32 version; err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &version); if (err == errNone && 0x04003000 <= version) { WinGetBounds(winH, rect); } else { WinHandle oldH; oldH = WinSetDrawWindow(winH); WinGetDrawWindowBounds(rect); WinSetDrawWindow(oldH); } } RESIZE_SECTION static void SafeFrmGetObjectBounds(const FormType* formPtr, UInt16 objectIndex, RectangleType* rect) { WinHandle oldWin; oldWin = WinSetDrawWindow(FrmGetWindowHandle(formPtr)); FrmGetObjectBounds(formPtr, objectIndex, rect); if (oldWin != NULL) WinSetDrawWindow(oldWin); } RESIZE_SECTION static void SafeFrmSetObjectBounds(FormType* formPtr, UInt16 objectIndex, RectangleType* rect) { WinHandle oldWin; oldWin = WinSetDrawWindow(FrmGetWindowHandle(formPtr)); FrmSetObjectBounds(formPtr, objectIndex, rect); if (oldWin != NULL) WinSetDrawWindow(oldWin); } RESIZE_SECTION static void AddForm(UInt16 indexInList, MemHandle handle, UInt16 formID) { UInt16 numObjects; DIAConfigType *config; formList[indexInList].configHandle = handle; if (handle == NULL) { return; } config = (DIAConfigType *) MemHandleLock(handle); numObjects = ((config->sizeInWords + 1) * sizeof(UInt16) - sizeof(DIAConfigType)) / sizeof(DIAConfigEntryType); formList[indexInList].formID = formID; formList[indexInList].config = config; formList[indexInList].numObjects = numObjects; formList[indexInList].open = false; if (config->flags & DIA_FORM_USE_BIN && numBins < 1 + config->bin) numBins = 1 + config->bin; } /* This sets up the original bounds array as needed */ RESIZE_SECTION static void InitialSetupForm(UInt16 indexInList) { RectangleType *originalBounds; FormType *formPtr; UInt16 numObjects; UInt16 i; numObjects = formList[indexInList].numObjects; if (numObjects == 0) return; if (formList[indexInList].originalBounds != NULL) return; formPtr = FrmGetFormPtr(formList[indexInList].formID); if (formPtr == NULL) return; originalBounds = (RectangleType *) SafeMemPtrNew(numObjects * sizeof(RectangleType)); formList[indexInList].originalBounds = originalBounds; /* * First object is the form itself */ WinGlueGetBounds(FrmGetWindowHandle(formPtr), &(originalBounds[0])); /* * Now on to the other objects */ for (i = 1; i < numObjects; i++) { UInt16 objectIndex; objectIndex = MyFrmGetObjectIndex(formPtr, formList[indexInList].config->objectList[i].objectID); SafeFrmGetObjectBounds(formPtr, objectIndex, &(originalBounds[i])); } } /* Adjust one coordinate */ RESIZE_SECTIO... [truncated message content] |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:24
|
Update of /cvsroot/easycalc/PPCport/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27494 Removed Files: dbutil.h txtask.h Log Message: 1.25b --- dbutil.h DELETED --- --- txtask.h DELETED --- |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:22
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27660 Removed Files: core_tables.h Log Message: 1.25b --- core_tables.h DELETED --- |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:21
|
Update of /cvsroot/easycalc/PPCport/langs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27713 Modified Files: en.rcp fr.rcp Log Message: 1.25b Index: en.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/en.rcp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** en.rcp 25 Oct 2009 17:52:54 -0000 1.4 --- en.rcp 2 Nov 2009 17:33:48 -0000 1.5 *************** *** 64,67 **** --- 64,68 ---- "$$SAVE AS TITLE" = "Save variable as" + "$$SAVE LST AS TITLE" = "Save list as" "$$NAME:" = "Name:" "$$PARAM:" = "Prm:" *************** *** 76,81 **** "$$MODIFY" = "Modify" "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" "$$INSERT" = "Insert" --- 77,84 ---- "$$MODIFY" = "Modify" "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" ! "$$LIST" = "list" ! "$$APPEND" = "Append" "$$INSERT" = "Insert" *************** *** 83,86 **** --- 86,91 ---- "$$VALUE:" = "Value:" "$$REFERENCE1" = "Reference 1" + "$$FIRST LIST ITEM" = "First list item" + "$$LIST ITEM" = "List item" "$$MATRIX EDITOR" = "Matrix Editor" Index: fr.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/fr.rcp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fr.rcp 25 Oct 2009 17:52:54 -0000 1.4 --- fr.rcp 2 Nov 2009 17:33:48 -0000 1.5 *************** *** 71,75 **** **************************************************/ ! "$$SAVE AS TITLE" = "Enregistrer variable sous" "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" --- 71,76 ---- **************************************************/ ! "$$SAVE AS TITLE" = "Enreg. variable sous" ! "$$SAVE LST AS TITLE" = "Enreg. liste sous" "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" *************** *** 84,94 **** "$$MODIFY" = "Modifier" "$$DELETE" = "Suppr." ! "$$FUNCTION" = "fonction" ! "$$VARIABLE" = "variable" "$$INSERT" = "Insérer" "$$LIST EDITOR" = "Éditeur de listes" "$$VALUE:" = "Valeur:" "$$REFERENCE1" = "Résumé 1" "$$MATRIX EDITOR" = "Éditeur de matrices" --- 85,100 ---- "$$MODIFY" = "Modifier" "$$DELETE" = "Suppr." ! "$$FUNCTION" = "fonction" ! "$$VARIABLE" = "variable" ! "$$LIST" = "liste" ! "$$APPEND" = "Ajouter" "$$INSERT" = "Insérer" + "$$LIST EDITOR" = "Éditeur de listes" "$$VALUE:" = "Valeur:" "$$REFERENCE1" = "Résumé 1" + "$$FIRST LIST ITEM" = "Premier élément de liste" + "$$LIST ITEM" = "Elément de liste" "$$MATRIX EDITOR" = "Éditeur de matrices" *************** *** 199,203 **** "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" ! "$$MNGUESSIT" = "Analyse" "$$ENGDISPL" = "EngDisplay" "$$MNDEGREE" = "->Degrés" --- 205,209 ---- "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" ! "$$MNGUESSIT" = "Analyser/deviner" "$$ENGDISPL" = "EngDisplay" "$$MNDEGREE" = "->Degrés" *************** *** 250,254 **** "$$ERRSINGULAR" = "Matrice singulière" /**************************************************/ ! "$$ERRINTERRUPTED" = "Operation interrupted" /**************************************************/ --- 256,260 ---- "$$ERRSINGULAR" = "Matrice singulière" /**************************************************/ ! "$$ERRINTERRUPTED" = "Opération interrompue" /**************************************************/ |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:19
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27845 Modified Files: lang.rcp Log Message: 1.25b Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang.rcp 25 Oct 2009 23:57:36 -0000 1.6 --- lang.rcp 2 Nov 2009 17:34:53 -0000 1.7 *************** *** 929,932 **** --- 929,933 ---- "$$SAVE AS TITLE" = "Save variable as" + "$$SAVE LST AS TITLE" = "Save list as" "$$NAME:" = "Name:" "$$PARAM:" = "Prm:" *************** *** 941,946 **** "$$MODIFY" = "Modify" "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" "$$INSERT" = "Insert" --- 942,949 ---- "$$MODIFY" = "Modify" "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" ! "$$LIST" = "list" ! "$$APPEND" = "Append" "$$INSERT" = "Insert" *************** *** 948,951 **** --- 951,956 ---- "$$VALUE:" = "Value:" "$$REFERENCE1" = "Reference 1" + "$$FIRST LIST ITEM" = "First list item" + "$$LIST ITEM" = "List item" "$$MATRIX EDITOR" = "Matrix Editor" *************** *** 1385,1389 **** **************************************************/ ! "$$SAVE AS TITLE" = "Enregistrer variable sous" "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" --- 1390,1395 ---- **************************************************/ ! "$$SAVE AS TITLE" = "Enreg. variable sous" ! "$$SAVE LST AS TITLE" = "Enreg. liste sous" "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" *************** *** 1398,1408 **** "$$MODIFY" = "Modifier" "$$DELETE" = "Suppr." ! "$$FUNCTION" = "fonction" ! "$$VARIABLE" = "variable" "$$INSERT" = "Insérer" "$$LIST EDITOR" = "Éditeur de listes" "$$VALUE:" = "Valeur:" "$$REFERENCE1" = "Résumé 1" "$$MATRIX EDITOR" = "Éditeur de matrices" --- 1404,1419 ---- "$$MODIFY" = "Modifier" "$$DELETE" = "Suppr." ! "$$FUNCTION" = "fonction" ! "$$VARIABLE" = "variable" ! "$$LIST" = "liste" ! "$$APPEND" = "Ajouter" "$$INSERT" = "Insérer" + "$$LIST EDITOR" = "Éditeur de listes" "$$VALUE:" = "Valeur:" "$$REFERENCE1" = "Résumé 1" + "$$FIRST LIST ITEM" = "Premier élément de liste" + "$$LIST ITEM" = "Elément de liste" "$$MATRIX EDITOR" = "Éditeur de matrices" *************** *** 1564,1568 **** "$$ERRSINGULAR" = "Matrice singulière" /**************************************************/ ! "$$ERRINTERRUPTED" = "Operation interrupted" /**************************************************/ --- 1575,1579 ---- "$$ERRSINGULAR" = "Matrice singulière" /**************************************************/ ! "$$ERRINTERRUPTED" = "Opération interrompue" /**************************************************/ |
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:08
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28045 Modified Files: EasyCalc.cpp EasyCalc.h EasyCalc.layout EasyCalcppc.aps EasyCalcppc.rc resourceppc.h Skin.cpp Skin.h StateManager.cpp StateManager.h Log Message: 1.25b Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EasyCalc.layout 25 Oct 2009 23:58:07 -0000 1.6 --- EasyCalc.layout 2 Nov 2009 17:36:50 -0000 1.7 *************** *** 206,210 **** Key: 30,38 84,97,32,22 89,102,22,12 89,101 Key: 29,60 123,97,32,22 128,102,22,12 128,101 ! Key: 27,106 162,97,32,22 167,102,22,12 167,101 Key: 48,107 201,97,32,22 206,102,22,12 206,101 # 3rd row --- 206,210 ---- Key: 30,38 84,97,32,22 89,102,22,12 89,101 Key: 29,60 123,97,32,22 128,102,22,12 128,101 ! Key: 27,98 162,97,32,22 167,102,22,12 167,101 Key: 48,107 201,97,32,22 206,102,22,12 206,101 # 3rd row Index: EasyCalc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EasyCalc.h 25 Oct 2009 23:58:07 -0000 1.5 --- EasyCalc.h 2 Nov 2009 17:36:50 -0000 1.6 *************** *** 53,63 **** #define BCD_SECT - #define int2 short - #define uint2 unsigned short - #define int4 int - #define uint4 unsigned int - #define uint unsigned int - - #if defined(WINDOWS) && !defined(__GNUC__) #define int8 __int64 --- 53,56 ---- *************** *** 111,116 **** #endif - // Filename, including path, max size. - #define FILENAMELEN 256 // Version of the shell file #define SHELL_VERSION 1 --- 104,107 ---- *************** *** 138,151 **** #define altWriteStateFile 13 #define FrmAlert FrmPopupForm int FrmPopupForm(int formNb, void *hWnd_p); int FrmCustomAlert(int formNb, const TCHAR *s1, const TCHAR *s2, const TCHAR *s3, void *hWnd_p); #ifndef _EASYCALC_C_ #include "compat/Lang.h" ! extern LibLang *libLang; ! extern int g_systUserLangId; // Detected language of the system user #endif - #include "compat/PalmOS.h" #include "core/mlib/konvert.h" void read_state (void); --- 129,154 ---- #define altWriteStateFile 13 #define FrmAlert FrmPopupForm + #define FrmAlertMain(a) FrmPopupForm(a, NULL) int FrmPopupForm(int formNb, void *hWnd_p); int FrmCustomAlert(int formNb, const TCHAR *s1, const TCHAR *s2, const TCHAR *s3, void *hWnd_p); + #include "compat/PalmOS.h" + // Structure for talking with the ask()panel. + typedef struct { + TCHAR *asktxt; + TCHAR *defaultvalue; + TCHAR *answertxt; + } t_asktxt_param; + + Boolean popupAskTxt(t_asktxt_param *param); + #ifndef _EASYCALC_C_ + #include "StateManager.h" #include "compat/Lang.h" ! extern LibLang *libLang; ! extern int g_systUserLangId; // Detected language of the system user ! extern StateManager *stateMgr; #endif #include "core/mlib/konvert.h" void read_state (void); *************** *** 158,160 **** --- 161,168 ---- void ErrFatalDisplayIf(int cond, TCHAR *msg); + void LstEditSetLabel(int listNb, TCHAR *label); + void LstEditSetRow(int rowNb, int value, TCHAR *cell1, TCHAR *cell2, TCHAR *cell3); + void LstEditSetListChoices(int listNb, TCHAR **values, int size); + void LstEditDeselect(void); + #endif Index: EasyCalcppc.aps =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.aps,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsKNZ2es and /tmp/cvs3aWxD2 differ Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EasyCalc.cpp 25 Oct 2009 17:53:49 -0000 1.5 --- EasyCalc.cpp 2 Nov 2009 17:36:50 -0000 1.6 *************** *** 47,50 **** --- 47,53 ---- #include "core/mlib/calcDB.h" #include "core/mlib/history.h" + #include "core/lstedit.h" + #include "core/mlib/funcs.h" + #include "core/mlib/stack.h" *************** *** 55,58 **** [...1851 lines suppressed...] ! } ! return (TRUE); ! ! case WM_APP_ENDFMENU: ! case WM_APP_ENDFCMENU: ! { ! HWND hWnd = GetDlgItem(hDlg, IDC_EDIT2); ! main_insert(cur_skin, hWnd, (TCHAR *) lParam, false, true, false, NULL); ! free((void *) lParam); ! } ! return (TRUE); ! ! case WM_CLOSE: ! EndDialog(hDlg, 0); ! return (TRUE); ! ! default: ! return (DefWindowProc(hDlg, message, wParam, lParam)); } Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Skin.h 25 Oct 2009 17:53:50 -0000 1.7 --- Skin.h 2 Nov 2009 17:36:50 -0000 1.8 *************** *** 23,27 **** #include <windows.h> #include "core/core_globals.h" - //#include "core_display.h" #include "compat/PalmOS.h" #include "defuns.h" --- 23,26 ---- *************** *** 82,87 **** TODEGREE, TORADIAN, - TOGONIO, TOCIS, ENGDISPLAY, TODEGREE2 --- 81,86 ---- TODEGREE, TORADIAN, TOCIS, + TOGONIO, ENGDISPLAY, TODEGREE2 *************** *** 102,105 **** --- 101,107 ---- SkinPoint display_scale; COLORREF display_bg, display_fg; + HFONT hFontBig_display; + HFONT hFontSmall_display; + HFONT hFont_input; SkinKey *keylist; // Array of keys in the skin int nkeys; // Number of keys in the skin *************** *** 129,139 **** bool display_enabled; // Enable or disable screen repaints. TCHAR dispResult[RESULTAREA_SIZE]; // Contains the result area string int result_len; // Length of the result area string (-1 to ask for recalculation of result_size) SIZE result_size; // Result "would-be" size on display without clipping int scroll_result; // DT_LEFT if scrolled left (left align), DT_RIGHT if scrolled right (right align) TCHAR inputText[INPUTAREA_SIZE]; // Used to get the input area string ! int pow_pos; // Current posistion right when writing ! // power text. ! HDC pow_hdc; // Current HDC used for power text. HWND hwndE; // The handle to the edit control input area bool landscape; --- 131,141 ---- bool display_enabled; // Enable or disable screen repaints. TCHAR dispResult[RESULTAREA_SIZE]; // Contains the result area string + TCHAR work_dispResult[RESULTAREA_SIZE]; // Working area for pow results int result_len; // Length of the result area string (-1 to ask for recalculation of result_size) + bool result_pow; // Signals that we are mixing small and big fonts (exponential display) SIZE result_size; // Result "would-be" size on display without clipping int scroll_result; // DT_LEFT if scrolled left (left align), DT_RIGHT if scrolled right (right align) TCHAR inputText[INPUTAREA_SIZE]; // Used to get the input area string ! int pow_pos; // Current position when writing power text. HWND hwndE; // The handle to the edit control input area bool landscape; *************** *** 152,161 **** int load(TCHAR *skinname, const TCHAR *basedir, int width, int height); ! int getchar(); ! void rewind(); int init_image(int type, int ncolors, const SkinColor *colors, int width, int height); void put_pixels(unsigned const char *data); ! void finish_image(); void repaint(HDC hdc, HDC memdc); --- 154,163 ---- int load(TCHAR *skinname, const TCHAR *basedir, int width, int height); ! int getchar(void); ! void rewind(void); int init_image(int type, int ncolors, const SkinColor *colors, int width, int height); void put_pixels(unsigned const char *data); ! void finish_image(void); void repaint(HDC hdc, HDC memdc); *************** *** 168,174 **** void display_blitter(HDC hdc, const char *bits, int bytesperline, int x, int y, int width, int height); ! void repaint_display(HDC hdc, HDC memdc); ! COLORREF getDisplayFgColor(); ! COLORREF getDisplayBgColor(); void create_input_area(HWND hwnd, HINSTANCE hinst); void clipboardAction (void *hwnd, int action); --- 170,176 ---- void display_blitter(HDC hdc, const char *bits, int bytesperline, int x, int y, int width, int height); ! void repaint_result(HDC hdc, HDC memdc); ! COLORREF getDisplayFgColor(void); ! COLORREF getDisplayBgColor(void); void create_input_area(HWND hwnd, HINSTANCE hinst); void clipboardAction (void *hwnd, int action); *************** *** 181,194 **** void insert_input_text(void *hwnd, const TCHAR *text); void set_input_text(void *hwnd, const TCHAR *text); ! TCHAR *get_input_text(); void print_result(void *hWnd_p, TCHAR *res_text); void print_result(HDC hdc); void paint_result(HDC hdc); void scroll_result_left(HWND hWnd); void scroll_result_right(HWND hWnd); ! void print_resultpowInit(void *hdc, TCHAR *res_text); ! void print_resultpowNext(bool smallf, TCHAR *res_piece, int len); ! TCHAR *get_result(); ! void clipCopy_result(); void resultActionsPopup(resSelection choices[], int length, void *hWnd_p); void historyAddActionPopup(TCHAR *description, void *hWnd); --- 183,199 ---- void insert_input_text(void *hwnd, const TCHAR *text); void set_input_text(void *hwnd, const TCHAR *text); ! TCHAR *get_input_text(void); void print_result(void *hWnd_p, TCHAR *res_text); void print_result(HDC hdc); void paint_result(HDC hdc); + void print_resultpow(void *hWnd_p, TCHAR *res_text); + void print_resultpow(HDC hdc); + void paint_resultpow(HDC hdc); + void paint_resultpow_rec(HDC hdc, bool smallf, TCHAR *text); + void paint_result_piece(HDC hdc, bool smallf, TCHAR *res_piece, int len); void scroll_result_left(HWND hWnd); void scroll_result_right(HWND hWnd); ! TCHAR *get_result(void); ! void clipCopy_result(void); void resultActionsPopup(resSelection choices[], int length, void *hWnd_p); void historyAddActionPopup(TCHAR *description, void *hWnd); Index: StateManager.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StateManager.cpp 21 Oct 2009 20:56:50 -0000 1.3 --- StateManager.cpp 2 Nov 2009 17:36:50 -0000 1.4 *************** *** 5,9 **** #include "core/mlib/fp.h" #include "core/mlib/history.h" ! StateManager::StateManager(void) { --- 5,9 ---- #include "core/mlib/fp.h" #include "core/mlib/history.h" ! #include "EasyCalc.h" StateManager::StateManager(void) { *************** *** 16,19 **** --- 16,22 ---- _tcscpy(state.langName, _T("en")); // Language = english by default state.mouse_cont = true; + state.listPrefs.list[0][0] = _T('\0'); + state.listPrefs.list[1][0] = _T('\0'); + state.listPrefs.list[2][0] = _T('\0'); historyDB.in_state = false; Index: EasyCalcppc.rc =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.rc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EasyCalcppc.rc 25 Oct 2009 17:53:50 -0000 1.5 --- EasyCalcppc.rc 2 Nov 2009 17:36:50 -0000 1.6 *************** *** 37,66 **** END ! IDD_VARENTRY DIALOG 0, 0, 115, 55 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Save variable as" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,41,32,14 ! PUSHBUTTON "Cancel",IDCANCEL,73,41,41,14 ! COMBOBOX IDC_VARCOMBO,43,7,71,47,CBS_DROPDOWN | CBS_SORT | CBS_LOWERCASE | WS_VSCROLL | WS_GROUP | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME3,0,7,35,12 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,41,14,14 END ! IDD_EDITVAR DIALOG 0, 0, 160, 85 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit variable" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,70,30,14 ! PUSHBUTTON "V",IDC_VAR,111,70,16,14 ! PUSHBUTTON "F",IDC_USERF,127,70,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME1,0,9,25,8 ! EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP ! EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,70,50,14 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,91,70,14,14 END --- 37,66 ---- END ! IDD_VARENTRY DIALOG 0, 0, 115, 45 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Save var as" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,1,31,32,14 ! PUSHBUTTON "Cancel",IDCANCEL,73,31,41,14 ! LTEXT "Name:",IDC_VARNAME,3,3,35,12 ! COMBOBOX IDC_VARCOMBO,44,1,70,40,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,31,14,14 END ! IDD_EDITVAR DIALOG 0, 0, 160, 81 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit variable" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,66,30,14 ! PUSHBUTTON "V",IDC_VAR,111,66,16,14 ! PUSHBUTTON "F",IDC_USERF,127,66,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,66,16,14 ! LTEXT "Name:",IDC_VARNAME,0,4,25,8,NOT WS_GROUP ! EDITTEXT IDC_EDIT1,32,2,60,14,ES_LOWERCASE | ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,0,19,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,66,50,14 ! CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE,91,66,14,14 END *************** *** 78,97 **** END ! IDD_EDITFCT DIALOG 0, 0, 160, 85 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit function" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,70,30,14 ! PUSHBUTTON "V",IDC_VAR,111,70,16,14 ! PUSHBUTTON "F",IDC_USERF,127,70,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME2,0,9,25,8 ! EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP ! EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,70,50,14 ! LTEXT "Param:",IDC_PARAM,97,9,30,8 ! EDITTEXT IDC_EDIT3,129,7,30,14,ES_AUTOHSCROLL ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,91,70,14,14 END --- 78,97 ---- END ! IDD_EDITFCT DIALOG 0, 0, 160, 81 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit function" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,66,30,14 ! PUSHBUTTON "V",IDC_VAR,111,66,16,14 ! PUSHBUTTON "F",IDC_USERF,127,66,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,66,16,14 ! LTEXT "Name:",IDC_VARNAME,0,4,25,8 ! EDITTEXT IDC_EDIT1,32,2,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP ! EDITTEXT IDC_EDIT2,0,19,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,66,50,14 ! LTEXT "Param:",IDC_PARAM,97,4,30,8 ! EDITTEXT IDC_EDIT3,129,2,30,14,ES_AUTOHSCROLL ! CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE,91,66,14,14 END *************** *** 108,112 **** FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "General",IDC_TITLE1,4,3,63,8 CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,27,83,10 COMBOBOX IDC_LANGUAGE_CB,7,44,78,88,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP --- 108,112 ---- FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "General",IDC_TITLE,4,3,63,8 CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,27,83,10 COMBOBOX IDC_LANGUAGE_CB,7,44,78,88,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP *************** *** 119,123 **** FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Skins",IDC_TITLE2,4,3,63,8 COMBOBOX IDC_COMBO_SKIN1,9,32,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO_SKIN2,9,51,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP --- 119,123 ---- FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Skins",IDC_TITLE,4,3,63,8 COMBOBOX IDC_COMBO_SKIN1,9,32,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO_SKIN2,9,51,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP *************** *** 128,132 **** COMBOBOX IDC_SKINVAL,72,87,21,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Default skin",IDC_SKIN,10,90,58,8 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,121,85,14,14 END --- 128,132 ---- COMBOBOX IDC_SKINVAL,72,87,21,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Default skin",IDC_SKIN,10,90,58,8 ! CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE,121,85,14,14 END *************** *** 136,140 **** FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Preferences",IDC_TITLE3,4,3,149,8 CONTROL "Degree",IDC_DEGREE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,15,40,10 CONTROL "Radian",IDC_RADIAN,"Button",BS_AUTORADIOBUTTON,57,15,39,10 --- 136,140 ---- FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Preferences",IDC_TITLE,4,3,149,8 CONTROL "Degree",IDC_DEGREE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,15,40,10 CONTROL "Radian",IDC_RADIAN,"Button",BS_AUTORADIOBUTTON,57,15,39,10 *************** *** 157,161 **** CONTROL "Insert Help",IDC_INS_HELP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,139,78,10 GROUPBOX "Edit Assistance",IDC_ASSISTGROUP,0,130,160,22 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,145,114,14,14 END --- 157,161 ---- CONTROL "Insert Help",IDC_INS_HELP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,139,78,10 GROUPBOX "Edit Assistance",IDC_ASSISTGROUP,0,130,160,22 ! CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE,145,114,14,14 END *************** *** 173,177 **** FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,12,12,20,20,SS_REALSIZEIMAGE LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 --- 173,177 ---- FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 *************** *** 184,192 **** FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,9,12,21,20,SS_REALSIZEIMAGE LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,49,12,76,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,49,24,66,8 END ///////////////////////////////////////////////////////////////////////////// --- 184,237 ---- FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,9,12,20,20,SS_REALSIZEIMAGE LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,49,12,76,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,49,24,66,8 END + IDD_ASKTXT DIALOG 0, 0, 160, 63 + STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Ask Text" + FONT 8, "MS Shell Dlg" + BEGIN + DEFPUSHBUTTON "OK",IDOK,0,48,30,14 + PUSHBUTTON "V",IDC_VAR,111,48,16,14 + PUSHBUTTON "F",IDC_USERF,127,48,16,14 + PUSHBUTTON "f",IDC_CALCF,143,48,16,14 + EDITTEXT IDC_EDIT2,0,2,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL + PUSHBUTTON "Cancel",IDCANCEL,33,48,50,14 + CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE,91,48,14,14 + END + + IDD_LISTEDIT DIALOG 0, 0, 160, 165 + STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "List Editor" + FONT 8, "MS Shell Dlg" + BEGIN + CONTROL "",IDC_EDITLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,15,158,133 + DEFPUSHBUTTON "OK",IDOK,0,150,30,14 + PUSHBUTTON "Append",IDC_APPEND,33,150,40,14 + PUSHBUTTON "Insert",IDC_INSERT,76,150,40,14 + PUSHBUTTON "Delete",IDC_DELETE,119,150,40,14 + COMBOBOX IDC_COMBO_LIST1,17,1,45,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_LIST2,61,1,45,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_LIST3,105,1,45,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,1,1,14,14 + END + + IDD_VARSTRINGENTRY DIALOG 0, 0, 115, 45 + STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Get value" + FONT 8, "MS Shell Dlg" + BEGIN + DEFPUSHBUTTON "OK",IDOK,1,31,32,14 + PUSHBUTTON "Cancel",IDCANCEL,73,31,41,14 + LTEXT "Value:",IDC_VARNAME,3,3,35,12 + EDITTEXT IDC_EDIT2,43,1,71,14,ES_LOWERCASE | ES_AUTOHSCROLL + PUSHBUTTON "V",IDC_VAR,66,16,16,14 + PUSHBUTTON "F",IDC_USERF,82,16,16,14 + PUSHBUTTON "f",IDC_CALCF,98,16,16,14 + CONTROL "SIP1",IDC_SIP,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,31,14,14 + END + ///////////////////////////////////////////////////////////////////////////// *************** *** 201,205 **** BEGIN RIGHTMARGIN, 114 ! TOPMARGIN, 7 END --- 246,250 ---- BEGIN RIGHTMARGIN, 114 ! TOPMARGIN, 1 END *************** *** 208,212 **** RIGHTMARGIN, 159 TOPMARGIN, 2 ! BOTTOMMARGIN, 84 END --- 253,257 ---- RIGHTMARGIN, 159 TOPMARGIN, 2 ! BOTTOMMARGIN, 80 END *************** *** 223,227 **** RIGHTMARGIN, 159 TOPMARGIN, 2 ! BOTTOMMARGIN, 84 END --- 268,272 ---- RIGHTMARGIN, 159 TOPMARGIN, 2 ! BOTTOMMARGIN, 80 END *************** *** 246,253 **** IDD_ABOUTBOX, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 112 ! TOPMARGIN, 4 ! BOTTOMMARGIN, 95 END --- 291,296 ---- IDD_ABOUTBOX, DIALOG BEGIN ! RIGHTMARGIN, 119 ! BOTTOMMARGIN, 100 END *************** *** 259,262 **** --- 302,326 ---- BOTTOMMARGIN, 77 END + + IDD_ASKTXT, DIALOG + BEGIN + RIGHTMARGIN, 159 + TOPMARGIN, 2 + BOTTOMMARGIN, 62 + END + + IDD_LISTEDIT, DIALOG + BEGIN + LEFTMARGIN, 1 + RIGHTMARGIN, 159 + TOPMARGIN, 1 + BOTTOMMARGIN, 164 + END + + IDD_VARSTRINGENTRY, DIALOG + BEGIN + RIGHTMARGIN, 114 + TOPMARGIN, 1 + END END #endif // APSTUDIO_INVOKED *************** *** 291,294 **** --- 355,360 ---- MENUITEM SEPARATOR MENUITEM "Clear history", IDM_EDIT_CLEARHISTORY + MENUITEM SEPARATOR + MENUITEM "List Editor", IDM_EDIT_LISTEDITOR END POPUP "Help" *************** *** 304,308 **** // ! IDC_EASYCALC ACCELERATORS BEGIN "Q", IDM_FILE_EXIT, VIRTKEY, CONTROL, NOINVERT --- 370,374 ---- // ! IDC_EASYCALC_ACCEL ACCELERATORS BEGIN "Q", IDM_FILE_EXIT, VIRTKEY, CONTROL, NOINVERT Index: StateManager.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StateManager.h 21 Oct 2009 20:56:50 -0000 1.4 --- StateManager.h 2 Nov 2009 17:36:50 -0000 1.5 *************** *** 4,17 **** #define STATE_MANAGER_H 1 - #include "EasyCalc.h" #include "compat/DataManager.h" #include "core/prefs.h" typedef struct { ! TCHAR skinName[3][FILENAMELEN]; ! TCHAR langName[FILENAMELEN]; ! int cur_skin_nb; ! bool mouse_cont; ! tPrefs calcPrefs; } t_state; --- 4,21 ---- #define STATE_MANAGER_H 1 #include "compat/DataManager.h" #include "core/prefs.h" + #include "core/lstedit.h" + + // Filename, including path, max size. + #define FILENAMELEN 256 typedef struct { ! TCHAR skinName[3][FILENAMELEN]; ! TCHAR langName[FILENAMELEN]; ! int cur_skin_nb; ! bool mouse_cont; ! tPrefs calcPrefs; ! tlistPrefs listPrefs; } t_state; Index: resourceppc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/resourceppc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** resourceppc.h 25 Oct 2009 17:53:50 -0000 1.5 --- resourceppc.h 2 Nov 2009 17:36:50 -0000 1.6 *************** *** 5,8 **** --- 5,9 ---- #define IDS_APP_TITLE 1 #define IDC_EASYCALC 2 + #define IDC_EASYCALC_ACCEL 2 #define IDI_EASYCALC 101 #define IDR_MENU 102 *************** *** 22,25 **** --- 23,29 ---- #define IDD_SLIM_MENU 142 #define IDD_OPT_PREFS 145 + #define IDD_ASKTXT 146 + #define IDD_LISTEDIT 147 + #define IDD_VARSTRINGENTRY 148 #define IDC_STATIC_1 201 #define IDC_STATIC_2 202 *************** *** 38,44 **** #define IDC_NEW 1044 #define IDC_MODIFY 1045 - #define IDC_DELETE 1046 - #define IDC_EDIT1 1047 - #define IDC_EDIT2 1048 #define IDC_USERF 1054 #define IDC_CALCF 1055 --- 42,45 ---- *************** *** 70,83 **** #define IDC_INS_HELP 1084 #define IDC_ASSISTGROUP 1085 ! #define IDC_SIP1 1086 ! #define IDC_VARNAME1 1087 ! #define IDC_VARNAME2 1088 ! #define IDC_TITLE3 1089 ! #define IDC_TITLE1 1090 ! #define IDC_VARNAME3 1091 ! #define IDC_TITLE4 1091 ! #define IDC_TITLE2 1092 #define IDC_LANGUAGE_CB 1093 #define IDC_LANGUAGE 1094 #define IDM_EXIT 32774 #define IDM_FILE_EXIT 32777 --- 71,89 ---- #define IDC_INS_HELP 1084 #define IDC_ASSISTGROUP 1085 ! #define IDC_VARNAME 1088 ! #define IDC_TITLE 1090 #define IDC_LANGUAGE_CB 1093 #define IDC_LANGUAGE 1094 + #define IDC_EDIT2 1095 + #define IDC_INSERT 1096 + #define IDC_COMBO_LIST1 1099 + #define IDC_EDITLIST 1101 + #define IDC_COMBO_LIST2 1102 + #define IDC_COMBO_LIST3 1103 + #define IDC_APPEND 1107 + #define IDC_SUBITEMEDIT 1108 + #define IDC_DELETE 1116 + #define IDC_EDIT1 1117 + #define IDC_SIP 1120 #define IDM_EXIT 32774 #define IDM_FILE_EXIT 32777 *************** *** 87,90 **** --- 93,97 ---- #define IDM_FILE_OPTIONS 32786 #define IDM_EDIT_CLIPCOPY 32787 + #define IDM_EDIT_LISTEDITOR 32789 #define IDM_OK 40000 #define IDM_HELP 40001 *************** *** 99,104 **** #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 149 ! #define _APS_NEXT_COMMAND_VALUE 32788 ! #define _APS_NEXT_CONTROL_VALUE 1095 #define _APS_NEXT_SYMED_VALUE 112 #endif --- 106,111 ---- #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 149 ! #define _APS_NEXT_COMMAND_VALUE 32790 ! #define _APS_NEXT_CONTROL_VALUE 1128 #define _APS_NEXT_SYMED_VALUE 112 #endif Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Skin.cpp 25 Oct 2009 17:53:50 -0000 1.7 --- Skin.cpp 2 Nov 2009 17:36:50 -0000 1.8 *************** *** 45,59 **** extern LibLang *libLang; - /**********************************************************/ - /* Linked-in skins; defined in the skins.c, which in turn */ - /* is generated by skin2c.c under control of skin2c.conf */ - /**********************************************************/ - - //extern int skin_count; - //extern const TCHAR *skin_name[]; - //extern long skin_layout_size[]; [...1160 lines suppressed...] *** 1553,1557 **** int i = SendMessage((HWND) hWnd, LVM_INSERTITEM, (WPARAM) 0, (LPARAM) &lvi); - lvi.mask = LVIF_TEXT; lvi.iItem = i; lvi.iSubItem = 1; --- 1735,1738 ---- *************** *** 1563,1567 **** * Enable or disable screen repaints. * ********************************************************************************/ ! void Skin::display_set_enabled(bool enable) { display_enabled = enable; } --- 1744,1748 ---- * Enable or disable screen repaints. * ********************************************************************************/ ! void Skin::display_set_enabled (bool enable) { display_enabled = enable; } |
From: Mapi B. <ma...@us...> - 2009-11-02 17:19:12
|
Update of /cvsroot/easycalc/PPCport/compat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26178 Modified Files: Lang.cpp Log Message: 1.25b Index: Lang.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/Lang.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Lang.cpp 21 Oct 2009 20:54:49 -0000 1.3 --- Lang.cpp 2 Nov 2009 17:18:51 -0000 1.4 *************** *** 30,34 **** wcstombs(localeTmp, locale, 64); ! // This uses the current locale, which I didn't find how to set in Win CE // mbstowcs(_tlocaleInfo, localeInfo, 64);MultiByteToWideChar(); if (MultiByteToWideChar(codePage, MB_PRECOMPOSED, localeTmp, -1, _tlocaleInfo, 64) == 0) { --- 30,34 ---- wcstombs(localeTmp, locale, 64); ! // This uses the current locale, which I didn't find how to set in Win CE. // mbstowcs(_tlocaleInfo, localeInfo, 64);MultiByteToWideChar(); if (MultiByteToWideChar(codePage, MB_PRECOMPOSED, localeTmp, -1, _tlocaleInfo, 64) == 0) { |
From: Mapi B. <ma...@us...> - 2009-11-02 17:06:47
|
Update of /cvsroot/easycalc/PPCport/compat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24692 Modified Files: MathLib.h PalmOS.h Log Message: 1.25b Index: MathLib.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/MathLib.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MathLib.h 17 Oct 2009 13:44:17 -0000 1.2 --- MathLib.h 2 Nov 2009 17:06:35 -0000 1.3 *************** *** 59,63 **** Err MathLibOpen(UInt16 refnum, UInt16 version) // Initialize library for use SYS_TRAP(sysLibTrapOpen); ! Err MathLibClose(UInt16 refnum, UInt16 *usecountP)// Free library resources when finished SYS_TRAP(sysLibTrapClose); Err MathLibSleep(UInt16 refnum) // Called by OS when Pilot sleeps --- 59,63 ---- Err MathLibOpen(UInt16 refnum, UInt16 version) // Initialize library for use SYS_TRAP(sysLibTrapOpen); ! Err MathLibClose(UInt16 refnum, UInt16 *usecountP) // Free library resources when finished SYS_TRAP(sysLibTrapClose); Err MathLibSleep(UInt16 refnum) // Called by OS when Pilot sleeps Index: PalmOS.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/PalmOS.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PalmOS.h 17 Oct 2009 13:44:17 -0000 1.6 --- PalmOS.h 2 Nov 2009 17:06:35 -0000 1.7 *************** *** 21,24 **** --- 21,30 ---- #include <types.h> + #define int2 short + #define uint2 unsigned short + #define int4 int + #define uint4 unsigned int + #define uint unsigned int + #define Int8 INT8 #define UInt8 UINT8 |
From: Mapi B. <ma...@us...> - 2009-11-02 17:05:19
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24544 Modified Files: EasyCalc.vcproj ReadMe.txt Log Message: 1.25b Index: EasyCalc.vcproj =================================================================== RCS file: /cvsroot/easycalc/PPCport/EasyCalc.vcproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** EasyCalc.vcproj 25 Oct 2009 17:51:53 -0000 1.10 --- EasyCalc.vcproj 2 Nov 2009 17:05:08 -0000 1.11 *************** *** 205,210 **** <Configuration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ! IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" --- 205,210 ---- <Configuration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! OutputDirectory="$(PlatformName)\$(ConfigurationName)" ! IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" *************** *** 224,228 **** <Tool Name="VCMIDLTool" ! TargetEnvironment="1" /> <Tool --- 224,228 ---- <Tool Name="VCMIDLTool" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);STANDARDSHELL_UI_MODEL;_DEBUG;DEBUG" /> <Tool *************** *** 231,241 **** Optimization="0" AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL;;SPECFUN_ENABLED;GRAPHS_ENABLED" MinimalRebuild="true" ! RuntimeLibrary="1" ! UsePrecompiledHeader="2" WarningLevel="3" DebugInformationFormat="3" ShowIncludes="true" /> <Tool --- 231,242 ---- Optimization="0" AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;SMARTPHONE2003_UI_MODEL;SMARTPHONE2003_UI_MODEL;SPECFUN_ENABLED;GRAPHS_ENABLED" MinimalRebuild="true" ! UsePrecompiledHeader="1" WarningLevel="3" DebugInformationFormat="3" ShowIncludes="true" + CompileForArchitecture="0" + InterworkCalls="false" /> <Tool *************** *** 244,250 **** <Tool Name="VCResourceCompilerTool" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" ! Culture="1033" ! AdditionalIncludeDirectories="$(IntDir)" /> <Tool --- 245,249 ---- <Tool Name="VCResourceCompilerTool" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);STANDARDSHELL_UI_MODEL;_DEBUG;DEBUG" /> <Tool *************** *** 253,268 **** <Tool Name="VCLinkerTool" ! AdditionalOptions=" /subsystem:windowsce,5.02" OutputFile="$(OutDir)/EasyCalc.exe" LinkIncremental="2" ! DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/EasyCalc.pdb" - SubSystem="0" StackReserveSize="65536" StackCommitSize="4096" ! RandomizedBaseAddress="1" ! DataExecutionPrevention="0" ! TargetMachine="0" /> <Tool --- 252,264 ---- <Tool Name="VCLinkerTool" ! AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB" ! AdditionalDependencies="msvcrtd.lib" OutputFile="$(OutDir)/EasyCalc.exe" LinkIncremental="2" ! AdditionalLibraryDirectories="" GenerateDebugInformation="true" StackReserveSize="65536" StackCommitSize="4096" ! ImportLibrary="" /> <Tool *************** *** 320,324 **** Optimization="2" FavorSizeOrSpeed="2" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL" RuntimeLibrary="0" UsePrecompiledHeader="2" --- 316,321 ---- Optimization="2" FavorSizeOrSpeed="2" ! AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL;SPECFUN_ENABLED;GRAPHS_ENABLED" RuntimeLibrary="0" UsePrecompiledHeader="2" *************** *** 472,476 **** <Configuration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="1" --- 469,473 ---- <Configuration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! OutputDirectory="$(SolutionDir)Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="1" *************** *** 491,495 **** <Tool Name="VCMIDLTool" ! TargetEnvironment="1" /> <Tool --- 488,492 ---- <Tool Name="VCMIDLTool" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);STANDARDSHELL_UI_MODELNDEBUG" /> <Tool *************** *** 498,504 **** Optimization="2" FavorSizeOrSpeed="2" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL" ! RuntimeLibrary="0" ! UsePrecompiledHeader="2" WarningLevel="3" DebugInformationFormat="3" --- 495,502 ---- Optimization="2" FavorSizeOrSpeed="2" ! AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);STANDARDSHELL_UI_MODELNDEBUG;SPECFUN_ENABLED;GRAPHS_ENABLED" ! MinimalRebuild="false" ! UsePrecompiledHeader="1" WarningLevel="3" DebugInformationFormat="3" *************** *** 509,515 **** <Tool Name="VCResourceCompilerTool" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" ! Culture="1033" ! AdditionalIncludeDirectories="$(IntDir)" /> <Tool --- 507,511 ---- <Tool Name="VCResourceCompilerTool" ! PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);STANDARDSHELL_UI_MODELNDEBUG" /> <Tool *************** *** 518,535 **** <Tool Name="VCLinkerTool" ! AdditionalOptions=" /subsystem:windowsce,5.02" ! OutputFile="$(OutDir)/EasyCalc.exe" LinkIncremental="1" - DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/EasyCalc.pdb" - SubSystem="0" StackReserveSize="65536" StackCommitSize="4096" OptimizeReferences="2" EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="0" /> <Tool --- 514,524 ---- <Tool Name="VCLinkerTool" ! AdditionalOptions="/subsystem:windowsce,$(CEVER) /machine:$(ARCHFAM)" LinkIncremental="1" GenerateDebugInformation="true" StackReserveSize="65536" StackCommitSize="4096" OptimizeReferences="2" EnableCOMDATFolding="2" /> <Tool *************** *** 608,619 **** </FileConfiguration> <FileConfiguration - Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1" - /> - </FileConfiguration> - <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" > --- 597,600 ---- *************** *** 631,642 **** /> </FileConfiguration> - <FileConfiguration - Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1" - /> - </FileConfiguration> </File> </Filter> --- 612,615 ---- *************** *** 673,676 **** --- 646,653 ---- </File> <File + RelativePath=".\core\lstedit.cpp" + > + </File> + <File RelativePath=".\core\Main.cpp" > *************** *** 763,766 **** --- 740,747 ---- > </File> + <File + RelativePath=".\core\mlib\txtask.cpp" + > + </File> </Filter> </Filter> *************** *** 812,827 **** </File> <Filter - Name="include" - > - <File - RelativePath=".\include\dbutil.h" - > - </File> - <File - RelativePath=".\include\txtask.h" - > - </File> - </Filter> - <Filter Name="system - UI" > --- 793,796 ---- *************** *** 859,862 **** --- 828,835 ---- </File> <File + RelativePath=".\compat\dbutil.h" + > + </File> + <File RelativePath=".\compat\FloatManager.h" > *************** *** 919,922 **** --- 892,899 ---- </File> <File + RelativePath=".\core\lstedit.h" + > + </File> + <File RelativePath=".\core\Main.h" > *************** *** 1001,1004 **** --- 978,985 ---- > </File> + <File + RelativePath=".\core\mlib\txtask.h" + > + </File> </Filter> </Filter> Index: ReadMe.txt =================================================================== RCS file: /cvsroot/easycalc/PPCport/ReadMe.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ReadMe.txt 25 Oct 2009 22:59:05 -0000 1.4 --- ReadMe.txt 2 Nov 2009 17:05:08 -0000 1.5 *************** *** 21,26 **** ! This is v1.25a PPC. Differences with legacy Palm EasyCalc: ! ---------------------------------------------------------- - Fully skinable: one can create new skins (.gif and .layout files) to customize EasyCalc look as they want, including redesigning buttons --- 21,43 ---- ! Releases: ! --------- ! * 1.25b PPC: ! - Display bugs on togonio() and torad() fixed. ! - Display of text with power exponents can now be scrolled. ! - Improved lifecycle of some graphical objects to fight a tendancy of ! the application to "disappear" when coming back from power suspend ! mode ... from time to time. ! - Simplified some of the code imported from Free42 interface. ! - Implemented ask() function. ! - Full list support, with list editor added. ! - Set selection of text and default focus to edit boxes in dialogs ! for ease of use. ! * 1.25a PPC: ! - initial PPC port release ! ! ! Functional differences between 1.25b PPC and legacy Palm EasyCalc 1.25: ! ----------------------------------------------------------------------- - Fully skinable: one can create new skins (.gif and .layout files) to customize EasyCalc look as they want, including redesigning buttons *************** *** 79,82 **** --- 96,116 ---- selected, it is put between brackets instead of being overwritten. + - ask() panel has the classical V, F and f buttons to enter text (no button + in the legacy Palm app, just an input text area). + + - The history popup does not align differently (left or right) text coming + from results or input areas. Windows doesn't allow that in standard list + boxes, items must be all the same. + + - Added an Append button in addition to Insert, to add an items at end of + list in the List Editor. + + - In List Editor, New list, Append and Insert now loop on getting values, + in order to ease user task when entering new lists, or when growing them. + Press Cancel to end the loop. + + + Bugs: + ----- - Report bugs at: http://sourceforge.net/projects/easycalc/forums/forum/41375 |
From: Mapi B. <ma...@us...> - 2009-10-25 23:58:33
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27850 Modified Files: EasyCalc.gif EasyCalc.h EasyCalc.layout EasyCalcppc.aps Log Message: no message Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EasyCalc.layout 25 Oct 2009 17:53:50 -0000 1.5 --- EasyCalc.layout 25 Oct 2009 23:58:07 -0000 1.6 *************** *** 207,211 **** Key: 29,60 123,97,32,22 128,102,22,12 128,101 Key: 27,106 162,97,32,22 167,102,22,12 167,101 ! Key: 47,107 201,97,32,22 206,102,22,12 206,101 # 3rd row # D E F 1/x atan --- 207,211 ---- Key: 29,60 123,97,32,22 128,102,22,12 128,101 Key: 27,106 162,97,32,22 167,102,22,12 167,101 ! Key: 48,107 201,97,32,22 206,102,22,12 206,101 # 3rd row # D E F 1/x atan Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsjFgkRV and /tmp/cvsG7WG7I differ Index: EasyCalc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EasyCalc.h 21 Oct 2009 20:56:12 -0000 1.4 --- EasyCalc.h 25 Oct 2009 23:58:07 -0000 1.5 *************** *** 1,4 **** #pragma once ! #ifdef POCKETPC2003_UI_MODEL #include "resourceppc.h" #endif --- 1,4 ---- #pragma once ! #if defined(POCKETPC2003_UI_MODEL) || defined(STANDARDSHELL_UI_MODEL) || defined (SMARTPHONE2003_UI_MODEL) #include "resourceppc.h" #endif Index: EasyCalcppc.aps =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.aps,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsTdE7oU and /tmp/cvsCa56GH differ |
From: Mapi B. <ma...@us...> - 2009-10-25 23:57:45
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27812 Modified Files: lang.rcp Log Message: no message Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang.rcp 25 Oct 2009 17:53:23 -0000 1.5 --- lang.rcp 25 Oct 2009 23:57:36 -0000 1.6 *************** *** 1513,1517 **** "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" ! "$$MNGUESSIT" = "Analyse" "$$ENGDISPL" = "EngDisplay" "$$MNDEGREE" = "->Degrés" --- 1513,1517 ---- "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" ! "$$MNGUESSIT" = "Analyser/deviner" "$$ENGDISPL" = "EngDisplay" "$$MNDEGREE" = "->Degrés" |
From: Mapi B. <ma...@us...> - 2009-10-25 22:59:16
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23662 Modified Files: ReadMe.txt Log Message: no message Index: ReadMe.txt =================================================================== RCS file: /cvsroot/easycalc/PPCport/ReadMe.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReadMe.txt 25 Oct 2009 17:51:55 -0000 1.3 --- ReadMe.txt 25 Oct 2009 22:59:05 -0000 1.4 *************** *** 3,8 **** ======================================================================== ! Differences with legacy Palm EasyCalc: ! -------------------------------------- - Fully skinable: one can create new skins (.gif and .layout files) to customize EasyCalc look as they want, including redesigning buttons --- 3,26 ---- ======================================================================== ! Installation & run instructions: ! -------------------------------- ! - Pick the WM5 or WM6 zip file as appropriate for your PDA or Touch Phone. ! ! - From the zip file: copy on a PC, unzip, and copy contents to a directory ! in your PDA / touch phone through the explorer, when your PDA / touch ! phone is in its craddle or connected to the PC. ! You can start the explorer window from ActiveSync (under XP) or ! from the Windows Mobile Device Center (under Vista). ! Or directly in a standard Explorer window, and expand the "Mobile ! Device" subtree. ! ! - To run the application, in your PDA or Touch Phone, use the File explorer, ! go to the directory where you installed it, click on EasyCalc(.exe). ! ! - A .cab will come later ... ! ! ! This is v1.25a PPC. Differences with legacy Palm EasyCalc: ! ---------------------------------------------------------- - Fully skinable: one can create new skins (.gif and .layout files) to customize EasyCalc look as they want, including redesigning buttons *************** *** 61,63 **** --- 79,86 ---- selected, it is put between brackets instead of being overwritten. + - Report bugs at: + http://sourceforge.net/projects/easycalc/forums/forum/41375 + or + http://sourceforge.net/tracker/?group_id=13138&atid=113138 + Mapi. \ No newline at end of file |
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29694 Modified Files: EasyCalc.cpp EasyCalc.gif EasyCalc.layout EasyCalcppc.aps EasyCalcppc.rc resourceppc.h Skin.cpp Skin.h Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: EasyCalcppc.aps =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.aps,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsFt8VnF and /tmp/cvsoMKnwS differ Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EasyCalc.cpp 21 Oct 2009 20:56:12 -0000 1.4 --- EasyCalc.cpp 25 Oct 2009 17:53:49 -0000 1.5 *************** *** 45,48 **** --- 45,50 ---- #include "core/mlib/fp.h" #include "core/ansops.h" + #include "core/mlib/calcDB.h" + #include "core/mlib/history.h" *************** *** 56,59 **** --- 58,62 ---- #define WM_APP_ENDFMENU (WM_APP+2) #define WM_APP_ENDFCMENU (WM_APP+3) + #define WM_APP_EXEBUTTON (WM_APP+4) *************** *** 206,209 **** --- 209,218 ---- break; + case WM_CHAR: + if (wParam == 13) { // Enter pressed on keyboard, or ok button on PDA / Phone + SendMessage(pCEdit2->parentWnd, WM_APP_EXEBUTTON, (WPARAM) 0, (LPARAM) builtinFctPopup_name); + return (0); + } + break; } return (CallWindowProc(CEdit_fnWndProc, hWnd, Msg, wParam, lParam)); *************** *** 331,338 **** mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$EXIT")); // Force "const" off rc = SetMenuItemInfo(hmmb_sub, IDM_FILE_EXIT, FALSE, &mii); - hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, (LPARAM) IDM_EDIT); mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$OPTIONS")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_OPTIONS, FALSE, &mii); ! hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, (LPARAM) IDM_HELP); mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$ABOUT...")); // Force "const" off rc = SetMenuItemInfo(hmmb_sub, IDM_HELP_ABOUT, FALSE, &mii); --- 340,357 ---- mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$EXIT")); // Force "const" off rc = SetMenuItemInfo(hmmb_sub, IDM_FILE_EXIT, FALSE, &mii); mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$OPTIONS")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_FILE_OPTIONS, FALSE, &mii); ! hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, ! (LPARAM) IDM_EDIT); ! mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$COPY")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_CLIPCOPY, FALSE, &mii); ! mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$CUT")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_CLIPCUT, FALSE, &mii); ! mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$PASTE")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_CLIPPASTE, FALSE, &mii); ! mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$CLEAR HISTORY")); // Force "const" off ! rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_CLEARHISTORY, FALSE, &mii); ! hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, ! (LPARAM) IDM_HELP); mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$ABOUT...")); // Force "const" off rc = SetMenuItemInfo(hmmb_sub, IDM_HELP_ABOUT, FALSE, &mii); *************** *** 340,343 **** --- 359,394 ---- // rc = DrawMenuBar(g_hWndMenuBar); + // Prepare options panels + #define DEF_NUM_OF_PAGES 3 + propPages = new PROPSHEETPAGE[DEF_NUM_OF_PAGES]; + memset(propPages, 0, sizeof(PROPSHEETPAGE) * DEF_NUM_OF_PAGES); + + propPages[0].dwSize = sizeof(PROPSHEETPAGE); + propPages[0].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[0].pszTemplate = MAKEINTRESOURCE(IDD_OPT_GENERAL); + propPages[0].pfnDlgProc = (DLGPROC)WndOptionsGen; + propPages[0].hInstance = g_hInst; + propPages[0].pszIcon = NULL; + propPages[0].pszTitle = libLang->translate(_T("$$GENERAL")); + propPages[0].lParam = (LPARAM) NULL; + + propPages[1].dwSize = sizeof(PROPSHEETPAGE); + propPages[1].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[1].pszTemplate = MAKEINTRESOURCE(IDD_OPT_SKINS); + propPages[1].pfnDlgProc = (DLGPROC)WndOptionsSkins; + propPages[1].hInstance = g_hInst; + propPages[1].pszIcon = NULL; + propPages[1].pszTitle = libLang->translate(_T("$$SKINS")); + propPages[1].lParam = (LPARAM) NULL; + + propPages[2].dwSize = sizeof(PROPSHEETPAGE); + propPages[2].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[2].pszTemplate = MAKEINTRESOURCE(IDD_OPT_PREFS); + propPages[2].pfnDlgProc = (DLGPROC)WndOptionsCalcPrefs; + propPages[2].hInstance = g_hInst; + propPages[2].pszIcon = NULL; + propPages[2].pszTitle = libLang->translate(_T("$$PREFERENCES TITLE")); + propPages[2].lParam = (LPARAM) NULL; + // Set skin cur_skin = loaded_skins + state->cur_skin_nb; *************** *** 378,413 **** ann_state[ANN_S1 + state->cur_skin_nb] = true; - // Prepare options panels - #define DEF_NUM_OF_PAGES 3 - propPages = new PROPSHEETPAGE[DEF_NUM_OF_PAGES]; - memset(propPages, 0, sizeof(PROPSHEETPAGE) * DEF_NUM_OF_PAGES); - - propPages[0].dwSize = sizeof(PROPSHEETPAGE); - propPages[0].dwFlags = PSP_DEFAULT | PSP_USETITLE; - propPages[0].pszTemplate = MAKEINTRESOURCE(IDD_OPT_GENERAL); - propPages[0].pfnDlgProc = (DLGPROC)WndOptionsGen; - propPages[0].hInstance = g_hInst; - propPages[0].pszIcon = NULL; - propPages[0].pszTitle = libLang->translate(_T("$$GENERAL")); - propPages[0].lParam = (LPARAM) NULL; - - propPages[1].dwSize = sizeof(PROPSHEETPAGE); - propPages[1].dwFlags = PSP_DEFAULT | PSP_USETITLE; - propPages[1].pszTemplate = MAKEINTRESOURCE(IDD_OPT_SKINS); - propPages[1].pfnDlgProc = (DLGPROC)WndOptionsSkins; - propPages[1].hInstance = g_hInst; - propPages[1].pszIcon = NULL; - propPages[1].pszTitle = libLang->translate(_T("$$SKINS")); - propPages[1].lParam = (LPARAM) NULL; - - propPages[2].dwSize = sizeof(PROPSHEETPAGE); - propPages[2].dwFlags = PSP_DEFAULT | PSP_USETITLE; - propPages[2].pszTemplate = MAKEINTRESOURCE(IDD_OPT_PREFS); - propPages[2].pfnDlgProc = (DLGPROC)WndOptionsCalcPrefs; - propPages[2].hInstance = g_hInst; - propPages[2].pszIcon = NULL; - propPages[2].pszTitle = libLang->translate(_T("$$PREFERENCES TITLE")); - propPages[2].lParam = (LPARAM) NULL; - // Prepare the painting brush for the input area Edit control editBgBrush = CreateSolidBrush(cur_skin->getDisplayBgColor()); --- 429,432 ---- *************** *** 645,650 **** if (timer != 0) { ! KillTimer(NULL, timer); ! timer = 0; } --- 664,669 ---- if (timer != 0) { ! KillTimer(NULL, timer); ! timer = 0; } *************** *** 1168,1175 **** // Parse the menu selections: switch (wmId) { ! case IDM_HELP_ABOUT: ! DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, WndAbout); ! break; ! case IDM_EDIT_OPTIONS: PROPSHEETHEADER psh; psh.dwSize = sizeof(PROPSHEETHEADER); --- 1187,1191 ---- // Parse the menu selections: switch (wmId) { ! case IDM_FILE_OPTIONS: PROPSHEETHEADER psh; psh.dwSize = sizeof(PROPSHEETHEADER); *************** *** 1200,1203 **** --- 1216,1234 ---- break; #endif // WIN32_PLATFORM_PSPC + case IDM_EDIT_CLIPCOPY: + cur_skin->clipboardAction(NULL, WM_COPY); + break; + case IDM_EDIT_CLIPCUT: + cur_skin->clipboardAction(NULL, WM_CUT); + break; + case IDM_EDIT_CLIPPASTE: + cur_skin->clipboardAction(NULL, WM_PASTE); + break; + case IDM_EDIT_CLEARHISTORY: + history_shrink(0); + break; + case IDM_HELP_ABOUT: + DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, WndAbout); + break; default: return (DefWindowProc(hWnd, message, wParam, lParam)); *************** *** 1314,1484 **** break; - case WM_KEYDOWN: - case WM_CHAR: - case WM_SYSKEYDOWN: - case WM_SYSCHAR: { - static int virtKey = 0; - int keyChar; - if ((lParam & (1 << 30)) != 0) - // Auto-repeat event; ignore. - break; - if (message == WM_KEYDOWN || message == WM_SYSKEYDOWN) { - keyChar = 0; - virtKey = (int) wParam; - } else - keyChar = (int) wParam; - just_pressed_shift = false; - if (virtKey == 17) { - ctrl_down = true; - goto do_default; - } else if (virtKey == 18) { - alt_down = true; - goto do_default; - } else if (virtKey == 16) { - shift_down = true; - just_pressed_shift = true; - goto do_default; - } - if ((message == WM_KEYDOWN || message == WM_SYSKEYDOWN) - && !ctrl_down - && (virtKey == 8 // Backspace - || virtKey == 9 // Tab - || virtKey == 13 // Enter - || (virtKey == 27 && !shift_down) // Escape - || virtKey == 32 // Space - || (virtKey >= 48 && virtKey < 112) - || (virtKey >= 0xB0 && virtKey < 0xF0))) - // Keystrokes that will be followed by a WM_CHAR - // message; we defer handling them until then. - break; - - if (ckey == KEY_NONE || !mouse_key) { - int i; - bool printable = keyChar >= 32 && keyChar <= 126; - if (ckey != KEY_NONE) { - shell_keyup(true, hWnd); - active_keycode = 0; - } - if (printable && core_alpha_menu()) { - if (keyChar >= _T('a') && keyChar <= _T('z')) - keyChar = keyChar + _T('A') - _T('a'); - else if (keyChar >= _T('A') && keyChar <= _T('Z')) - keyChar = keyChar + _T('a') - _T('A'); - ckey = 1024 + keyChar; - skey = -1; - macro = NULL; - shell_keydown(); - mouse_key = false; - active_keycode = virtKey; - break; - } else if (core_hex_menu() && ((keyChar >= _T('a') && keyChar <= _T('f')) - || (keyChar >= _T('A') && keyChar <= _T('F')))) { - if (keyChar >= _T('a') && keyChar <= _T('f')) - ckey = keyChar - _T('a') + 1; - else - ckey = keyChar - _T('A') + 1; - skey = -1; - macro = NULL; - shell_keydown(); - mouse_key = false; - active_keycode = virtKey; - break; - } - - bool exact; - bool cshift_down = (ann_state[ANN_SHIFT] != 0); - unsigned char *key_macro = cur_skin->keymap_lookup(virtKey, ctrl_down, alt_down, shift_down, cshift_down, &exact); - if (key_macro == NULL || !exact) { - for (i = 0; i < keymap_length; i++) { - keymap_entry *entry = keymap + i; - if (ctrl_down == entry->ctrl - && alt_down == entry->alt - && shift_down == entry->shift - && virtKey == entry->keycode) { - if (cshift_down == entry->cshift) { - key_macro = entry->macro; - break; - } else { - if (key_macro == NULL) - key_macro = entry->macro; - } - } - } - } - if (key_macro != NULL) { - // A keymap entry is a sequence of zero or more calculator - // keystrokes (1..NB_KEYS) and/or macros (NB_KEYS+1..255). We expand - // macros here before invoking shell_keydown(). - // If the keymap entry is one key, or two keys with the - // first being 'shift', we highlight the key in question - // by setting ckey; otherwise, we set ckey to -10, which - // means no skin key will be highlighted. - ckey = -10; - skey = -1; - if (key_macro[0] != 0) - if (key_macro[1] == 0) - ckey = key_macro[0]; - else if (key_macro[2] == 0 && key_macro[0] == 28) - ckey = key_macro[1]; - bool needs_expansion = false; - for (int j = 0; key_macro[j] != 0; j++) - if (key_macro[j] > NB_KEYS) { - needs_expansion = true; - break; - } - if (needs_expansion) { - static unsigned char macrobuf[1024]; - int p = 0; - for (int j = 0; key_macro[j] != 0 && p < 1023; j++) { - int c = key_macro[j]; - if (c <= NB_KEYS) - macrobuf[p++] = c; - else { - unsigned char *m = cur_skin->find_macro(c); - if (m != NULL) - while (*m != 0 && p < 1023) - macrobuf[p++] = *m++; - } - } - macrobuf[p] = 0; - macro = macrobuf; - } else - macro = key_macro; - shell_keydown(); - mouse_key = false; - active_keycode = virtKey; - break; - } - } - goto do_default; - } - - case WM_KEYUP: - case WM_SYSKEYUP: { - int virtKey = (int) wParam; - if (virtKey == 17) { - ctrl_down = false; - goto do_default; - } else if (virtKey == 18) { - alt_down = false; - goto do_default; - } else if (virtKey == 16) { - shift_down = false; - if (ckey == KEY_NONE && just_pressed_shift) { - ckey = 28; - skey = 1; - macro = NULL; - shell_keydown(); - shell_keyup(true, hWnd); - } - goto do_default; - } - if (ckey != KEY_NONE && !mouse_key && virtKey == active_keycode) { - shell_keyup(true, hWnd); - active_keycode = 0; - } - goto do_default; - } - case WM_APP_ENDVMENU: cur_skin->insert_input_text(NULL, (TCHAR *) lParam); --- 1345,1348 ---- *************** *** 1493,1496 **** --- 1357,1369 ---- break; + case WM_APP_EXEBUTTON: // User pressed the enter key or the OK button PDA / Phone + { + ckey = KEY_EXE; + int repeat; + running = core_keydown(ckey, &enqueued, &repeat); + running = core_keyup(cur_skin, g_hWnd); + } + break; + case WM_DESTROY: #ifdef SHELL_AYGSHELL *************** *** 1511,1515 **** case WM_CTLCOLOREDIT: {// Notification sent by an Edit control // when about to be drawn = the input area. ! // Use that modify the drawing colors. // Note that this message is sent each time the control is repainted, // not just the first time, and all this needs to b done each time !! --- 1384,1388 ---- case WM_CTLCOLOREDIT: {// Notification sent by an Edit control // when about to be drawn = the input area. ! // Use that to modify drawing colors. // Note that this message is sent each time the control is repainted, // not just the first time, and all this needs to b done each time !! *************** *** 1526,1530 **** default: ! do_default: return (DefWindowProc(hWnd, message, wParam, lParam)); } --- 1399,1403 ---- default: ! // do_default: return (DefWindowProc(hWnd, message, wParam, lParam)); } *************** *** 1533,1766 **** } - // case keyDownEvent: - // formid = FrmGetActiveFormID(); - // if (TxtGlueCharIsValid(event->data.keyDown.chr) && - // TxtGlueCharIsCntrl(event->data.keyDown.chr) && - // event->data.keyDown.chr != chrBackspace && - // event->data.keyDown.chr != chrDelete && - // event->data.keyDown.chr != pageUpChr && - // event->data.keyDown.chr != pageDownChr) { - // /* Swallow control chars except Backspace, Delete and page up/down */ - // handled = true; - // } else if (event->data.keyDown.chr=='\n') { - // main_input_exec(); - // handled=true; - // } else if (event->data.keyDown.chr==')' || event->data.keyDown.chr=='(') { - // calc_nil_timeout(0); - // BrH=2; - // } else if (formid == frmScientific - // && event->data.keyDown.chr == pageDownChr) { - // lst = GetObjectPtr(lstMainBtnRow); - // calcPrefs.btnRow++; - // if (calcPrefs.btnRow >= LstGetNumberOfItems(lst)) - // calcPrefs.btnRow = 0; - // main_btnrow_set(calcPrefs.btnRow); - // handled = true; - // } else if (formid == frmScientific - // && event->data.keyDown.chr == pageUpChr) { - // lst = GetObjectPtr(lstMainBtnRow); - // if (calcPrefs.btnRow == 0) - // calcPrefs.btnRow = LstGetNumberOfItems(lst) - 1; - // else - // calcPrefs.btnRow--; - // main_btnrow_set(calcPrefs.btnRow); - // handled = true; - // } - // break; - // case frmCloseEvent: - // formid=event->data.frmClose.formID; - // - // field = GetObjectPtr(tdInput); - // calcPrefs.insertPos = FldGetInsPtPosition(field); - // FldGetSelection(field, &calcPrefs.selPosStart, - // &calcPrefs.selPosEnd); - // if (FldGetTextPtr(field)) - // StrCopy(calcPrefs.input,FldGetTextPtr(field)); - // - // handled=false; /* This is important - let the - // * FrmHandleEvent handle this - // * itself */ - // break; - // case ctlRepeatEvent: - // frm = FrmGetActiveForm(); - // controlID=event->data.ctlSelect.controlID; - // switch (controlID) { - // case btnMainBksp: - // //EvtEnqueueKey(chrLeftArrow,0,0); - // field = GetObjectPtr(tdInput); - // insptr = FldGetInsPtPosition(field); - // FldSetSelection(field,insptr,insptr); - // FldSetInsPtPosition(field,insptr-1); - // /* Make sure cursor is on. Needed in PalmOS > 5.4.0 */ - // FrmSetFocus(frm, FrmGetObjectIndex(frm, tdInput)); - // handled = false; - // break; - // case btnMainFwsp: - // //EvtEnqueueKey(chrRightArrow,0,0); - // field = GetObjectPtr(tdInput); - // insptr = FldGetInsPtPosition(field); - // if (insptr == FldGetTextLength(field)) { - // FldSetSelection(field,insptr,insptr); - // FldSetInsPtPosition(field,0); - // handled = false; - // break; - // } - // else - // FldSetSelection(field,insptr,insptr); - // FldSetInsPtPosition(field,insptr+1); - // /* Make sure cursor is on. Needed in PalmOS > 5.4.0 */ - // FrmSetFocus(frm, FrmGetObjectIndex(frm, tdInput)); - // handled = false; - // break; - // } - // break; - // case ctlSelectEvent: - // controlID=event->data.ctlSelect.controlID; - // - // if (chooseForm(controlID)) { - // handled=true; - // break; - // } - // - // handled=true; - // switch (controlID) { - // case varFuncListButton: - // case varBuiltinListButton: - // if (controlID == varFuncListButton) - // text = varmgr_popup(function); - // else - // text = varmgr_popup_builtin(); - // if (text) { - // main_insert(tdInput,text,false,true,false,NULL); - // MemPtrFree(text); - // } - // break; - // case varListButton: - // if (controlID==varListButton) - // text = varmgr_popup(variable); - // else - // text = history_popup(); - // if (text) { - // field = GetObjectPtr(tdInput); - // FldInsert(field, text, StrLen(text)); - // MemPtrFree(text); - // } - // break; - // case btnMainSel: - // LstSetSelection(GetObjectPtr(lstMainBtnRow), calcPrefs.btnRow); - // i = LstPopupList(GetObjectPtr(lstMainBtnRow)); - // if (i != noListSelection && i != calcPrefs.btnRow) { - // calcPrefs.btnRow = i; - // main_btnrow_set(i); - // } - // break; - // default: - // if(calcPrefs.matchParenth) { - // handled=false; - // break; - // } - // case btnMainClBr: - // BrH=2; - // calc_nil_timeout(0); - // handled=false; - // break; - // } - // - // if (main_btnrow_click(controlID)) - // handled = true; - // - // if (handled) - // break; - // - // /* If we are in Octal mode and user tries to use decimal - // * keys, warn him. This is the most frequent problem - // * I got and this should solve it. - // */ - // if (dispPrefs.base == disp_octal && - // (controlID == btnMain8 || controlID == btnMain9)) { - // FrmCustomAlert(altOctalMode,_T("Octal"),NULL,NULL); - // handled = true; - // break; - // } - // else if (dispPrefs.base == disp_binary && - // controlID >= btnMain2 && controlID <=btnMain9) { - // FrmCustomAlert(altOctalMode,_T("Binary"),NULL,NULL); - // handled = true; - // break; - // } - // - // for (i=0;buttonString[i].id;i++) - // if (buttonString[i].id == controlID) { - // main_insert(tdInput,buttonString[i].string,buttonString[i].operatr, - // buttonString[i].func,buttonString[i].nostartparen,NULL); - // FrmSetFocus(FrmGetActiveForm(), - // FrmGetObjectIndex(FrmGetActiveForm(), - // tdInput)); - // handled=true; - // break; - // } - // break; - // case menuEvent: - // case mitClearHistory: - // history_shrink(0); - // handled = true; - // break; - // break; - // case fldEnterEvent: - // if(event->data.fldEnter.fieldID==tdInput){ - // BrH=2; - // calc_nil_timeout(0); - // } - // break; - // case nilEvent: - // if(BrH==2){ - // UInt16 j,k=1,end; - // TCHAR char1,char2; - // - // field=GetObjectPtr(tdInput); - // FldGetSelection(field,&start,&end); - // - // if(start!=end || end==0){ - // goto exit; - // } - // - // j=start-1; - // text = FldGetTextPtr(field); - // if(text[j]==')'){ - // char1=')'; char2='('; - // i=-1; end=0; - // }else if(text[j]=='('){ - // char1='('; char2=')'; - // i=1; end=StrLen(text); - // }else{ - // goto exit; - // } - // - // while(j!=end && k){ - // j+=i; - // if(text[j]==char1) k++; - // else if(text[j]==char2) k--; - // } - // - // if(k) goto exit; - // else{ - // FldSetSelection(field,j,j+1); - // calc_nil_timeout(40); - // BrH=1; - // } - // } - // else if(BrH==1) - // { - // FldSetSelection(GetObjectPtr(tdInput),start,start); - // exit: - // calc_nil_timeout(evtWaitForever); - // BrH=0; - // } - // handled=true; - // break; - // } - // - // return handled; - /******************************************************************************** * FUNCTION: WndAbout(HWND, UINT, WPARAM, LPARAM) * --- 1406,1409 ---- *************** *** 1903,1913 **** case CBN_CLOSEUP: int cur_sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); - dispPrefs.mode = ((cur_sel == 0) - ? disp_normal - : ((cur_sel == 1) - ? disp_sci - : disp_eng - ) - ); // Set chosen language, and tell WndProc to modify menus // and propSheets accordingly. --- 1546,1549 ---- *************** *** 2031,2034 **** --- 1667,1682 ---- /******************************************************************************** + * Function + ********************************************************************************/ + void addPrecValues(HWND hWnd, int maxPrec) { + TCHAR text[10]; + + for (int i=0 ; i<=maxPrec ; i++) { + _stprintf(text, _T("%d"), i); + SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) text); + } + } + + /******************************************************************************** * FUNCTION: WndOptionsCalcPrefs(HWND, UINT, WPARAM, LPARAM) * * Message handler for the Calculation Preferences page of Options. * *************** *** 2086,2093 **** SetWindowText(GetDlgItem(hDlg, IDC_CALCGROUP), libLang->translate(_T("$$CALCULATIONS"))); hWnd = GetDlgItem(hDlg, IDC_TRUNCPREC); ! SetWindowText(hWnd, libLang->translate(_T("$$REDUCE PRECISION"))); if (calcPrefs.reducePrecision) { SendMessage(hWnd, BM_SETCHECK, (WPARAM) BST_CHECKED, (LPARAM) 0); } hWnd = GetDlgItem(hDlg, IDC_INTEGERS); SetWindowText(hWnd, libLang->translate(_T("$$FORCE INTEGER"))); --- 1734,1747 ---- SetWindowText(GetDlgItem(hDlg, IDC_CALCGROUP), libLang->translate(_T("$$CALCULATIONS"))); hWnd = GetDlgItem(hDlg, IDC_TRUNCPREC); ! TCHAR text1[40], text2[10]; ! _tcscpy(text1, libLang->translate(_T("$$REDUCE PRECISION"))); ! _stprintf(text2, _T(" (%d)"), ROUND_OFFSET); ! _tcscat(text1, text2); ! SetWindowText(hWnd, text1); if (calcPrefs.reducePrecision) { SendMessage(hWnd, BM_SETCHECK, (WPARAM) BST_CHECKED, (LPARAM) 0); } + // Enable the option if not in force integer, else disable it + EnableWindow (hWnd, !dispPrefs.forceInteger); hWnd = GetDlgItem(hDlg, IDC_INTEGERS); SetWindowText(hWnd, libLang->translate(_T("$$FORCE INTEGER"))); *************** *** 2111,2131 **** SetWindowText(GetDlgItem(hDlg, IDC_PRECISION), libLang->translate(_T("$$PRECISION"))); hWnd = GetDlgItem(hDlg, IDC_PRECVAL); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("0")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("1")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("2")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("3")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("4")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("5")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("6")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("7")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("8")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("9")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("10")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("11")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("12")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("13")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("14")); ! SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) _T("15")); SendMessage(hWnd, CB_SETCURSEL, (WPARAM) dispPrefs.decPoints, (LPARAM) 0); SetWindowText(GetDlgItem(hDlg, IDC_FORMATGROUP), libLang->translate(_T("$$FORMAT NUMBERS"))); hWnd = GetDlgItem(hDlg, IDC_STRIP_0); --- 1765,1775 ---- SetWindowText(GetDlgItem(hDlg, IDC_PRECISION), libLang->translate(_T("$$PRECISION"))); hWnd = GetDlgItem(hDlg, IDC_PRECVAL); ! addPrecValues(hWnd, (calcPrefs.reducePrecision ? ROUND_OFFSET : 15)); ! if (calcPrefs.reducePrecision && (dispPrefs.decPoints > ROUND_OFFSET)) { ! dispPrefs.decPoints = ROUND_OFFSET; ! } SendMessage(hWnd, CB_SETCURSEL, (WPARAM) dispPrefs.decPoints, (LPARAM) 0); + // Enable the option if not in force integer, else disable it + EnableWindow (hWnd, !dispPrefs.forceInteger); SetWindowText(GetDlgItem(hDlg, IDC_FORMATGROUP), libLang->translate(_T("$$FORMAT NUMBERS"))); hWnd = GetDlgItem(hDlg, IDC_STRIP_0); *************** *** 2134,2137 **** --- 1778,1783 ---- SendMessage(hWnd, BM_SETCHECK, (WPARAM) BST_CHECKED, (LPARAM) 0); } + // Enable the option if not in force integer, else disable it + EnableWindow (hWnd, !dispPrefs.forceInteger); hWnd = GetDlgItem(hDlg, IDC_SHOW_UNITS); SetWindowText(hWnd, libLang->translate(_T("$$SHOW UNITS"))); *************** *** 2139,2143 **** SendMessage(hWnd, BM_SETCHECK, (WPARAM) BST_CHECKED, (LPARAM) 0); } ! // Enable the option, else disable it EnableWindow (hWnd, (dispPrefs.mode == disp_eng)); hWnd = GetDlgItem(hDlg, IDC_OS_NUMPREFS); --- 1785,1789 ---- SendMessage(hWnd, BM_SETCHECK, (WPARAM) BST_CHECKED, (LPARAM) 0); } ! // Enable the option if in Engineer mode, else disable it EnableWindow (hWnd, (dispPrefs.mode == disp_eng)); hWnd = GetDlgItem(hDlg, IDC_OS_NUMPREFS); *************** *** 2165,2168 **** --- 1811,1815 ---- NMHDR* pnmh = (NMHDR*)lParam; if (pnmh->code == PSN_APPLY) { + fp_set_prefs(dispPrefs); return (TRUE); } *************** *** 2252,2255 **** --- 1899,1910 ---- int sel = (int) SendMessage(hWnd, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0); calcPrefs.reducePrecision = (sel == BST_CHECKED); + // Modify contents of PRECVAL according to this option + HWND hWnd_tmp = GetDlgItem(hDlg, IDC_PRECVAL); + SendMessage(hWnd_tmp, CB_RESETCONTENT, (WPARAM) 0, (LPARAM) 0); + addPrecValues(hWnd_tmp, (calcPrefs.reducePrecision ? ROUND_OFFSET : 15)); + if (calcPrefs.reducePrecision && (dispPrefs.decPoints > ROUND_OFFSET)) { + dispPrefs.decPoints = ROUND_OFFSET; + } + SendMessage(hWnd_tmp, CB_SETCURSEL, (WPARAM) dispPrefs.decPoints, (LPARAM) 0); res = TRUE; break; *************** *** 2262,2265 **** --- 1917,1927 ---- dispPrefs.forceInteger = (sel == BST_CHECKED); res = TRUE; + // Enable / disable precision options depending on the value + HWND hWnd_tmp = GetDlgItem(hDlg, IDC_TRUNCPREC); + EnableWindow (hWnd_tmp, !dispPrefs.forceInteger); + hWnd_tmp = GetDlgItem(hDlg, IDC_PRECVAL); + EnableWindow (hWnd_tmp, !dispPrefs.forceInteger); + hWnd_tmp = GetDlgItem(hDlg, IDC_STRIP_0); + EnableWindow (hWnd_tmp, !dispPrefs.forceInteger); break; } *************** *** 2305,2309 **** switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); dispPrefs.cvtUnits = (sel == BST_CHECKED); res = TRUE; --- 1967,1971 ---- switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0); dispPrefs.cvtUnits = (sel == BST_CHECKED); res = TRUE; *************** *** 2314,2318 **** switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); calcPrefs.acceptOSPref = (sel == BST_CHECKED); res = TRUE; --- 1976,1980 ---- switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0); calcPrefs.acceptOSPref = (sel == BST_CHECKED); res = TRUE; *************** *** 2323,2327 **** switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); calcPrefs.matchParenth = (sel == BST_CHECKED); res = TRUE; --- 1985,1989 ---- switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0); calcPrefs.matchParenth = (sel == BST_CHECKED); res = TRUE; *************** *** 2332,2336 **** switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); calcPrefs.insertHelp = (sel == BST_CHECKED); res = TRUE; --- 1994,1998 ---- switch (notify_msg) { case BN_CLICKED: ! int sel = (int) SendMessage(hWnd, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0); calcPrefs.insertHelp = (sel == BST_CHECKED); res = TRUE; *************** *** 2547,2552 **** SendMessage(hLst, WM_GETTEXT, (WPARAM) siz, (LPARAM) text); // Then call the action ! varmgr_listVar_action(text, g_hWnd, true, (cur_sel != CB_ERR)); ! EndDialog(hDlg, 1); res = TRUE; } --- 2209,2214 ---- SendMessage(hLst, WM_GETTEXT, (WPARAM) siz, (LPARAM) text); // Then call the action ! if (varmgr_listVar_action(text, g_hWnd, true, (cur_sel != CB_ERR))) ! EndDialog(hDlg, 1); res = TRUE; } Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Skin.h 21 Oct 2009 20:56:50 -0000 1.6 --- Skin.h 25 Oct 2009 17:53:50 -0000 1.7 *************** *** 172,175 **** --- 172,176 ---- COLORREF getDisplayBgColor(); void create_input_area(HWND hwnd, HINSTANCE hinst); + void clipboardAction (void *hwnd, int action); void select_input_text(void *hwnd); void select_input_text(void *hwnd, unsigned long start, unsigned long end); Index: EasyCalcppc.rc =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EasyCalcppc.rc 21 Oct 2009 20:56:25 -0000 1.4 --- EasyCalcppc.rc 25 Oct 2009 17:53:50 -0000 1.5 *************** *** 281,289 **** POPUP "File" BEGIN MENUITEM "Exit", IDM_FILE_EXIT END POPUP "Edit" BEGIN ! MENUITEM "Options", IDM_EDIT_OPTIONS END POPUP "Help" --- 281,294 ---- POPUP "File" BEGIN + MENUITEM "Options", IDM_FILE_OPTIONS MENUITEM "Exit", IDM_FILE_EXIT END POPUP "Edit" BEGIN ! MENUITEM "Copy", IDM_EDIT_CLIPCOPY ! MENUITEM "Cut", IDM_EDIT_CLIPCUT ! MENUITEM "Paste", IDM_EDIT_CLIPPASTE ! MENUITEM SEPARATOR ! MENUITEM "Clear history", IDM_EDIT_CLEARHISTORY END POPUP "Help" Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EasyCalc.layout 21 Oct 2009 20:56:25 -0000 1.4 --- EasyCalc.layout 25 Oct 2009 17:53:50 -0000 1.5 *************** *** 4,10 **** Skin: 0,0,240,268 # Description of the display area: x1,y1 xscale yscale fg_color bg_color ! # With xscale = 0, screen width is 217 dots (only value used for now). # Do not touch yscale either for now. ! Display: 9,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) --- 4,10 ---- Skin: 0,0,240,268 # Description of the display area: x1,y1 xscale yscale fg_color bg_color ! # With xscale = 0, screen width is 216 dots (only value used for now). # Do not touch yscale either for now. ! Display: 10,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) *************** *** 17,22 **** Annunciator: 7 134,6,13,7 100,268 100,275 # Binary indicator Annunciator: 8 150,6,16,7 112,268 112,275 # Hexadecimal indicator ! Annunciator: 9 4,16,5,7 155,268 155,275 # Result scroll left indicator ! Annunciator: 10 227,16,5,7 159,268 159,275 # Result scroll right indicator Annunciator: 11 205,6,6,7 0,268 0,275 # Skin 1 indicator Annunciator: 12 212,6,6,7 5,268 5,275 # Skin 2 indicator --- 17,22 ---- Annunciator: 7 134,6,13,7 100,268 100,275 # Binary indicator Annunciator: 8 150,6,16,7 112,268 112,275 # Hexadecimal indicator ! Annunciator: 9 4,16,6,7 155,268 155,275 # Result scroll left indicator ! Annunciator: 10 227,16,6,7 160,268 160,275 # Result scroll right indicator Annunciator: 11 205,6,6,7 0,268 0,275 # Skin 1 indicator Annunciator: 12 212,6,6,7 5,268 5,275 # Skin 2 indicator *************** *** 35,39 **** # -4 -> dot // decimal dot # -3 -> EXE // run evaluation ! # -2 -> bckspc // back space # -1 -> clr // clear input and result fields # 0 -> 0,"0" --- 35,39 ---- # -4 -> dot // decimal dot # -3 -> EXE // run evaluation ! # -2 -> bckspc // back space. Note: if accessed through shift, will leave shift on to be able to do several in a row # -1 -> clr // clear input and result fields # 0 -> 0,"0" *************** *** 83,220 **** # 44 -> Angle,"angle" # 45 -> complex_i,"i" ! # 46 -> Coln,":" ! # 47 -> ClBr,")" ! # 48 -> EE,"E" ! # 49 -> asin ! # 50 -> acos ! # 51 -> atan ! # 52 -> sinh ! # 53 -> cosh ! # 54 -> tanh ! # 55 -> asinh ! # 56 -> acosh ! # 57 -> atanh ! # 58 -> log ! # 59 -> 10^ ! # 60 -> log2 ! # 61 -> 2^ ! # 62 -> fact ! # 63 -> ncr ! # 64 -> npr ! # 65 -> round ! # 66 -> trunc ! # 67 -> floor ! # 68 -> gamma ! # 69 -> beta ! # 70 -> rand ! # 71 -> rNorm ! # 72 -> real ! # 73 -> imag ! # 74 -> conj ! # 75 -> exp(i* ! # 76 -> fzero ! # 77 -> fvalue ! # 78 -> fmin ! # 79 -> fmax ! # 80 -> fd_dx // d/dx ! # 81 -> fromberg // integ ! # 82 -> fd2_dx // d2/dx ! # 83 -> ()=" ! # 84 -> " ! # 85 -> x ! # 86 -> list ! # 87 -> median ! # 88 -> mean ! # 89 -> sum ! # 90 -> lmin // min ! # 91 -> lmax // max ! # 92 -> prod ! # 93 -> variance ! # 94 -> stddev ! # 95 -> dim ! # 96 -> [ ! # 97 -> matrix ! # 98 -> identity ! # 99 -> det ! # 100 -> qrs ! # 101 -> rref ! # 102 -> qrq ! # 103 -> qrr ! # 104 -> [ // x[] ! # 105 -> ] ! # 106 -> qBinomial ! # 107 -> qBeta ! # 108 -> qChiSq ! # 109 -> qF ! # 110 -> qPoisson ! # 111 -> qStudentt ! # 112 -> qWeibull ! # 113 -> qNormal ! # 114 -> range ! # 115 -> rNorm ! # 116 -> find ! # 117 -> sample ! # 118 -> filter ! # 119 -> conv ! # 120 -> fft ! # 121 -> ifft ! # 122 -> prevprime ! # 123 -> isprime ! # 124 -> nextprime ! # 125 -> gcd ! # 126 -> lcm ! # 127 -> phi ! # 128 -> gcdex ! # 129 -> chinese ! # 130 -> modinv ! # 131 -> modpow ! # 132 -> factor ! # 133 -> besseli ! # 134 -> besselj ! # 135 -> besselk ! # 136 -> bessely ! # 137 -> ellc1 ! # 138 -> ellc2 ! # 139 -> elli1 ! # 140 -> elli2 ! # 141 -> euler ! # 142 -> cn ! # 143 -> dn ! # 144 -> sn ! # 145 -> igamma ! # 146 -> ibeta ! # 147 -> erf ! # 148 -> erfc # key: -5,-5 6,70,32,22 11,75,22,12 11,74 ! key: 34 45,70,32,22 50,75,22,12 50,74 ! key: 33 84,70,32,22 89,75,22,12 89,74 ! Key: 28 123,70,32,22 128,75,22,12 128,74 ! Key: -2 162,70,32,22 167,75,22,12 167,74 ! Key: -1 201,70,32,22 206,75,22,12 206,74 ! Key: 48 6,97,32,22 11,102,22,12 11,101 ! Key: 31 45,97,32,22 50,102,22,12 50,101 ! Key: 30 84,97,32,22 89,102,22,12 89,101 ! Key: 29 123,97,32,22 128,102,22,12 128,101 ! Key: 27 162,97,32,22 167,102,22,12 167,101 ! Key: 47 201,97,32,22 206,102,22,12 206,101 ! Key: 7 6,127,40,29 11,132,30,19 11,131 ! Key: 8 53,127,40,29 58,132,30,19 58,131 ! Key: 9 101,127,40,29 106,132,30,19 106,131 ! Key: 25 148,127,40,29 153,132,30,19 153,131 ! Key: 35 196,127,40,29 201,132,30,19 201,131 ! Key: 4 6,163,40,29 11,168,30,19 11,167 ! Key: 5 53,163,40,29 58,168,30,19 58,167 ! Key: 6 101,163,40,29 106,168,30,19 106,167 ! Key: 24 148,163,40,29 153,168,30,19 153,167 ! Key: 26 196,163,40,29 201,168,30,19 201,167 ! Key: 1 6,199,40,29 11,204,30,19 11,203 ! Key: 2 53,199,40,29 58,204,30,19 58,203 ! Key: 3 101,199,40,29 106,204,30,19 106,203 Key: 22 148,199,40,29 153,204,30,19 153,203 ! Key: 36 196,199,40,29 201,204,30,19 201,203 ! Key: 0 6,236,40,29 11,241,30,19 11,240 ! Key: 23 53,236,40,29 58,241,30,19 58,240 ! Key: -4 101,236,40,29 106,241,30,19 106,240 Key: 21 148,236,40,29 153,241,30,19 153,240 Key: -3 196,236,40,29 201,241,30,19 201,240 --- 83,245 ---- # 44 -> Angle,"angle" # 45 -> complex_i,"i" ! # 46 -> e,"e" ! # 47 -> Coln,":" ! # 48 -> ClBr,")" ! # 49 -> EE,"E" ! # 50 -> asin ! # 51 -> acos ! # 52 -> atan ! # 53 -> sinh ! # 54 -> cosh ! # 55 -> tanh ! # 56 -> asinh ! # 57 -> acosh ! # 58 -> atanh ! # 59 -> log ! # 60 -> 10^ ! # 61 -> log2 ! # 62 -> 2^ ! # 63 -> fact ! # 64 -> ncr ! # 65 -> npr ! # 66 -> round ! # 67 -> trunc ! # 68 -> ceil ! # 69 -> floor ! # 70 -> gamma ! # 71 -> beta ! # 72 -> rand ! # 73 -> rNorm ! # 74 -> real ! # 75 -> imag ! # 76 -> conj ! # 77 -> exp(i* ! # 78 -> fzero ! # 79 -> fvalue ! # 80 -> fmin ! # 81 -> fmax ! # 82 -> fd_dx // d/dx ! # 83 -> fromberg // integ ! # 84 -> fd2_dx // d2/dx ! # 85 -> ()=" ! # 86 -> " ! # 87 -> x ! # 88 -> list ! # 89 -> median ! # 90 -> mean ! # 91 -> sum ! # 92 -> lmin // min ! # 93 -> lmax // max ! # 94 -> prod ! # 95 -> variance ! # 96 -> stddev ! # 97 -> dim ! # 98 -> [ ! # 99 -> matrix ! # 100 -> identity ! # 101 -> det ! # 102 -> qrs ! # 103 -> rref ! # 104 -> qrq ! # 105 -> qrr ! # 106 -> [ // x[] ! # 107 -> ] ! # 108 -> qBinomial ! # 109 -> qBeta ! # 110 -> qChiSq ! # 111 -> qF ! # 112 -> qPoisson ! # 113 -> qStudentt ! # 114 -> qWeibull ! # 115 -> qNormal ! # 116 -> range ! # 117 -> rNorm ! # 118 -> find ! # 119 -> sample ! # 120 -> filter ! # 121 -> conv ! # 122 -> fft ! # 123 -> ifft ! # 124 -> prevprime ! # 125 -> isprime ! # 126 -> nextprime ! # 127 -> gcd ! # 128 -> lcm ! # 129 -> phi ! # 130 -> gcdex ! # 131 -> chinese ! # 132 -> modinv ! # 133 -> modpow ! # 134 -> factor ! # 135 -> besseli ! # 136 -> besselj ! # 137 -> besselk ! # 138 -> bessely ! # 139 -> ellc1 ! # 140 -> ellc2 ! # 141 -> elli1 ! # 142 -> elli2 ! # 143 -> euler ! # 144 -> cn ! # 145 -> dn ! # 146 -> sn ! # 147 -> igamma ! # 148 -> ibeta ! # 149 -> erf ! # 150 -> erfc ! # 151 -> Inf // Infinity constant # + # 1st row + # shift sqr x_pow_y abs z_conj CLR + # shift sqrt sqrt_yth real imag bckspc key: -5,-5 6,70,32,22 11,75,22,12 11,74 ! key: 34,33 45,70,32,22 50,75,22,12 50,74 ! key: 32,28 84,70,32,22 89,75,22,12 89,74 ! Key: 74,43 123,70,32,22 128,75,22,12 128,74 ! Key: 75,76 162,70,32,22 167,75,22,12 167,74 ! Key: -2,-1 201,70,32,22 206,75,22,12 206,74 ! # 2nd row ! # e^(ix) 2^x e^x 10^x [ ] ! # EE log2 ln log ( ) ! Key: 48,77 6,97,32,22 11,102,22,12 11,101 ! Key: 61,62 45,97,32,22 50,102,22,12 50,101 ! Key: 30,38 84,97,32,22 89,102,22,12 89,101 ! Key: 29,60 123,97,32,22 128,102,22,12 128,101 ! Key: 27,106 162,97,32,22 167,102,22,12 167,101 ! Key: 47,107 201,97,32,22 206,102,22,12 206,101 ! # 3rd row ! # D E F 1/x atan ! # 7 8 9 / tan ! Key: 7,13 6,127,40,29 11,132,30,19 11,131 ! Key: 8,14 53,127,40,29 58,132,30,19 58,131 ! Key: 9,15 101,127,40,29 106,132,30,19 106,131 ! Key: 25,31 148,127,40,29 153,132,30,19 153,131 ! Key: 37,52 201,124,32,22 206,129,22,12 206,128 ! # 3.5 row ! # asin ! # sin ! Key: 35,50 201,149,32,22 206,154,22,12 206,153 ! # 4th row ! # A B C acos ! # 4 5 6 x cos ! Key: 4,10 6,163,40,29 11,168,30,19 11,167 ! Key: 5,11 53,163,40,29 58,168,30,19 58,167 ! Key: 6,12 101,163,40,29 106,168,30,19 106,167 ! Key: 24 148,163,40,29 153,168,30,19 153,167 ! Key: 36,51 201,174,32,22 201,179,22,12 201,178 ! # 5th row ! # i e pi ! # 1 2 3 - ANS ! Key: 1,45 6,199,40,29 11,204,30,19 11,203 ! Key: 2,46 53,199,40,29 58,204,30,19 58,203 ! Key: 3,40 101,199,40,29 106,204,30,19 106,203 Key: 22 148,199,40,29 153,204,30,19 153,203 ! Key: 26 196,199,40,29 201,204,30,19 201,203 ! # 6th row ! # +Inf x : ! # 0 -/+ . + = ! Key: 0,151 6,236,40,29 11,241,30,19 11,240 ! Key: 23,87 53,236,40,29 58,241,30,19 58,240 ! Key: -4,47 101,236,40,29 106,241,30,19 106,240 Key: 21 148,236,40,29 153,241,30,19 153,240 Key: -3 196,236,40,29 201,241,30,19 201,240 Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsA6AoEH and /tmp/cvsyUkpSU differ Index: resourceppc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/resourceppc.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** resourceppc.h 21 Oct 2009 20:56:36 -0000 1.4 --- resourceppc.h 25 Oct 2009 17:53:50 -0000 1.5 *************** *** 80,89 **** #define IDC_LANGUAGE_CB 1093 #define IDC_LANGUAGE 1094 - #define ID_TEST_TEST 32771 - #define ID_EDIT_CANCEL 32772 #define IDM_EXIT 32774 - #define IDM_OPTIONS 32775 - #define IDM_EDIT_OPTIONS 32776 #define IDM_FILE_EXIT 32777 #define IDM_OK 40000 #define IDM_HELP 40001 --- 80,90 ---- #define IDC_LANGUAGE_CB 1093 #define IDC_LANGUAGE 1094 #define IDM_EXIT 32774 #define IDM_FILE_EXIT 32777 + #define IDM_EDIT_CLEARHISTORY 32782 + #define IDM_EDIT_CLIPCUT 32784 + #define IDM_EDIT_CLIPPASTE 32785 + #define IDM_FILE_OPTIONS 32786 + #define IDM_EDIT_CLIPCOPY 32787 #define IDM_OK 40000 #define IDM_HELP 40001 *************** *** 98,102 **** #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 149 ! #define _APS_NEXT_COMMAND_VALUE 32778 #define _APS_NEXT_CONTROL_VALUE 1095 #define _APS_NEXT_SYMED_VALUE 112 --- 99,103 ---- #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 149 ! #define _APS_NEXT_COMMAND_VALUE 32788 #define _APS_NEXT_CONTROL_VALUE 1095 #define _APS_NEXT_SYMED_VALUE 112 Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Skin.cpp 21 Oct 2009 20:56:50 -0000 1.6 --- Skin.cpp 25 Oct 2009 17:53:50 -0000 1.7 *************** *** 463,467 **** if (display_scale.x == 0) ! landscape = false; this->close(); --- 463,467 ---- if (display_scale.x == 0) ! landscape = false; this->close(); *************** *** 528,532 **** } else { if (display_scale.x == 0) ! display_w = 217; else display_w = 131 * display_scale.x; --- 528,532 ---- } else { if (display_scale.x == 0) ! display_w = 216; else display_w = 131 * display_scale.x; *************** *** 1134,1140 **** void Skin::create_input_area(HWND hWnd_p, HINSTANCE hinst) { DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_LEFT; ! hwndE = CreateWindow(_T("EDIT2"), NULL, dwStyle, ! display_loc.x, display_loc.y + 18, display_w, 30, ! hWnd_p, NULL, hinst, NULL); Edit_SetExtendedStyle(hwndE, 0xFFFFFFFF, Edit_GetExtendedStyle(hwndE) | ES_EX_FOCUSBORDERDISABLED); --- 1134,1146 ---- void Skin::create_input_area(HWND hWnd_p, HINSTANCE hinst) { DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_LEFT; ! if (hwndE != NULL) { ! BOOL res = MoveWindow(hwndE, ! display_loc.x, display_loc.y + 18, display_w, 30, ! TRUE); ! } else { ! hwndE = CreateWindow(_T("EDIT2"), NULL, dwStyle, ! display_loc.x, display_loc.y + 18, display_w, 30, ! hWnd_p, NULL, hinst, NULL); ! } Edit_SetExtendedStyle(hwndE, 0xFFFFFFFF, Edit_GetExtendedStyle(hwndE) | ES_EX_FOCUSBORDERDISABLED); *************** *** 1160,1163 **** --- 1166,1183 ---- /******************************************************************************** + * OS specific: interaction between the Edit Control passed as parameter and * + * clipboard. * + * If parameter is NULL, this is the input area Edit Control. * + * action is one of WM_OPY, WM_CU, WM_PASTE. * + ********************************************************************************/ + void Skin::clipboardAction (void *hwnd, int action) { + HWND hwnd_edit = (HWND) hwnd; + if (hwnd_edit == NULL) + hwnd_edit = hwndE; + long res = SendMessage (hwnd_edit, action, (WPARAM) 0, (LPARAM) -1); + res = SendMessage (hwnd_edit, EM_SCROLLCARET, (WPARAM) 0, (LPARAM) 0); + } + + /******************************************************************************** * OS specific: selects all the text in the Edit Control passed as parameter. * * If parameter is NULL, this is the input area Edit Control. * |
From: Mapi B. <ma...@us...> - 2009-10-25 17:53:40
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29578 Modified Files: lang.rcp Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang.rcp 21 Oct 2009 20:55:47 -0000 1.4 --- lang.rcp 25 Oct 2009 17:53:23 -0000 1.5 *************** *** 1052,1056 **** "$$USER" = "User" ! "$$MNCOPY" = "Copy" "$$MNSAVE AS" = "Save as" "$$MNDATAMGR" = "DataMgr" --- 1052,1056 ---- "$$USER" = "User" ! "$$MNCOPY" = "Copy result" "$$MNSAVE AS" = "Save as" "$$MNDATAMGR" = "DataMgr" *************** *** 1510,1514 **** "$$USER" = "Utilisateur" ! "$$MNCOPY" = "Copier" "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" --- 1510,1514 ---- "$$USER" = "Utilisateur" ! "$$MNCOPY" = "Copier résultat" "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" |
From: Mapi B. <ma...@us...> - 2009-10-25 17:53:02
|
Update of /cvsroot/easycalc/PPCport/langs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29429 Modified Files: en.rcp fr.rcp Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: en.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/en.rcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** en.rcp 21 Oct 2009 20:55:27 -0000 1.3 --- en.rcp 25 Oct 2009 17:52:54 -0000 1.4 *************** *** 187,191 **** "$$USER" = "User" ! "$$MNCOPY" = "Copy" "$$MNSAVE AS" = "Save as" "$$MNDATAMGR" = "DataMgr" --- 187,191 ---- "$$USER" = "User" ! "$$MNCOPY" = "Copy result" "$$MNSAVE AS" = "Save as" "$$MNDATAMGR" = "DataMgr" Index: fr.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/fr.rcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fr.rcp 21 Oct 2009 20:55:27 -0000 1.3 --- fr.rcp 25 Oct 2009 17:52:54 -0000 1.4 *************** *** 196,200 **** "$$USER" = "Utilisateur" ! "$$MNCOPY" = "Copier" "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" --- 196,200 ---- "$$USER" = "Utilisateur" ! "$$MNCOPY" = "Copier résultat" "$$MNSAVE AS" = "Enregistrer sous" "$$MNDATAMGR" = "Données" |
From: Mapi B. <ma...@us...> - 2009-10-25 17:52:46
|
Update of /cvsroot/easycalc/PPCport/core/mlib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29338 Modified Files: complex.cpp fp.cpp funcs.cpp funcs.h Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: funcs.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/funcs.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** funcs.cpp 17 Oct 2009 13:48:34 -0000 1.5 --- funcs.cpp 25 Oct 2009 17:52:34 -0000 1.6 *************** *** 145,148 **** --- 145,161 ---- } + // Mapi: added Infinity + static CError inf_func(Trpn *rpn,double val) PARSER; + static CError + inf_func(Trpn *rpn,double val) + { + double x = 0.0; + + rpn->type=real; + rpn->u.realval=1.0/x; + rpn->allocsize = 0; + return c_noerror; + } + static CError rand_func(Trpn *rpn,double val) PARSER; static CError *************** *** 185,188 **** --- 198,202 ---- {_T("i"),i_func}, {_T("j"),i_func}, + {_T("Inf"),inf_func}, {_T("T"),dnum_func,1E12}, {_T("G"),dnum_func,1E9}, Index: funcs.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/funcs.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** funcs.h 17 Oct 2009 13:48:34 -0000 1.4 --- funcs.h 25 Oct 2009 17:52:34 -0000 1.5 *************** *** 43,47 **** #define MAX_RECURS 10 /* When the 'real' argument is zero */ ! #define IS_ZERO(x) (fabs(x)<1E-6) #define FUNC_EMPTY 0 --- 43,48 ---- #define MAX_RECURS 10 /* When the 'real' argument is zero */ ! //#define IS_ZERO(x) (fabs(x)<1E-6) ! #define IS_ZERO(x) (FlpIsZero1(x)) #define FUNC_EMPTY 0 Index: fp.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/fp.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fp.cpp 17 Oct 2009 13:48:34 -0000 1.4 --- fp.cpp 25 Oct 2009 17:52:34 -0000 1.5 *************** *** 314,321 **** * ***********************************************************************/ ! void fp_print_double(TCHAR *strP,double value) PARSER; ! void ! fp_print_double(TCHAR *strP, double value) ! { Int16 ex; TCHAR tmpstr[MAX_FP_NUMBER*2]; --- 314,319 ---- * ***********************************************************************/ ! void fp_print_double (TCHAR *strP,double value) PARSER; ! void fp_print_double (TCHAR *strP, double value) { Int16 ex; TCHAR tmpstr[MAX_FP_NUMBER*2]; *************** *** 354,359 **** Int16 mydec = dispPrefs.decPoints - 1; /* Engineer mode selected */ ! for (ex=0;fabs(value)<0.99999999 || (ex % 3);ex++,value*=BASE) ! ; if (fabs(value) >= 100.0) --- 352,363 ---- Int16 mydec = dispPrefs.decPoints - 1; /* Engineer mode selected */ ! // This loops at infinity when value = 0.0 ! //for (ex=0;fabs(value)<0.99999999 || (ex % 3);ex++,value*=BASE) ! ex = 0; ! if (!FlpIsZero(value)) ! while ((fabs(value ) < 0.999999999999999) || (ex % 3)) { ! ex++; ! value *= BASE; ! } if (fabs(value) >= 100.0) Index: complex.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/complex.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** complex.cpp 17 Oct 2009 13:48:34 -0000 1.1 --- complex.cpp 25 Oct 2009 17:52:34 -0000 1.2 *************** *** 120,124 **** * z = xe^(iy) * z^w = (xe^(iy))^w = x^w*e^(iyw) = ! * = e^(w*ln(x))*e^(iyw) = w^(w*(ln(x)+yi)) * * PARAMETERS: 2 complex numbers --- 120,124 ---- * z = xe^(iy) * z^w = (xe^(iy))^w = x^w*e^(iyw) = ! * = e^(w*ln(x))*e^(iyw) = e^(w*(ln(x)+yi)) * * PARAMETERS: 2 complex numbers *************** *** 135,148 **** Complex tmp,result; ! gtmp=cplx_to_gon(base); ! tmp.real = log(gtmp.r); ! tmp.imag = gtmp.angle; ! tmp = cplx_multiply(expon,tmp); ! result.real = exp(tmp.real) * cos(tmp.imag); ! result.imag = exp(tmp.real) * sin(tmp.imag); ! return result; } --- 135,208 ---- Complex tmp,result; ! // If expon is integral and is within some bounds, use another computation method ! // which will be more precise. This is coming from free42. ! if (FlpIsZero(expon.imag) && (expon.real == floor(expon.real)) ! && (expon.real >= -2147483647.0) && (expon.real <= 2147483647.0)) { ! int w = (int) (expon.real); ! if (FlpIsZero(base.real) && FlpIsZero(base.imag)) { ! if (w < 0) { ! double tmp = 1.0; ! result.real = tmp / 0.0; // +infinity ! result.imag = 0.0; ! return (result); ! } else if (w > 0) { ! result.real = 0.0; ! result.imag = 0.0; ! return (result); ! } ! } ! if (w == 0) { ! result.real = 1.0; ! result.imag = 0.0; ! return (result); ! } ! double zr = base.real; ! double zi = base.imag; ! if (w < 0) { ! double h = _hypot(zr, zi); ! zr = zr / h / h; ! zi = (-zi) / h / h; ! w = -w; ! } ! double res_r = 1; ! double res_i = 0; ! double tmp; ! while (1) { ! if ((w & 1) != 0) { ! tmp = res_r * zr - res_i * zi; ! res_i = res_r * zi + res_i * zr; ! res_r = tmp; ! /* TODO: can one component be infinite while ! * the other is zero? If yes, how do we handle ! * that? ! */ ! if (isinf(res_r) && isinf(res_i)) ! break; ! if ((res_r == 0.0) && (res_i == 0.0)) ! break; ! } ! w >>= 1; ! if (w == 0) ! break; ! tmp = zr * zr - zi * zi; ! zi = 2 * zr * zi; ! zr = tmp; ! } ! result.real = res_r; ! result.imag = res_i; ! } else { ! gtmp=cplx_to_gon(base); ! tmp.real = log(gtmp.r); ! tmp.imag = gtmp.angle; ! tmp = cplx_multiply(expon,tmp); ! ! result.real = exp(tmp.real) * cos(tmp.imag); ! result.imag = exp(tmp.real) * sin(tmp.imag); ! } ! ! return result; } |
From: Mapi B. <ma...@us...> - 2009-10-25 17:52:35
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29263 Modified Files: core_main.cpp Main.cpp Main.h varmgr.cpp varmgr.h Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: Main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/Main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Main.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- Main.cpp 25 Oct 2009 17:52:15 -0000 1.3 *************** *** 98,102 **** {_T("ans")}, {_T(""),false,true}, // ?? ! {_T("^"),true}, // power {_T("log"),false,true}, {_T("ln"),false,true}, --- 98,102 ---- {_T("ans")}, {_T(""),false,true}, // ?? ! {_T("^"),true,true}, // power {_T("log"),false,true}, {_T("ln"),false,true}, *************** *** 116,119 **** --- 116,120 ---- {_T("angle"),false,true}, {_T("i")}, // Complex_i + {_T("e")}, // e constant {_T(":")}, // column {_T(")")}, *************** *** 129,135 **** {_T("atanh"),false,true}, {_T("log"),false,true}, ! {_T("10^")}, {_T("log2"),false,true}, ! {_T("2^")}, {_T("fact"),false,true}, {_T("ncr"),false,true}, --- 130,136 ---- {_T("atanh"),false,true}, {_T("log"),false,true}, ! {_T("10^"),false,true}, {_T("log2"),false,true}, ! {_T("2^"),false,true}, {_T("fact"),false,true}, {_T("ncr"),false,true}, *************** *** 137,140 **** --- 138,142 ---- {_T("round"),false,true,false,true}, {_T("trunc"),false,true,false,true}, + {_T("ceil"),false,true,false,true}, {_T("floor"),false,true,false,true}, {_T("gamma"),false,true,false,true}, *************** *** 219,225 **** {_T("erf"),false,true,false,true}, {_T("erfc"),false,true,false,true}, {0,NULL,false} }; ! // Currently 149 entries, not counting the last one (NULL). // Don't forget to update BUTTON_COUNT in Main.h if this evolves ! --- 221,228 ---- {_T("erf"),false,true,false,true}, {_T("erfc"),false,true,false,true}, + {_T("Inf")}, // Infinity constant {0,NULL,false} }; ! // Currently 152 entries, not counting the last one (NULL). // Don't forget to update BUTTON_COUNT in Main.h if this evolves ! Index: core_main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_main.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- core_main.cpp 25 Oct 2009 17:52:14 -0000 1.3 *************** *** 249,257 **** *repeat = 0; ! if (key == KEY_SHIFT) { ! set_shift(!mode_shift); ! return (mode_running || (keybuf_head != keybuf_tail)); ! } ! /* if (mode_interruptible != NULL) { */ /* We're in the middle of an interruptible function --- 249,253 ---- *repeat = 0; ! #define keydown(a,b) (repeating_key = b) /* if (mode_interruptible != NULL) { */ /* We're in the middle of an interruptible function *************** *** 363,367 **** shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); */ /* Feed the dequeued key to the usual suspects */ - #define keydown(a,b) (repeating_key = b) /* keydown(oldshift, oldkey); core_keyup(); --- 359,362 ---- *************** *** 387,399 **** */ if (key != KEY_NONE) { - int shift = mode_shift; - set_shift(false); if (mode_getkey && mode_running) shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); ! keydown(shift, key); if (repeating != 0) { *repeat = repeating; repeating = 0; } return (mode_running && !mode_getkey); } --- 382,396 ---- */ if (key != KEY_NONE) { if (mode_getkey && mode_running) shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); ! keydown(mode_shift, key); if (repeating != 0) { *repeat = repeating; repeating = 0; } + if (key == KEY_SHIFT) { + set_shift(!mode_shift); + return (mode_running || (keybuf_head != keybuf_tail)); + } return (mode_running && !mode_getkey); } *************** *** 534,537 **** --- 531,539 ---- redisplay(); */ + if (mode_shift && (repeating_key != KEY_SHIFT) + && (repeating_key != KEY_BCKSPC)) { // Release shift when another key is pressed, + // except if back erase + set_shift(false); + } switch (repeating_key) { case KEY_EXE: Index: varmgr.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** varmgr.cpp 17 Oct 2009 13:46:30 -0000 1.2 --- varmgr.cpp 25 Oct 2009 17:52:15 -0000 1.3 *************** *** 205,222 **** * PARAMETERS: None * ! * RETURN: Nothing * ***********************************************************************/ ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) IFACE; ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) { Trpn item; CError err; ! if (!varname || !StrLen(varname)) { FrmAlert(altBadVariableName, hWnd_p); ! return; } - if (!varfunc_name_ok(varname,variable)) - return; // If not coming from a drop down list, verify if variable // already exists, and if yes, ask for confirmation. --- 205,220 ---- * PARAMETERS: None * ! * RETURN: false if could not save * ***********************************************************************/ ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) IFACE; ! static bool varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) { Trpn item; CError err; ! if (!varname || !StrLen(varname) || !varfunc_name_ok(varname,variable)) { FrmAlert(altBadVariableName, hWnd_p); ! return (false); } // If not coming from a drop down list, verify if variable // already exists, and if yes, ask for confirmation. *************** *** 224,236 **** && db_record_exists(varname) && FrmCustomAlert(altConfirmOverwrite, varname, NULL, NULL, hWnd_p)) ! return; item = db_read_variable(_T("ans"),&err); if (err) { FrmAlert(altAnsProblem, hWnd_p); ! return; } db_write_variable(varname,item); rpn_delete(item); } --- 222,236 ---- && db_record_exists(varname) && FrmCustomAlert(altConfirmOverwrite, varname, NULL, NULL, hWnd_p)) ! return (false); item = db_read_variable(_T("ans"),&err); if (err) { FrmAlert(altAnsProblem, hWnd_p); ! return (false); } db_write_variable(varname,item); rpn_delete(item); + + return (true); } *************** *** 270,278 **** * ***********************************************************************/ ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList) { db_delete_list(varlist); if (saveasvar) { ! varmgr_save_variable(text, hWnd_calc, fromList); } } --- 270,279 ---- * ***********************************************************************/ ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList) { db_delete_list(varlist); if (saveasvar) { ! return (varmgr_save_variable(text, hWnd_calc, fromList)); } + return (true); } Index: varmgr.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** varmgr.h 17 Oct 2009 13:46:30 -0000 1.2 --- varmgr.h 25 Oct 2009 17:52:15 -0000 1.3 *************** *** 36,40 **** TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); --- 36,40 ---- TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! bool varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); Index: Main.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/Main.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Main.h 17 Oct 2009 13:46:30 -0000 1.2 --- Main.h 25 Oct 2009 17:52:15 -0000 1.3 *************** *** 39,43 **** // Number of defined buttons in Main.cpp ! #define BUTTON_COUNT 149 #ifndef _MAIN_C_ --- 39,43 ---- // Number of defined buttons in Main.cpp ! #define BUTTON_COUNT 152 #ifndef _MAIN_C_ |