From: Jorge G. <cl...@us...> - 2006-10-19 19:40:51
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv32448 Modified Files: grsetup.c Log Message: Changes in Graph Setup form; Added checkboxes to select the functions to graph Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** grsetup.c 19 Oct 2006 16:14:24 -0000 1.30 --- grsetup.c 19 Oct 2006 19:40:48 -0000 1.31 *************** *** 274,289 **** StrCopy(text,grsetup_fn_descr(row+firstVisible)); StrCat(text,":"); - if (palmOS35) - WinPushDrawState(); - if (grayDisplay || colorDisplay) { - if (graphPrefs.functype==graph_param) - WinSetTextColor(graphPrefs.colors[(row+firstVisible)/2]); - else - WinSetTextColor(graphPrefs.colors[row+firstVisible]); - } x = bounds->topLeft.x+bounds->extent.x-FntCharsWidth(text,StrLen(text))-2; WinDrawChars(text,StrLen(text),x,bounds->topLeft.y); - if (palmOS35) - WinPopDrawState(); } --- 274,279 ---- *************** *** 331,335 **** firstVisible = 0; ! CtlSetValue(GetObjectPtr(ckbGrGrid), graphPrefs.grid); /* Setup the up/down pointers, grType and grColor buttons*/ --- 321,326 ---- firstVisible = 0; ! CtlSetValue(GetObjectPtr(ckbGrAxes), graphPrefs.grEnable[6]); ! CtlSetValue(GetObjectPtr(ckbGrGrid), graphPrefs.grEnable[7]); /* Setup the up/down pointers, grType and grColor buttons*/ *************** *** 346,350 **** } } else { ! for (i = grType2; i <= grType6; i += 2) FrmShowObject(frm, FrmGetObjectIndex(frm, i)); } --- 337,341 ---- } } else { ! for (i = ckbGrfun2; i <= grType6; i += 2) FrmShowObject(frm, FrmGetObjectIndex(frm, i)); } *************** *** 512,516 **** * will be released by db_delete_list with dblist */ txtnone[0] = ' '; ! SysCopyStringResource(txtnone+1,grSetupNone); txtuser[0] = ' '; SysCopyStringResource(txtuser+1,grSetupUser); --- 503,507 ---- * will be released by db_delete_list with dblist */ txtnone[0] = ' '; ! SysCopyStringResource(txtnone+1,strLocalDelete); txtuser[0] = ' '; SysCopyStringResource(txtuser+1,grSetupUser); *************** *** 542,547 **** if (i!=noListSelection && i!=pos) { ! if (i==0) StrCopy(fname,""); else if (i==1) { /* The 'User' function get always edit window */ SysCopyStringResource(tmptxt,grSetupStrFunc); --- 533,540 ---- if (i!=noListSelection && i!=pos) { ! if (i==0){ StrCopy(fname,""); + db_delete_record(grsetup_def_name(row)); + } else if (i==1) { /* The 'User' function get always edit window */ SysCopyStringResource(tmptxt,grSetupStrFunc); *************** *** 577,586 **** WinEraseRectangle(&bounds, 0); graph_unsetcolor(); x = bounds.topLeft.x; y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(1); ! x2 = x + HanderaCoord(3); ! x3 = x + HanderaCoord(5); y1 = y - HanderaCoord(1); y2 = y - HanderaCoord(3); --- 570,580 ---- WinEraseRectangle(&bounds, 0); graph_unsetcolor(); + WinDrawRectangleFrame(roundFrame, &bounds); x = bounds.topLeft.x; y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(3); ! x2 = x + HanderaCoord(6); ! x3 = x + HanderaCoord(9); y1 = y - HanderaCoord(1); y2 = y - HanderaCoord(3); *************** *** 591,594 **** --- 585,591 ---- else k = i; + + CtlSetValue(GetObjectPtr(ckbGrfun1+i), graphPrefs.grEnable[k]); + graph_setcolor(k); switch (graphPrefs.grType[k]) { *************** *** 617,623 **** for (i=0; i<3; i++) { if (grayDisplay || colorDisplay) { ! graph_setcolor(i < 2 ? -1 : -2); ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grBgnd+i), &bounds); ! if (i == 0 ) { WinEraseRectangle(&bounds, 0); } else { --- 614,620 ---- for (i=0; i<3; i++) { if (grayDisplay || colorDisplay) { ! graph_setcolor(i == 1 ? -2 : -1); ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grAxes+i), &bounds); ! if (i == 2 ) { WinEraseRectangle(&bounds, 0); } else { *************** *** 696,700 **** switch (controlId) { case grSetupDone: ! graphPrefs.grid = CtlGetValue(GetObjectPtr(ckbGrGrid)); grSetupOpen = false; FrmReturnToForm(0); --- 693,698 ---- switch (controlId) { case grSetupDone: ! graphPrefs.grEnable[6] = CtlGetValue(GetObjectPtr(ckbGrAxes)); ! graphPrefs.grEnable[7] = CtlGetValue(GetObjectPtr(ckbGrGrid)); grSetupOpen = false; FrmReturnToForm(0); *************** *** 712,715 **** --- 710,714 ---- handled = true; break; + case ckbGrfun1: case grType1: case grColor1: *************** *** 719,726 **** --- 718,727 ---- row = 0; break; + case ckbGrfun2: case grType2: case grColor2: row = 1; break; + case ckbGrfun3: case grType3: case grColor3: *************** *** 730,737 **** --- 731,740 ---- row = 2; break; + case ckbGrfun4: case grType4: case grColor4: row = 3; break; + case ckbGrfun5: case grType5: case grColor5: *************** *** 741,744 **** --- 744,748 ---- row = 4; break; + case ckbGrfun6: case grType6: case grColor6: *************** *** 752,756 **** } ! if (controlId >= grType1 && controlId <= grType6) { graphPrefs.grType[row]++; if(graphPrefs.grType[row]>2) --- 756,764 ---- } ! if (controlId >= ckbGrfun1 && controlId <= ckbGrfun6) { ! graphPrefs.grEnable[row] = CtlGetValue(GetObjectPtr(controlId)); ! handled=true; ! } ! else if (controlId >= grType1 && controlId <= grType6) { graphPrefs.grType[row]++; if(graphPrefs.grType[row]>2) *************** *** 759,763 **** handled=true; } ! else if (controlId >= grColor1 && controlId <= grGrid) { IndexedColorType col = graphPrefs.colors[row]; RGBColorType rgb; --- 767,771 ---- handled=true; } ! else if (controlId >= grColor1 && controlId <= grBgnd) { IndexedColorType col = graphPrefs.colors[row]; RGBColorType rgb; |