[Sphere-axis-commits] CVS: Axis Axis.txt,1.31,1.32 ColorSelectionDlg.cpp,1.10,1.11 ColorSelectionDlg
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2002-05-29 19:15:05
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv16239 Modified Files: Axis.txt ColorSelectionDlg.cpp ColorSelectionDlg.h drewsky.rc resource.h Log Message: Added a combo box containing internal hue names to the Color Selection dialog. Also, these internal names can be exported as DEFS Index: Axis.txt =================================================================== RCS file: /cvsroot/sphere-axis/Axis/Axis.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** Axis.txt 29 May 2002 16:44:34 -0000 1.31 --- Axis.txt 29 May 2002 19:14:58 -0000 1.32 *************** *** 25,28 **** --- 25,30 ---- ============================================================================= Changes in version 0.13.2 (in development) + · Added a combo box containing internal hue names to the Color Selection dialog. Also, these internal names can be + exported as DEFS. · Added Adron's roofing system. See roofing.txt for more information. · The remote console dialog and tray icon now show the profile being used. Index: ColorSelectionDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ColorSelectionDlg.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** ColorSelectionDlg.cpp 10 May 2002 19:22:11 -0000 1.10 --- ColorSelectionDlg.cpp 29 May 2002 19:14:58 -0000 1.11 *************** *** 51,54 **** --- 51,55 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CColorSelectionDlg) + DDX_Control(pDX, IDC_HUELIST, m_ccbHues); DDX_Control(pDX, IDC_TYPELIST, m_ccbTypeList); DDX_Control(pDX, IDC_ARTINDEX, m_ceArtIndex); *************** *** 72,75 **** --- 73,78 ---- ON_LBN_SELCHANGE(IDC_TYPELIST, OnSelchangeTypelist) ON_EN_CHANGE(IDC_ARTINDEX, OnChangeArtindex) + ON_CBN_SELCHANGE(IDC_HUELIST, OnSelchangeHuelist) + ON_BN_CLICKED(IDC_EXPORTHUES, OnExporthues) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 86,89 **** --- 89,93 ---- this->m_sShade.SetPos(25); m_preview.SetDrawFlags(0); + FillHueNames(); UpdatePalette(); LoadSettings(); *************** *** 454,456 **** --- 458,520 ---- DWORD dwValue = Main->GetRegistryDword("ColorPreviewArtType", 0); this->m_ccbTypeList.SetCurSel(dwValue); + } + + void CColorSelectionDlg::FillHueNames() + { + for (int i = 0; i <= Main->m_aHueGroups.GetUpperBound(); i++ ) + { + CHueGroup * pHueGroup = (CHueGroup *) Main->m_aHueGroups.GetAt(i); + if ( pHueGroup ) + { + for ( int j = 0; j < 8; j++ ) + { + CString csHueName = pHueGroup->Hues[j].cName; + CString csTest = csHueName; + csTest.MakeLower(); + if ( csTest.SpanIncluding("abcdefghijklmnopqrstuvwxyz 1234567890#()->_") == csTest && csTest != "") + { + int iIndex = m_ccbHues.AddString(csHueName); + m_ccbHues.SetItemData(iIndex, (i * 8) + j); + } + } + } + } + } + + void CColorSelectionDlg::OnSelchangeHuelist() + { + int iSel = this->m_ccbHues.GetCurSel(); + CString csHueIndex, csHueName; + csHueIndex.Format("%04x", m_ccbHues.GetItemData(iSel)); + m_ccbHues.GetLBText(iSel, csHueName); + m_csColorIndex.SetWindowText(csHueIndex); + m_csHueName.SetWindowText(csHueName); + UpdateSpectrum(); + SaveSettings(); + } + + void CColorSelectionDlg::OnExporthues() + { + CStdioFile csfOut; + if ( !csfOut.Open("axishuedefs.scp", CFile::modeCreate | CFile::typeText | CFile::shareDenyNone | CFile::modeWrite) ) + { + AfxMessageBox("Unable to open file axishuedefs.scp for writing!", MB_OK | MB_ICONEXCLAMATION); + return; + } + for ( int i = 0; i < m_ccbHues.GetCount(); i++ ) + { + CString csHue; + m_ccbHues.GetLBText(i, csHue); + csHue.Replace(" ", "_"); + csHue.Replace("#", ""); + csHue.Replace("(", ""); + csHue.Replace(")", ""); + csHue.Replace("->", "_"); + csHue.MakeUpper(); + CString csOutput; + csOutput.Format("%-32s0%x\n", csHue, m_ccbHues.GetItemData(i)); + csfOut.WriteString(csOutput); + } + csfOut.Close(); + AfxMessageBox("Hue Defs have been exported to axishuedefs.scp in your Axis folder.", MB_OK); } Index: ColorSelectionDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ColorSelectionDlg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ColorSelectionDlg.h 1 May 2002 03:33:09 -0000 1.4 --- ColorSelectionDlg.h 29 May 2002 19:14:59 -0000 1.5 *************** *** 47,50 **** --- 47,51 ---- //{{AFX_DATA(CColorSelectionDlg) enum { IDD = IDD_COLOR_DLG }; + CComboBox m_ccbHues; CComboBox m_ccbTypeList; CEdit m_ceArtIndex; *************** *** 68,71 **** --- 69,73 ---- // Implementation protected: + void FillHueNames(); void LoadSettings(); void SaveSettings(); *************** *** 85,88 **** --- 87,92 ---- afx_msg void OnSelchangeTypelist(); afx_msg void OnChangeArtindex(); + afx_msg void OnSelchangeHuelist(); + afx_msg void OnExporthues(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** drewsky.rc 29 May 2002 16:44:34 -0000 1.41 --- drewsky.rc 29 May 2002 19:14:59 -0000 1.42 *************** *** 1781,1785 **** STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Color Selection" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,421,7,50,14 --- 1781,1785 ---- STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Color Selection" ! FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,421,7,50,14 *************** *** 1807,1810 **** --- 1807,1813 ---- "{0904F7B3-2339-44C9-857C-6EB6CFEFA3B6}",WS_TABSTOP,319, 91,148,199 + COMBOBOX IDC_HUELIST,316,43,110,125,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Export Defs",IDC_EXPORTHUES,429,42,42,14 END *************** *** 2978,2982 **** 0x504e, 0x7343, "\000" IDC_COLORPREVIEW, 0x376, 28, 0 ! 0x0000, 0x0000, 0x0000, 0x0001, 0x1a39, 0x0000, 0x2627, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0 --- 2981,2985 ---- 0x504e, 0x7343, "\000" IDC_COLORPREVIEW, 0x376, 28, 0 ! 0x0000, 0x0000, 0x0000, 0x0001, 0x16f2, 0x0000, 0x2162, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0 Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** resource.h 29 May 2002 16:44:34 -0000 1.28 --- resource.h 29 May 2002 19:14:59 -0000 1.29 *************** *** 120,123 **** --- 120,124 ---- #define IDC_AS_CLIENTBROWSE 1001 #define IDC_ADD 1001 + #define IDC_EXPORTHUES 1001 #define IDC_BUTTON6 1002 #define IDC_SETHEARALL 1002 *************** *** 755,758 **** --- 756,760 ---- #define IDC_FILE_FILTER 1062 #define IDC_Y2 1062 + #define IDC_HUELIST 1062 #define IDC_RADIO6 1063 #define IDC_EDIT5 1063 *************** *** 1295,1300 **** --- 1297,1304 ---- #define IDC_TEST 1393 #define IDC_AS_STARTLAUNCHER 1394 + #define IDC_ROOFIMAGE 1394 #define IDC_AS_DEFUALTCLIENT 1395 #define IDC_AS_DEFUALTMULPATH 1396 + #define IDC_ROOFTYPE 1396 #define IDC_AS_AVAILABLESCRIPTS 1398 #define IDC_AS_ALLOWMULTIPLE 1399 *************** *** 1314,1319 **** #define IDC_STATIC_LABEL14 1413 #define IDC_STATIC_LABEL15 1414 - #define IDC_ROOFIMAGE 1394 - #define IDC_ROOFTYPE 1396 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 --- 1318,1321 ---- |