dlgtypes.h

Go to the documentation of this file.
00001 // $Id: dlgtypes.h 1386 2006-06-28 17:49:55Z 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 // The following are platform independant types which are required by the 
00101 // Dialog box system.
00102 
00103 // They may end up in Camtypes.h
00104 #ifndef INC_DLGTYPES
00105 #define INC_DLGTYPES
00106      
00107 class CCDC;
00108 class CCPaintDC;
00109 class DocRect;
00110 class DocCoord;
00111 
00112 class wxDialog;
00113 typedef wxWindow *CWindowID;        // Window ID, This will never be specified directly in the kernel. 
00114                                     // Therefore its type could be changed to the specific system type
00115                                     // doing away with the need to map between platform dependant and 
00116                                     // independant window ids. 
00117 
00118 typedef wxTreeItemId CTreeItemID;
00119 
00120 // The rest of the dialog types must be platform independant
00121                                     
00122 typedef UINT32 CDlgResID;            // Dialog resource ID
00123 typedef UINT32 CGadgetID;            // GadgetID
00124 
00125 
00126 // Device independent messages
00127 enum CDlgMessage { 
00128                     DIM_NONE = 0,
00129                     DIM_LFT_BN_CLICKED,            // Left button pressed
00130                     DIM_RGT_BN_CLICKED,            // Right button pressed
00131                     DIM_SELECTION_CHANGED,         // List selection changed
00132                     DIM_SELECTION_CHANGED_COMMIT,  // List selection changed commit
00133                                                    // (Double mouse click in windows)  
00134                     DIM_SELECTION_CANCELED,        // Previous list selection cancelled
00135                     DIM_OUT_OF_SPACE,              // List full
00136                     
00137                     DIM_LFT_BN_DOWN,               // Left button pressed down
00138                     DIM_LFT_BN_UP,                 // Left button released
00139                     DIM_RGT_BN_DOWN,               // Right button pressed down
00140                     
00141                     DIM_RGT_BN_UP,                 // Right button released
00142 // Removed by Simon 25/11, as they make debugging a pain, they are unlikely to be needed
00143 
00144                     
00145                     DIM_MOUSE_MOVE,                // Mouse move with button held down
00146                     DIM_MOUSE_DRAG,                // Normal mouse move
00147                     
00148                     DIM_TEXT_CHANGED,              // Text changed 
00149 
00150                     DIM_COMMIT,                    // Commit message, sent when left button pressed on
00151                                                    // IDOK button or enter pressed
00152                     DIM_SOFT_COMMIT,               // Soft commit messsage sent when right button pressed
00153                                                    // on IDOK button
00154                     DIM_CANCEL,                    // Escape pressed/left button click on CANCEL/
00155                                                    // Close dialog btn pressed
00156 
00157                     DIM_CREATE,                    // A DIM_CREATE mesage is sent after the dialogOp's
00158                                                    // window has been created. It is required by 
00159                                                    // DialogBarOps so that they can initialise their
00160                                                    // controls.
00161 
00162                     DIM_SLIDER_POS_CHANGING,        // Sent when a slider is being dragged
00163                                                     // so that things controlled by the
00164                                                     // slider can be updated interactively.
00165                                                     // DlgMsgParam = current slider pos.
00166                     DIM_SLIDER_POS_IDLE,            // REVISED CGS (9/8/2000)
00167                                                     // Sent when a slider has been dragged
00168                                                     // and the user has stopped moving the mouse,
00169                                                     // but has still got the mouse button down.
00170                                                     // this message can be used to redraw objects
00171                                                     // that are too complex to be updated interactively
00172                                                     // DlgMsgParam = current slider pos.
00173                     DIM_SLIDER_POS_SET,             // Sent when a slider has just been
00174                                                     // "dropped" so that things controlled
00175                                                     // by the slider can be upated after it
00176                                                     // has been dragged.
00177                                                     // DlgMsgParam = current slider pos.
00178 
00179                     DIM_SLIDER_POS_CANCELLED,       // Sent when a slide has just been
00180                                                     // cancelled so that things controlled
00181                                                     // by the slider can be updated
00182 
00183 
00184                     DIM_GRID_BUTTON_DOWN,           // sent when the user clicks on a "telephone keypad"
00185                                                     // custom control.  The numeric ID of the button
00186                                                     // clicked (numbered 1 - 9) is in DlgMsgParam
00187 
00188                     DIM_REDRAW,                     // Message sent to dialog that create render regions
00189                                                     // and draw into them. For a dialog to get one of these
00190                                                     // messages it must have a control in it of class
00191                                                     // cc_DialogDraw. Only this control will get the DIM_REDRAW
00192                                                     // messages. DlgMsgParam holds a pointer to a CCDC that
00193                                                     // can be used to create a render region.
00194                     DIM_BAR_DEATH,                  // similar to a cancel but this kills the op as well
00195 
00196                     DIM_FOCUS_LOST,                 // Sent when a gadget loses the input focus
00197                                                     // NOTE: This may not be implemented for all gadget types
00198                                                     // (search w/dlgmgr.cpp for DIM_FOCUS_LOST to check)
00199 
00200                     DIM_SET_ACTIVE,                 // Sent when a tabbed dialogue pane becomes active
00201 
00202                     DIM_FONTCHANGE,                 // Sent when Font is Installed or DeInstalled
00203 
00204                     DIM_LISTDROPPED,                // Sent when a list box is dropped ( e.g from a combo) 
00205 
00206                     DIM_TITLEFOCUSWARN,             // Sent when a dialogue has been moved and when a
00207                                                     // titlebar "mouseactivate" occurs. Used by the colour
00208                                                     // editor to bodge away the input focus when moved.
00209 
00210                     DIM_SET_FOCUS,                  // An ed field has just received focus
00211                     DIM_KILL_FOCUS,                 // An ed field has just lost focus
00212 
00213                     DIM_TIMER,                      // The requested timer has gone off.
00214 
00215                     DIM_SPINCONTROLUP,              // Special spin control message
00216                     DIM_SPINCONTROLDOWN,                // Special spin control message
00217 
00218                     DIM_DLG_MOVED,                  // the dialog has been moved
00219                     DIM_DLG_RESIZED,                // the dialog has been resized
00220 
00221                     DIM_COMMIT_BRUSH,                // special message sent by the brush dialog
00222 
00223                     DIM_MOUSEWHEEL_UP,              // mousewheel scroll upwards (away from user)
00224                     DIM_MOUSEWHEEL_DOWN,            // mousewheel scroll downwards (towards user)
00225                     DIM_MID_BN_DOWN,                // middle button down
00226                     DIM_MID_BN_UP,                  // middle button up
00227                     DIM_MID_BN_CLICKED,             // middle button pressed
00228 
00229                     DIM_CTRL_RESIZED,               // A control within the dialog has been resized
00230 
00231                             // Profile (bias-gain) - related messages.
00232                     DIM_PROFILE_CHANGED,            // A profile-changing message, sent by the profile dialog
00233                                                     // to a toolbar.
00234                     DIM_PROFILE_CHANGING,           // The same as DIM_PROFILE_CHANGED, but sent before profile finally
00235                                                     // was changed. E.g. slider sends DIM_PROFILE_CHANGING while the user moves
00236                                                     // the knob and DIM_PROFILE_CHANGED when he releases it (sets the filnal position).
00237                     DIM_PROFILE_CHANGEIDLE          // Changing the 
00238                 };  
00239 
00240 enum CDlgMode { MODAL, MODELESS };  // Mode of dialog box     
00241 
00242 // The EditGadgetType is used to specify those characters which should be accepted by a 
00243 // subclassed edit control. 
00244 enum EditGadgetType { UNIT_NUMERIC,     // only unit chars
00245                       INT_NUMERIC,      // only 0..9 chars
00246                       REAL_NUMERIC };   // only 0..9 and . chars
00247  
00248 // This type is used to distinguish between DIM_SELECTION_CHANGE messages sent because the user has
00249 // pressed ENTER in a combo, and COMMIT messages sent because the user has tabbed out of a combo.
00250 // It is contained in the DlgMsgParam field of a DialogMsg (see MSG.H).
00251 enum SelChangeMsgSubType
00252 {
00253     NO_COMMIT,
00254     TAB_COMMIT,             // "I have finished editing this field, but I might come back in a minute"
00255     ENTER_COMMIT            // "I really have finished editing this field, go ahead and do your stuff!"
00256 };
00257 
00258 
00259 
00260 // These structures are used to pass extra info in the DIM_REDRAW and mouse move/click
00261 // messages. Most of this info can only really be worked out in the oil layer, so the
00262 // individual dialog op can not really do it
00263 // Pointers to data structures are used to reduce dependencies. The pointers are only valid
00264 // under some circumstances - all other times they will be NULL.
00265 struct ReDrawInfoType
00266 {
00267     // This data is always available
00268     INT32    dx;            // The size of the window in Millipoints
00269     INT32    dy;
00270     INT32    Dpi;           // The DPI of the screen
00271 
00272     // This data is only available during processing of cc_DialogDraw redraws
00273     DocRect* pClipRect;     // The rectangle that has actually been invalidated
00274     CCPaintDC*   pDC;           // The DC to plot into
00275 
00276     // This data is only available when processing cc_DialogDraw mouse events
00277     DocCoord *pMousePos;    // The position of the mouse at this event
00278 };
00279 
00280 enum TabType
00281 {
00282     TABTYPE_TABS,
00283     TABTYPE_LIST,
00284     TABTYPE_CHOICE,
00285     TABTYPE_TREE,
00286     TABTYPE_TOOLBAR
00287 };
00288 
00289 #endif          
00290                                          

Generated on Sat Nov 10 03:48:23 2007 for Camelot by  doxygen 1.4.4