home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / iconed / coldlg.h < prev    next >
C/C++ Source or Header  |  1998-07-03  |  3KB  |  99 lines

  1. //========================= coldlg.h ====================================
  2. // This is the header file for the color palette dialog class.
  3. //
  4. // Copyright (C) 1996 Philip Eckenroth, Mike Tipping, Marilee Padilla,
  5. //                    John Fredric Jr. Masciantoni, and Bruce E. Wampler.
  6. //
  7. // This file is part of the V Icon Editor, and is covered
  8. // under the terms of the GNU General Public License,
  9. // Version 2. This program has NO WARRANTY. See the source file
  10. // viedapp.cpp for more complete information about license terms.
  11. //=======================================================================
  12.  
  13. #ifndef COLDLG_H
  14. #define COLDLG_H
  15.  
  16. #include <v/vdialog.h>    // We inherit from vDialog
  17.  
  18.  
  19. #include "viedcnv.h"
  20.  
  21. const int PalColors = 64;
  22.  
  23.  
  24.     class vApp;
  25.     class vWindow;
  26.     class myCanvasPane;
  27.     class vColorDialog : public vDialog
  28.       {
  29.       public:        //---------------------------------------- public
  30.     // Constructors
  31.     vColorDialog(vBaseWindow* bw, int All = 1, myCanvasPane* cnv = NULL);
  32.  
  33.     virtual ~vColorDialog();    // Destructor
  34.  
  35.     virtual void DialogCommand(ItemVal,ItemVal,CmdType); // action selected
  36.     void UpdatePalette(vColor* theColors, int numColors);
  37.  
  38.  
  39.       protected:    //--------------------------------------- protected
  40.  
  41.       private:        //--------------------------------------- private
  42.  
  43.     void init();    // internal inintialization
  44.         void UpdateColors(int mode, int value); // Updates current colors
  45.         void UpdateSliders(vColor CurColor);    // Updates color sliders 
  46.     void SetCmdObjItemList(CommandObject* cList, ItemVal id, void* ptr);
  47.  
  48.     vWindow* pWin;    // our parent
  49.         myCanvasPane* myCanvas;         // For the canvas
  50.  
  51.     vColor saveColor;
  52.  
  53.     int penColorMsg;        // message id of current color
  54.     int bgColorMsg;
  55.     int penColorVal;        // value id of current color
  56.     int bgColorVal;            // value of background color
  57.     int drawWhatShape;        // active shape to draw
  58.     ItemVal penStyleMsg;
  59.     ItemVal brushStyleMsg;
  60.     vColor Pal[PalColors];
  61.     vColor clrPen;
  62.     CommandObject* myCmds;
  63.       };
  64.  
  65. // Declaration of Item Values
  66. const ItemVal lbL1 = 999;
  67. const ItemVal lbL2 = 998;
  68.  
  69. const ItemVal frPalette = 150;
  70. const ItemVal frWhich = 151;
  71. const ItemVal cbtPen = 152;
  72. const ItemVal cbPen = 154;
  73. const ItemVal cbtBrush = 155;
  74. const ItemVal cbBrush = 157;
  75. const ItemVal blank = 158;
  76. const ItemVal dummy = 159;
  77. const ItemVal frSliders = 160;
  78.  
  79. const ItemVal Rslider = 161;
  80. const ItemVal Rtext = 162;
  81. const ItemVal Bslider = 163;
  82. const ItemVal Btext = 164;
  83. const ItemVal Gslider = 165;
  84. const ItemVal Gtext = 166;
  85.  
  86. const ItemVal blank1 = 170;
  87. const ItemVal blank2 = 171;
  88. const ItemVal blank3 = 172;
  89. const ItemVal blank4 = 173;
  90. const ItemVal blank5 = 174;
  91.  
  92.  
  93. const ItemVal btClose = 190;
  94. const ItemVal btSetFG = 191;
  95. const ItemVal btSetBG = 192;
  96. const ItemVal btReset = 193;
  97.  
  98. #endif
  99.