bmpsdlg.h

Go to the documentation of this file.
00001 // $Id: bmpsdlg.h 1282 2006-06-09 09:46:49Z 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 
00099 #ifndef INC_BMPSDLG
00100 #define INC_BMPSDLG
00101 
00102 //#include "dialogop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00103 //#include "bitmap.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00104 
00105 PORTNOTE("gif","Removed gifutil usage")
00106 #ifndef EXCLUDE_FROM_XARALX
00107 #include "gifutil.h"
00108 #endif
00109 
00110 //#include "outptgif.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00111 
00112 class BmpDlgParam;
00113 
00114 /*******************************************************************************************************
00115 
00116   class BmpDlg : publc DialogOp
00117 
00118   Author:   Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00119   Created:  22/11/96
00120   Purpose:  Provides a Bitmap Properties Dialog for Webster.
00121                 -Provides support for the entry of GIF animation delays\Restore on a per-frame basis.
00122                 
00123 ********************************************************************************************************/
00124 
00125 
00126 #define OPTOKEN_BMP_DLG _T("BmpDlg")
00127 
00128 class BmpDlg : public DialogOp
00129 {
00130     CC_DECLARE_DYNCREATE (BmpDlg)
00131 
00132 public: 
00133 
00134     BmpDlg();                                               // constructor                  
00135     static BOOL Init();                                     // Standard Setup Funcrion      
00136     BOOL InitDialog();
00137     virtual ~BmpDlg();                                      // Virtual destructor               
00138     static OpState  GetState(String_256*, OpDescriptor*);
00139     void Do(OpDescriptor*);                                                         
00140     BOOL  Create();                                         // Obtains resources to open dialog 
00141 
00142     static const UINT32 IDD;                                    // Dialog box id
00143     static const CDlgMode Mode;                             
00144 
00145     void UpdateInterpolationCheckbox();                     // 'interpolate when zoomed in' checkbox handler
00146     virtual MsgResult Message(Msg* Messgse);                // Message Handler      
00147     void DoWithParam(OpDescriptor*, OpParam* Param);
00148     static  void InvokeBmpDlg(BmpDlgParam* pBmpDlgParam);
00149     BmpDlgParam* CommitDialogValue();                       //Called after OK is pressed, sets control values.  
00150 
00151     static  BmpDlgParam*  pParam;                           // This will allow us to store our value for AnimDelay.
00152 
00153     void SetIsManyDisplayed(BOOL Value)     { m_IsManyDisplayed = Value; }
00154     BOOL GetIsManyDisplayed() const         { return m_IsManyDisplayed;  }
00155 
00156     void SetDelayChanged(BOOL value)        { m_HasDelayChanged = value; }
00157     BOOL GetDelayChanged() const            { return m_HasDelayChanged;  }
00158     
00159     void SetListDropped(BOOL value)         { m_ListDropped = value; }
00160     BOOL GetListDropped() const             { return m_ListDropped;  }
00161 
00162     void SetInterpolationChanged(BOOL value){ m_bInterpolationChanged = value; }
00163     BOOL GetInterpolationChanged() const    { return m_bInterpolationChanged;  }
00164 
00165 protected:
00166     BOOL m_HasDelayChanged;
00167     BOOL m_IsManyDisplayed;
00168     BOOL m_ListDropped;
00169     BOOL m_bInterpolationChanged;
00170     
00171 };
00172 
00173 /***************************************************************************************************************
00174 
00175     class BmpDlgParam : public OpParam
00176 
00177     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>  
00178     Created:    28/11/96
00179     Purpose:    This will allow data (for delay\Restore between frames in animation)
00180                 to be passed to and from the Bitmap Properties Dialog. 
00181     
00182 *****************************************************************************************************************/
00183 
00184 
00185 class BmpDlgParam : public OpParam
00186 {
00187 
00188     CC_DECLARE_DYNAMIC(BmpDlgParam)
00189 
00190 public:
00191     BmpDlgParam ()      {
00192                             m_Many = FALSE;
00193                             m_AnimDelay = 10; 
00194                             m_bInterpolation = TRUE;
00195                             m_SameColors = TRUE;
00196                             m_SameDimensions = TRUE;
00197                             m_MemoryUsed = "";
00198                             m_BitmapWidth = "";
00199                             m_BitmapHeight = "";
00200                             m_BitmapCols = "";
00201                             m_BitmapName = "";
00202                             m_BitmapFormat = "";
00203                             m_AreDelayValuesSame = TRUE;
00204                             m_HasDelayValueChanged = FALSE;
00205                             m_AreInterpolationValuesSame = TRUE;
00206                             m_HasInterpolationValueChanged = FALSE;
00207                             m_IsJPEG = FALSE;
00208                             m_SameFormat = TRUE;
00209                             m_SameRestoreTypes = TRUE;
00210                             m_RestoreType = GDM_LEAVE;
00211                             m_ManySelected = FALSE;
00212                             m_BitmapTranspType = "";
00213                             m_SameTranspType = TRUE;
00214                         };
00215 
00216 void SetSameColors (BOOL Value)                 { m_SameColors = Value; }
00217 BOOL GetSameColors() const                      { return m_SameColors;  }
00218 
00219 void SetSameDimensions (BOOL Value)             { m_SameDimensions = Value;  }
00220 BOOL GetSameDimensions () const                 { return m_SameDimensions;   }
00221 
00222 BOOL GetAreDelayValuesSame() const              { return m_AreDelayValuesSame;  } 
00223 void SetAreDelayValuesSame(BOOL Value)          { m_AreDelayValuesSame = Value; }
00224 
00225 BOOL GetHasDelayValueChanged () const           { return m_HasDelayValueChanged;   }
00226 void SetHasDelayValueChanged (BOOL Value)       { m_HasDelayValueChanged = Value;  }
00227 
00228 BOOL GetAreInterpolationValuesSame() const      { return m_AreInterpolationValuesSame;  } 
00229 void SetAreInterpolationValuesSame(BOOL Value)  { m_AreInterpolationValuesSame = Value; }
00230 
00231 BOOL GetHasInterpolationValueChanged () const   { return m_HasInterpolationValueChanged;   }
00232 void SetHasInterpolationValueChanged(BOOL Value){ m_HasInterpolationValueChanged = Value;  }
00233 
00234 void SetMany (BOOL Value)                       { m_Many = Value; }         
00235 BOOL GetMany () const                           { return m_Many;  }
00236 
00237 void SetIsJPEG(BOOL Value)                      { m_IsJPEG = Value;}
00238 BOOL GetIsJPEG() const                          { return m_IsJPEG; }
00239 
00240 BOOL GetSameFormat() const                      { return m_SameFormat;  }
00241 void SetSameFormat(BOOL Value)                  { m_SameFormat = Value; }
00242 
00243 void SetSameRestoreType(BOOL Value)             { m_SameRestoreTypes = Value; }
00244 BOOL GetSameRestoreType()                       { return m_SameRestoreTypes ; } 
00245 
00246 void        SetInterpolation(BOOL Value)        { m_bInterpolation = Value; }
00247 BOOL        GetInterpolation()                  { return m_bInterpolation ; }
00248 
00249 UINT32      GetAnimDelay () const               { return m_AnimDelay; }
00250 void        SetAnimDelay(UINT32 Delay)          { m_AnimDelay = Delay; }
00251 
00252 String_256& GetBitmapName()                     { return m_BitmapName; }
00253 void        SetBitmapName (String_256& Name)    { m_BitmapName = Name; }
00254 
00255 void SetSameTranspType(BOOL Value)              { m_SameTranspType = Value; }
00256 BOOL GetSameTranspType() const                  { return m_SameTranspType;  }
00257 
00258 String_256  GetBitmapTranspType()                   { return m_BitmapTranspType; }
00259 void        SetBitmapTranspType(String_256 Name)    { m_BitmapTranspType = Name; }
00260 
00261 String_256  GetBitmapFormat()                   { return m_BitmapFormat; }
00262 void        SetBitmapFormat (String Format)     { m_BitmapFormat = Format; }
00263 
00264 String_256  GetBitmapCols()                     { return m_BitmapCols; }
00265 void        SetBitmapCols(String_256 Cols)      { m_BitmapCols = Cols; }
00266 
00267 String_256& GetBitmapWidth()                    { return m_BitmapWidth;  }
00268 void        SetBitmapWidth(String_256& Width)   { m_BitmapWidth = Width; }
00269 
00270 String_256& GetBitmapHeight ()                      { return m_BitmapHeight;  }
00271 void        SetBitmapHeight(String_256& Height)     {m_BitmapHeight = Height; }
00272 
00273 String_256& GetMemoryUsed()                         { return m_MemoryUsed; }
00274 void        SetMemoryUSed(String_256& Memory)       { m_MemoryUsed = Memory; }
00275 
00276 BOOL        GetManySelected()   const               { return m_ManySelected; }
00277 void        SetManySelected(BOOL value)             { m_ManySelected = value; }
00278 
00279 GIFDisposalMethod   GetRestoreType() const                          { return m_RestoreType; }
00280 void                SetRestoreType(GIFDisposalMethod Type)          { m_RestoreType = Type; }
00281 
00282  KernelBitmap**     GetBitmapList() const                           { return m_pList; }
00283  void               SetBitmapList(KernelBitmap** pBitmap)           { m_pList = pBitmap; }
00284  
00285  UINT32             GetListSize() const         { return m_ListSize; }
00286  void               SetListSize(UINT32 n)           { m_ListSize = n;    }
00287  void               IncListSize(UINT32 n)           { m_ListSize += n;   }  
00288  void               DecListSize(UINT32 n)           { m_ListSize -= n;   } 
00289 
00290 protected:
00291 
00292     KernelBitmap**  m_pList;                // A list of Selected KernelBitmaps.
00293     UINT32          m_ListSize;             // The size of the Kernel Bitmap list.
00294     
00295     BOOL       m_bInterpolation;            // 'interpolate when zoomed in' tickbox
00296     UINT32     m_AnimDelay;                 // Delay between frames for Animations.
00297     String_256 m_BitmapName;                // Name of the selected bitmap. 
00298     String_256 m_BitmapFormat;              // Bitmap Format.
00299     String_256 m_BitmapCols;                // Colours in the bitmap.
00300     String_256 m_BitmapWidth;               // Dimensions(Width) of the selected bitmap.
00301     String_256 m_BitmapHeight;              // Dimensions(Height) of the selected bitmap.
00302     String_256 m_MemoryUsed;                // Size of the selected bitmap.
00303     String_256 m_BitmapTranspType;          // Transparency type
00304     GIFDisposalMethod m_RestoreType;
00305     
00306     BOOL m_Many;
00307     BOOL m_SameColors;
00308     BOOL m_SameDimensions;
00309     BOOL m_AreDelayValuesSame;
00310     BOOL m_HasDelayValueChanged;
00311     BOOL m_AreInterpolationValuesSame;
00312     BOOL m_HasInterpolationValueChanged;
00313     BOOL m_IsJPEG;
00314     BOOL m_SameFormat;
00315     BOOL m_SameRestoreTypes;
00316     BOOL m_SameTranspType;
00317     BOOL m_ManySelected;
00318 
00319 };
00320 
00321 #endif
00322 

Generated on Sat Nov 10 03:44:30 2007 for Camelot by  doxygen 1.4.4