sgline2.h

Go to the documentation of this file.
00001 // $Id: sgline2.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 
00100     sgline2.h
00101 
00102     This header contains declarations of the various classes derived from
00103     LineAttrItem, as used in the line-attributes gallery.
00104 */
00105 
00106 #ifndef SGLINE2_H
00107 #define SGLINE2_H
00108 
00109 #include "sgline.h"
00110 //#include "attr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00111 
00112 
00113 /********************************************************************************************
00114 >   class LineWidthItem : public LineAttrItem
00115 
00116     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00117     Created:    10/4/95
00118     Purpose:    Represents a line-width user-interface item within the line gallery.
00119     SeeAlso:    -
00120 ********************************************************************************************/
00121 
00122 class LineWidthItem : public LineAttrItem
00123 {
00124 public:
00125     // Creation & destruction.
00126     LineWidthItem(double nPointWidth, const String& strDescription);
00127 
00128 private:
00129     // Overridables.
00130     virtual void SetAttributes(RenderRegion* pRegion) const;
00131     virtual NodeAttribute* CreateNewAttribute(BOOL fIsAdjust) const;
00132     virtual MILLIPOINT GetWidth() const;
00133     virtual CCRuntimeClass** GetAttribRuntimeClasses() const;
00134     virtual BOOL IsEqualValueToAny(NodeAttribute** ppOtherAttribs) const;
00135 
00136     // Data members.
00137     MILLIPOINT  m_nWidth;
00138 };
00139 
00140 
00141 
00142 /********************************************************************************************
00143 >   class LineDashItem : public LineAttrItem
00144 
00145     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00146     Created:    10/4/95
00147     Purpose:    Represents a line dash-pattern user-interface item within the line gallery.
00148     SeeAlso:    -
00149 ********************************************************************************************/
00150 
00151 class LineDashItem : public LineAttrItem
00152 {
00153 public:
00154     // Creation & destruction.
00155     LineDashItem(StockDash nDashType, const String& strDescription);
00156 
00157 private:
00158     // Overridables.
00159     virtual void SetAttributes(RenderRegion* pRegion) const;
00160     virtual NodeAttribute* CreateNewAttribute(BOOL fIsAdjust) const;
00161     virtual MILLIPOINT GetHeight() const;
00162     virtual CCRuntimeClass** GetAttribRuntimeClasses() const;
00163     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00164 
00165     // Data members.
00166     StockDash   m_nDashType;
00167 };
00168 
00169 
00170 
00171 /********************************************************************************************
00172 >   class LineArrowItem : public LineAttrItem
00173 
00174     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00175     Created:    10/4/95
00176     Purpose:    Class to represent a arrowhead/tail user-interface item within the
00177                 line gallery.
00178     SeeAlso:    -
00179 ********************************************************************************************/
00180 
00181 class LineArrowItem : public LineAttrItem
00182 {
00183 public:
00184     // Creation & destruction.
00185     LineArrowItem(StockArrow nArrowType, double fpScale, const String& strDescription);
00186 
00187 protected:
00188     // Implementation.
00189     virtual void SetAttributes(RenderRegion* pRegion) const;
00190     virtual void DrawItem(RenderRegion* pRegion, const DocRect& drBounds) const;
00191     virtual NodeAttribute* CreateNewAttribute(BOOL fIsAdjust) const;
00192     virtual MILLIPOINT GetWidth() const;
00193     virtual MILLIPOINT GetHeight() const;
00194     virtual MILLIPOINT GetHorzGap() const;
00195     virtual MILLIPOINT GetVertGap() const;
00196     virtual CCRuntimeClass** GetAttribRuntimeClasses() const;
00197     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00198 
00199     // Override this to return TRUE if your item is a start arrow, FALSE if it is an
00200     // end-arrow.
00201     virtual BOOL IsStartArrow() const;
00202 
00203     // Data members.
00204     ArrowRec  m_arArrow;
00205     BOOL      m_fCentred;
00206 
00207 protected:
00208     // The base class returns TRUE, so that an item of this type will auto-close the gallery
00209     // when CTRL-double-clicked. However, this derived class (e.g. arrowheads) overrides
00210     // this to stop the gallery from auto-closing when a ctrl-double-click occurs.
00211     virtual BOOL ShouldCloseOnDoubleClick(void);
00212 };
00213 
00214 
00215 
00216 /********************************************************************************************
00217 >   class LineNoArrowItem : public LineArrowItem
00218 
00219     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00220     Created:    19/4/95
00221     Purpose:    Class to represent a no-arrowhead/tail user-interface item within the
00222                 line gallery.  Only used as a base class for LineNoStartArrowItem and
00223                 LineNoEndArrowItem
00224     SeeAlso:    -
00225 ********************************************************************************************/
00226 
00227 class LineNoArrowItem : public LineArrowItem
00228 {
00229 protected:
00230     LineNoArrowItem(const String& strDescription);
00231 
00232 private:
00233     virtual MILLIPOINT GetWidth() const;
00234     virtual MILLIPOINT GetHeight() const;
00235     virtual MILLIPOINT GetVertGap() const;
00236     virtual void SetAttributes(RenderRegion* pRegion) const;
00237     virtual void DrawItem(RenderRegion* pRegion, const DocRect& drBounds) const;
00238 };
00239 
00240 
00241 
00242 /********************************************************************************************
00243 >   class LineNoStartArrowItem : public LineNoArrowItem
00244 
00245     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00246     Created:    19/4/95
00247     Purpose:    Class to represent a no-start-arrowhead/tail user-interface item within the
00248                 line gallery.
00249     SeeAlso:    -
00250 ********************************************************************************************/
00251 
00252 class LineNoStartArrowItem : public LineNoArrowItem
00253 {
00254 public:
00255     LineNoStartArrowItem(const String& strDescription);
00256 
00257 private:
00258     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00259     virtual BOOL IsStartArrow() const;
00260 };
00261 
00262 
00263 
00264 /********************************************************************************************
00265 >   class LineNoEndArrowItem : public LineNoArrowItem
00266 
00267     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00268     Created:    19/4/95
00269     Purpose:    Class to represent a no-start-arrowhead/tail user-interface item within the
00270                 line gallery.
00271     SeeAlso:    -
00272 ********************************************************************************************/
00273 
00274 class LineNoEndArrowItem : public LineNoArrowItem
00275 {
00276 public:
00277     LineNoEndArrowItem(const String& strDescription);
00278 
00279 private:
00280     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00281     virtual BOOL IsStartArrow() const;
00282 };
00283 
00284 
00285 
00286 /********************************************************************************************
00287 >   class LineCapItem : public LineAttrItem
00288 
00289     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00290     Created:    10/4/95
00291     Purpose:    Represents a line-cap user-interface item within the line gallery.
00292     SeeAlso:    -
00293 ********************************************************************************************/
00294 
00295 class LineCapItem : public LineAttrItem
00296 {
00297 public:
00298     // Creation & destruction.
00299     LineCapItem(LineCapType nCapType, const String& strDescription);
00300 
00301 private:
00302     // Implementation.
00303     virtual void SetAttributes(RenderRegion* pRegion) const;
00304     virtual NodeAttribute* CreateNewAttribute(BOOL fIsAdjust) const;
00305     virtual CCRuntimeClass** GetAttribRuntimeClasses() const;
00306     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00307 
00308     // Data members.
00309     LineCapType m_nCapType;
00310 };
00311 
00312 
00313 
00314 /********************************************************************************************
00315 >   class LineJoinTypeItem : public LineAttrItem
00316 
00317     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00318     Created:    10/4/95
00319     Purpose:    Represents a line-join user-interface item within the line gallery.
00320     SeeAlso:    -
00321 ********************************************************************************************/
00322 
00323 class LineJoinTypeItem : public LineAttrItem
00324 {
00325 public:
00326     // Creation & destruction.
00327     LineJoinTypeItem(JointType nJoinType, const String& strDescription);
00328 
00329 private:
00330     // Overridables.
00331     virtual void SetAttributes(RenderRegion* pRegion) const;
00332     virtual void DrawItem(RenderRegion* pRegion, const DocRect& drBounds) const;
00333     virtual NodeAttribute* CreateNewAttribute(BOOL fIsAdjust) const;
00334     virtual CCRuntimeClass** GetAttribRuntimeClasses() const;
00335     virtual BOOL IsEqualValueToAny(NodeAttribute** pOtherAttribs) const;
00336 
00337     // Data members.
00338     JointType   m_nJoinType;
00339 };
00340 
00341 #endif  // !SGLINE2_H

Generated on Sat Nov 10 03:46:57 2007 for Camelot by  doxygen 1.4.4