00001 // $Id: extendsetsdlg.cpp 892 2006-04-26 12:06:57Z alex $ 00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE 00003 ================================XARAHEADERSTART=========================== 00004 00005 Xara LX, a vector drawing and manipulation program. 00006 Copyright (C) 1993-2006 Xara Group Ltd. 00007 Copyright on certain contributions may be held in joint with their 00008 respective authors. See AUTHORS file for details. 00009 00010 LICENSE TO USE AND MODIFY SOFTWARE 00011 ---------------------------------- 00012 00013 This file is part of Xara LX. 00014 00015 Xara LX is free software; you can redistribute it and/or modify it 00016 under the terms of the GNU General Public License version 2 as published 00017 by the Free Software Foundation. 00018 00019 Xara LX and its component source files are distributed in the hope 00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the 00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00022 See the GNU General Public License for more details. 00023 00024 You should have received a copy of the GNU General Public License along 00025 with Xara LX (see the file GPL in the root directory of the 00026 distribution); if not, write to the Free Software Foundation, Inc., 51 00027 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00028 00029 00030 ADDITIONAL RIGHTS 00031 ----------------- 00032 00033 Conditional upon your continuing compliance with the GNU General Public 00034 License described above, Xara Group Ltd grants to you certain additional 00035 rights. 00036 00037 The additional rights are to use, modify, and distribute the software 00038 together with the wxWidgets library, the wxXtra library, and the "CDraw" 00039 library and any other such library that any version of Xara LX relased 00040 by Xara Group Ltd requires in order to compile and execute, including 00041 the static linking of that library to XaraLX. In the case of the 00042 "CDraw" library, you may satisfy obligation under the GNU General Public 00043 License to provide source code by providing a binary copy of the library 00044 concerned and a copy of the license accompanying it. 00045 00046 Nothing in this section restricts any of the rights you have under 00047 the GNU General Public License. 00048 00049 00050 SCOPE OF LICENSE 00051 ---------------- 00052 00053 This license applies to this program (XaraLX) and its constituent source 00054 files only, and does not necessarily apply to other Xara products which may 00055 in part share the same code base, and are subject to their own licensing 00056 terms. 00057 00058 This license does not apply to files in the wxXtra directory, which 00059 are built into a separate library, and are subject to the wxWindows 00060 license contained within that directory in the file "WXXTRA-LICENSE". 00061 00062 This license does not apply to the binary libraries (if any) within 00063 the "libs" directory, which are subject to a separate license contained 00064 within that directory in the file "LIBS-LICENSE". 00065 00066 00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS 00068 ---------------------------------------------- 00069 00070 Subject to the terms of the GNU Public License (see above), you are 00071 free to do whatever you like with your modifications. However, you may 00072 (at your option) wish contribute them to Xara's source tree. You can 00073 find details of how to do this at: 00074 http://www.xaraxtreme.org/developers/ 00075 00076 Prior to contributing your modifications, you will need to complete our 00077 contributor agreement. This can be found at: 00078 http://www.xaraxtreme.org/developers/contribute/ 00079 00080 Please note that Xara will not accept modifications which modify any of 00081 the text between the start and end of this header (marked 00082 XARAHEADERSTART and XARAHEADEREND). 00083 00084 00085 MARKS 00086 ----- 00087 00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara 00089 designs are registered or unregistered trademarks, design-marks, and/or 00090 service marks of Xara Group Ltd. All rights in these marks are reserved. 00091 00092 00093 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK. 00094 http://www.xara.com/ 00095 00096 =================================XARAHEADEREND============================ 00097 */ 00098 // Implementation of the ExtendSetsDlg class. 00099 00100 #include "camtypes.h" 00101 00102 #include "extendsetsdlg.h" // this file's header. 00103 #include "ngcore.h" // for NameGallery. 00104 #include "ngitem.h" // for SGNameItem 00105 00106 #include "ccdc.h" // apparently this supplies some #includes req'd for kernel dlgs. 00107 //#include "extendres.h" // our dialog resources. 00108 00109 #ifdef _DEBUG 00110 #undef THIS_FILE 00111 static char BASED_CODE THIS_FILE[] = __FILE__; 00112 #endif 00113 00114 DECLARE_SOURCE("$Revision: 892 $"); 00115 00116 // dynamic class creation stuff. 00117 CC_IMPLEMENT_DYNCREATE(ExtendSetsDlg, DialogOp); 00118 00119 #define new CAM_DEBUG_NEW 00120 00121 // static variables used in dialog initialisation. 00122 const CDlgMode ExtendSetsDlg::Mode = MODAL; 00123 const UINT32 ExtendSetsDlg::IDD = _R(IDD_EXTENDSETSDLG); 00124 00125 // static indices into the extend-behaviour combo-boxes 00126 const INT32 ExtendSetsDlg::EXTEND_BEHAVIOUR_NONE = 0; 00127 const INT32 ExtendSetsDlg::EXTEND_BEHAVIOUR_EXTEND = 1; 00128 const INT32 ExtendSetsDlg::EXTEND_BEHAVIOUR_STRETCH = 2; 00129 00130 // pointer to the one and only instance of this class. 00131 ExtendSetsDlg* ExtendSetsDlg::TheDialog = NULL; 00132 00133 00134 00135 /******************************************************************************************** 00136 > ExtendSetsDlg::ExtendSetsDlg() : DialogOp(ExtendSetsDlg::IDD, ExtendSetsDlg::Mode) 00137 00138 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00139 Created: 29/10/1999 00140 Purpose: Constructor 00141 ********************************************************************************************/ 00142 00143 ExtendSetsDlg::ExtendSetsDlg() : DialogOp(ExtendSetsDlg::IDD, ExtendSetsDlg::Mode) 00144 { 00145 // initialise our public static pointer to ourself. 00146 if (TheDialog == NULL) 00147 TheDialog = this; 00148 00149 // initialise our member variables. 00150 m_bArrayExtendFlags = NULL; 00151 m_pDefineExtendSet = NULL; 00152 m_pbCommit = NULL; 00153 m_pfExtendFlags = NULL; 00154 } 00155 00156 00157 00158 /******************************************************************************************** 00159 > ExtendSetsDlg::~ExtendSetsDlg() 00160 00161 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00162 Created: 29/10/1999 00163 Purpose: Destructor 00164 ********************************************************************************************/ 00165 00166 ExtendSetsDlg::~ExtendSetsDlg() 00167 { 00168 // the public static pointer must no longer point to us. 00169 if (TheDialog == this) 00170 TheDialog = NULL; 00171 00172 // set all our data pointers to NULL, just to clear up. 00173 m_bArrayExtendFlags = NULL; 00174 m_pDefineExtendSet = NULL; 00175 m_pbCommit = NULL; 00176 m_pfExtendFlags = NULL; 00177 } 00178 00179 00180 00181 /******************************************************************************************** 00182 > MsgResult ExtendSetsDlg::Message(Msg* Message) 00183 00184 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00185 Created: 29/10/1999 00186 Inputs: Message the incoming message. 00187 Returns: DialogOp::Message(Message) 00188 Purpose: Message handler for the ExtendSetsDlg. 00189 ********************************************************************************************/ 00190 00191 MsgResult ExtendSetsDlg::Message(Msg* Message) 00192 { 00193 BOOL bEndDialog = FALSE; 00194 00195 // only process messages _intended_ for this or all dialogs. 00196 if (IS_OUR_DIALOG_MSG(Message)) 00197 { 00198 DialogMsg* pDialogMsg = (DialogMsg*)Message; 00199 00200 switch (pDialogMsg->DlgMsg) 00201 { 00202 // sent when we must initialise the dialog, after it has been created. 00203 case DIM_CREATE: 00204 SetUpControls(); 00205 break; 00206 00207 // sent to dismiss and cancel the dialog. 00208 // CANCEL was chosen, so note that our list of named sets is now invalid. 00209 case DIM_CANCEL: 00210 *m_pbCommit = FALSE; 00211 bEndDialog = TRUE; 00212 break; 00213 00214 // sent to dismiss and confirm the dialog. 00215 case DIM_COMMIT: 00216 *m_pbCommit = TRUE; 00217 GenerateListOfSets(); 00218 bEndDialog = TRUE; 00219 break; 00220 00221 // further message processing... 00222 default: 00223 break; 00224 } // end switch (pDialogMsg->DlgMsg) 00225 } 00226 00227 // if necessary, close the dialog. 00228 if (bEndDialog) 00229 { 00230 Close(); 00231 End(); 00232 } 00233 00234 return DialogOp::Message(Message); 00235 } 00236 00237 00238 00239 /******************************************************************************************** 00240 > OpState ExtendSetsDlg::GetState(String_256*, OpDescriptor*) 00241 00242 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00243 Created: 29/10/1999 00244 Inputs: Does not make use of its inputs in any way. 00245 Returns: the OpState of this dialog operation. 00246 Purpose: Returns the OpState of this dialog operation. 00247 ********************************************************************************************/ 00248 00249 OpState ExtendSetsDlg::GetState(String_256*, OpDescriptor*) 00250 { 00251 OpState OpSt; 00252 00253 // set the enabled state of any buttons/menus which work with this dialog. 00254 if (TheDialog != NULL) 00255 OpSt.Ticked = TRUE; 00256 00257 return OpSt; 00258 } 00259 00260 00261 00262 /******************************************************************************************** 00263 > BOOL ExtendSetsDlg::Init() 00264 00265 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00266 Created: 29/10/1999 00267 Returns: TRUE if successful, 00268 FALSE otherwise (probably due to lack of memory). 00269 Purpose: Create an OpDescriptor for the ExtendSetsDlg. 00270 May also declare ExtendSetsDlg preferences, although 00271 it does not at present. 00272 TODO: 00273 I don't know what half of the parameters below do, 00274 so this needs to be investigated! 00275 00276 OpDescriptor constructor's arguments:- 00277 00278 UINT32 toolID, // module ID, 0 if not in tool 00279 UINT32 txID, // UI descriptions of op 00280 CCRuntimeClass* Op, // pointer to the Op's runtime class 00281 TCHAR* tok, // pointer to the OPTOKEN string 00282 pfnGetState gs, // pointer to the UI GetState function 00283 UINT32 helpId = 0, // assoc. help system identifier 00284 UINT32 bubbleID = 0, // string resource for bubble help 00285 UINT32 resourceID = 0, // bitmap ("icon") or resource ID 00286 UINT32 controlID =0, // assoc. gadget control ID 00287 BOOL ReceiveMessages = FALSE, // send this OpDescriptor kernel Msgs 00288 BOOL Smart = FALSE, // op does smart attr optimisation 00289 BOOL Clean = TRUE, // op doesn't modify document 00290 UINT32 OneOpenInstID = 0, // When not 0 only one live instance 00291 // of the operation is permitted, and 00292 // OneOpenInstID is the string resource 00293 // ID describing why.This will be useful 00294 // for single instance only dialogs. 00295 UINT32 AutoStateFlags = 0 // Flags which indicate conditions when 00296 // the operation should automatically be 00297 // greyed/ticked etc..(This cuts down the 00298 // number of tests that need to be made 00299 // in the GetState function). 00300 ********************************************************************************************/ 00301 00302 BOOL ExtendSetsDlg::Init() 00303 { 00304 return (RegisterOpDescriptor(0, // Tool ID 00305 _R(IDS_EXTENDSETS), // String resource ID 00306 CC_RUNTIME_CLASS(ExtendSetsDlg),// Runtime class 00307 OPTOKEN_EXTENDSETSDLG, // Token string 00308 ExtendSetsDlg::GetState, // GetState function 00309 0, // Help ID 00310 _R(IDBBL_EXTENDSETS), // Bubble ID 00311 0, // Resource ID 00312 0, // Control ID 00313 SYSTEMBAR_ILLEGAL, // Bar ID 00314 TRUE, // Receive system messages 00315 FALSE, // Smart duplicate operation 00316 TRUE, // Clean operation 00317 0, // No vertical counterpart 00318 NULL, 00319 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) 00320 )); 00321 } 00322 00323 00324 00325 /******************************************************************************************** 00326 > void ExtendSetsDlg::Do(OpDescriptor*) 00327 00328 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00329 Created: 29/10/1999 00330 Inputs: Does not make use of its inputs in any way. 00331 Purpose: This function should not be called - DoWithParam should be used instead. 00332 Errors: ERROR3 under debug, does nothing at all under release. 00333 ********************************************************************************************/ 00334 00335 void ExtendSetsDlg::Do(OpDescriptor*) 00336 { 00337 ERROR3("ExtendSetsDlg::Do- this function should not be called - use DoWithParam instead."); 00338 } 00339 00340 00341 00342 /******************************************************************************************** 00343 > void ExtendSetsDlg::DoWithParam(OpDescriptor* pOp, OpParam* pParam) 00344 00345 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00346 Created: 29/10/1999 00347 Inputs: pOp an OpDescriptor which currently is not actually used. 00348 pParam pointer to an OpParam structure, which is really of type 00349 OpParamBarCreationDlg, allowing this dialog to be created 00350 with specific initialisation parameters. 00351 Purpose: Opens or dismisses the ExtendSetsDlg. 00352 Errors: ERROR2 if any of the parameters are NULL. 00353 ********************************************************************************************/ 00354 00355 void ExtendSetsDlg::DoWithParam(OpDescriptor* pOp, OpParam* pParam) 00356 { 00357 // use pParam to initialise any internal member variables, eg: 00358 m_bArrayExtendFlags = ((OpParamExtendSetsDlg*)pParam)->m_bArrayExtendFlags; 00359 m_pDefineExtendSet = ((OpParamExtendSetsDlg*)pParam)->m_pDefineExtendSet; 00360 m_pbCommit = ((OpParamExtendSetsDlg*)pParam)->m_pbCommit; 00361 m_pfExtendFlags = ((OpParamExtendSetsDlg*)pParam)->m_pfExtendFlags; 00362 00363 // validate input parameters. 00364 if (m_bArrayExtendFlags == NULL || m_pDefineExtendSet == NULL || 00365 m_pbCommit == NULL || m_pfExtendFlags == NULL) 00366 { 00367 ERROR2RAW("ExtendSetsDlg::DoWithParam- one or more parameters was NULL!"); 00368 End(); 00369 return; 00370 } 00371 00372 // attempt to create a new dialog. 00373 if ( !Create() ) 00374 { 00375 // if we couldn't create the dialog, tell the user and end the operation. 00376 InformError(); 00377 End(); 00378 } 00379 } 00380 00381 00382 00383 /******************************************************************************************** 00384 > BOOL ExtendSetsDlg::Create() 00385 00386 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00387 Created: 29/10/1999 00388 Returns: TRUE if successful, 00389 FALSE otherwise. 00390 Purpose: Create an ExtendSetsDlg dialog box. 00391 See also: DialogOp::Create 00392 ********************************************************************************************/ 00393 00394 BOOL ExtendSetsDlg::Create() 00395 { 00396 // perform any custom initialisation. 00397 00398 // only allow one instance of this dialog. 00399 if (TheDialog != this) 00400 return FALSE; 00401 00402 // call the base class implementation, to actually create the dialog. 00403 return DialogOp::Create(); 00404 } 00405 00406 00407 00408 /******************************************************************************************** 00409 > BOOL ExtendSetsDlg::SetUpControls() 00410 00411 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00412 Created: 29/10/1999 00413 Returns: TRUE always. 00414 Purpose: Initialise the dialog's set of controls. 00415 ********************************************************************************************/ 00416 00417 BOOL ExtendSetsDlg::SetUpControls() 00418 { 00419 // initialise controls here. 00420 00421 // get the name of the set we are editing. 00422 String_256 strName; 00423 if (m_pDefineExtendSet != NULL) 00424 m_pDefineExtendSet->GetNameText(&strName); 00425 else 00426 strName = "TestName"; // this should never happen, but just in case... 00427 00428 // set the dialog's title text. 00429 String_256 strPrompt; 00430 strPrompt.MakeMsg(_R(IDS_ES_EXTENDTITLE), &strName); 00431 SetTitlebarName(&strPrompt); 00432 00433 // set the text of the 'extended-by' prompt 00434 strPrompt.MakeMsg(_R(IDS_ES_EXTENDEDBY), &strName); 00435 SetStringGadgetValue(_R(IDC_ES_EXTENDEDBY), &strPrompt); 00436 00437 // set the text of the 'extend-type' prompt 00438 strPrompt.MakeMsg(_R(IDS_ES_EXTENDTYPE), &strName); 00439 SetStringGadgetValue(_R(IDC_ES_EXTENDTYPE), &strPrompt); 00440 00441 // set the text of the horizontal and vertical prompts 00442 SetStringGadgetValue(_R(IDC_ES_VERTICAL), _R(IDS_ES_VERTICAL)); 00443 SetStringGadgetValue(_R(IDC_ES_HORIZONTAL), _R(IDS_ES_HORIZONTAL)); 00444 00445 // add 'None', 'Extend' and 'Stretch' values to our two combo-boxes, and initialise them. 00446 INT32 selIndex = 0; 00447 SetStringGadgetValue(_R(IDC_ES_COMBO_XBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_NONE), FALSE, EXTEND_BEHAVIOUR_NONE); 00448 SetStringGadgetValue(_R(IDC_ES_COMBO_XBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_EXTEND), FALSE, EXTEND_BEHAVIOUR_EXTEND); 00449 SetStringGadgetValue(_R(IDC_ES_COMBO_XBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_STRETCH), TRUE, EXTEND_BEHAVIOUR_STRETCH); 00450 00451 selIndex = (*m_pfExtendFlags & X_EXTEND) ? EXTEND_BEHAVIOUR_EXTEND : 00452 (*m_pfExtendFlags & X_STRETCH) ? EXTEND_BEHAVIOUR_STRETCH : 00453 EXTEND_BEHAVIOUR_NONE; 00454 SetSelectedValueIndex(_R(IDC_ES_COMBO_XBEHAVIOUR), selIndex); 00455 SetComboListLength(_R(IDC_ES_COMBO_XBEHAVIOUR)); 00456 00457 SetStringGadgetValue(_R(IDC_ES_COMBO_YBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_NONE), FALSE, EXTEND_BEHAVIOUR_NONE); 00458 SetStringGadgetValue(_R(IDC_ES_COMBO_YBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_EXTEND), FALSE, EXTEND_BEHAVIOUR_EXTEND); 00459 SetStringGadgetValue(_R(IDC_ES_COMBO_YBEHAVIOUR), _R(IDS_ES_BEHAVIOUR_STRETCH), TRUE, EXTEND_BEHAVIOUR_STRETCH); 00460 00461 selIndex = (*m_pfExtendFlags & Y_EXTEND) ? EXTEND_BEHAVIOUR_EXTEND : 00462 (*m_pfExtendFlags & Y_STRETCH) ? EXTEND_BEHAVIOUR_STRETCH : 00463 EXTEND_BEHAVIOUR_NONE; 00464 SetSelectedValueIndex(_R(IDC_ES_COMBO_YBEHAVIOUR), selIndex); 00465 SetComboListLength(_R(IDC_ES_COMBO_YBEHAVIOUR)); 00466 00467 // ok, now add our ultra-funky check-list box to our dialog. 00468 BOOL ok = m_tclbExtendingSets.Create(WindowID, _R(IDC_ES_CHECKLIST)); 00469 if (ok) 00470 FillCheckListBox(); 00471 00472 return ok; 00473 } 00474 00475 00476 00477 /******************************************************************************************** 00478 > BOOL ExtendSetsDlg::FillCheckListBox() 00479 00480 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00481 Created: 01/11/1999 00482 Inputs: 00483 Outputs: 00484 Returns: TRUE always. 00485 Purpose: Fill our check-list box with a list of all named sets currently 00486 in the document. We disable the item for the named set which is 00487 doing the extending, and if there are no named sets then we put 00488 a message saying so into the list box. 00489 Errors: 00490 See also: 00491 ********************************************************************************************/ 00492 00493 BOOL ExtendSetsDlg::FillCheckListBox() 00494 { 00495 // iterate over all names used within the document. 00496 NameGallery* pNameGallery = NameGallery::Instance(); 00497 if (!pNameGallery) 00498 return TRUE; 00499 SGUsedNames* pNames = pNameGallery->GetUsedNames(); 00500 SGNameItem* pItem = (SGNameItem*) pNames->GetChild(); 00501 00502 // if there are no named sets then add a disabled item to tell the user that there are 00503 // no named sets (this should never happen, as we have to be called with a set to extend) 00504 INT32 nIndex; 00505 String_256 strName; 00506 strName.Empty(); 00507 if (pItem == NULL) 00508 { 00509 strName.Load(_R(IDS_ES_NO_NAMED_SETS)); 00510 nIndex = m_tclbExtendingSets.AddString((TCHAR*)strName); 00511 m_tclbExtendingSets.Enable(nIndex, FALSE); 00512 } 00513 00514 // ...otherwise, fill the check-list with all named sets. 00515 nIndex = 0; 00516 for (; pItem != NULL; pItem = (SGNameItem*) pItem->GetNext()) 00517 { 00518 // Don't show the target item - it's redundant, illogical and confusing. 00519 if (pItem == m_pDefineExtendSet) continue; 00520 00521 // add a ptr to the SGNameItem and also add its text to the checklistbox. 00522 pItem->GetNameText(&strName); 00523 nIndex = m_tclbExtendingSets.AddString((TCHAR*)strName); 00524 m_tclbExtendingSets.SetItemDataPtr(nIndex, pItem); 00525 m_tclbExtendingSets.SetCheck(nIndex, m_bArrayExtendFlags[nIndex]); 00526 } 00527 00528 return TRUE; 00529 } 00530 00531 00532 00533 /******************************************************************************************** 00534 > void ExtendSetsDlg::GenerateListOfSets() 00535 00536 Author: Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com> 00537 Created: 01/11/1999 00538 Inputs: 00539 Outputs: 00540 Returns: 00541 Purpose: Regenerates our list of ticked named sets. 00542 Errors: 00543 See also: 00544 ********************************************************************************************/ 00545 00546 void ExtendSetsDlg::GenerateListOfSets() 00547 { 00548 // go through each item in our checklist box and set a corresponding flag in our byte 00549 // array of flags, depending on its checked (also enabled? and/or visible?) status. 00550 INT32 nCount = m_tclbExtendingSets.GetCount(); 00551 for (INT32 i = 0; i < nCount; i ++) 00552 { 00553 if (m_tclbExtendingSets.GetCheck(i) == 1) 00554 m_bArrayExtendFlags[i] = 1; 00555 else 00556 m_bArrayExtendFlags[i] = 0; 00557 } 00558 00559 // set the contents of our pointer to the extend behaviour flag. 00560 BYTE fExtend = 0; 00561 switch (GetSelectedValueIndex(_R(IDC_ES_COMBO_XBEHAVIOUR))) // x-axis behaviour 00562 { 00563 case (ExtendSetsDlg::EXTEND_BEHAVIOUR_EXTEND): 00564 fExtend |= X_EXTEND; 00565 break; 00566 00567 case EXTEND_BEHAVIOUR_STRETCH: 00568 fExtend |= X_STRETCH; 00569 break; 00570 00571 case EXTEND_BEHAVIOUR_NONE: 00572 default: 00573 // we do nothing if the index is set to none, or if we get an invalid value. 00574 break; 00575 } 00576 00577 switch (GetSelectedValueIndex(_R(IDC_ES_COMBO_YBEHAVIOUR))) // y-axis behaviour 00578 { 00579 case EXTEND_BEHAVIOUR_EXTEND: 00580 fExtend |= Y_EXTEND; 00581 break; 00582 00583 case EXTEND_BEHAVIOUR_STRETCH: 00584 fExtend |= Y_STRETCH; 00585 break; 00586 00587 case EXTEND_BEHAVIOUR_NONE: 00588 default: 00589 // we do nothing if the index is set to none, or if we get an invalid value. 00590 break; 00591 } 00592 00593 *m_pfExtendFlags = fExtend; 00594 } 00595 00596 00597 00598 //------------------------------------------------------------------------------------------- 00599 //------------------------------------------------------------------------------------------- 00600 //------------------------------------------------------------------------------------------- 00601 //-------------------------------------------------------------------------------------------