1/* 2 * Author: William Chia-Wei Cheng (bill.cheng@acm.org) 3 * 4 * Copyright (C) 2001-2009, William Chia-Wei Cheng. 5 * 6 * This file may be distributed under the terms of the Q Public License 7 * as defined by Trolltech AS of Norway and appearing in the file 8 * LICENSE.QPL included in the packaging of this file. 9 * 10 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 11 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 13 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 14 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 16 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * @(#)$Header: /mm2/home/cvs/bc-src/tgif/select.e,v 1.7 2011/05/16 16:21:59 william Exp $ 19 */ 20 21#ifndef _SELECT_E_ 22#define _SELECT_E_ 23 24extern int selLtX, selLtY, selRbX, selRbY; 25extern int selObjLtX, selObjLtY, selObjRbX, selObjRbY; 26extern int selNoLockLtX, selNoLockLtY, selNoLockRbX, selNoLockRbY; 27extern int selNoLockObjLtX, selNoLockObjLtY; 28extern int selNoLockObjRbX, selNoLockObjRbY; 29extern int numObjSelected; 30extern int numObjLocked; 31extern struct SelRec * topSel, * botSel; 32extern struct VSelRec * topVSel, * botVSel; 33 34#ifdef _INCLUDE_FROM_SELECT_C_ 35#undef extern 36#define extern 37#endif /*_INCLUDE_FROM_SELECT_C_*/ 38 39extern int GetObjCurved ARGS_DECL((struct ObjRec *)); 40 41extern struct SelRec *SelectThisObject ARGS_DECL((struct ObjRec *)); 42 43extern int CountSelectedVertices ARGS_DECL((void)); 44extern void CalcBBox ARGS_DECL((int X1, int Y1, int X2, int Y2, 45 int *LtX, int *LtY, int *RbX, int *RbY)); 46extern void CalcVertexBBox ARGS_DECL((int *LtX, int *LtY, int *RbX, 47 int *RbY)); 48extern void UnSelNonVertexObjs ARGS_DECL((int HighLight, 49 int NoLockedObjOnly)); 50extern void FreeTopSel ARGS_DECL((void)); 51extern void JustFreeSel ARGS_DECL((struct SelRec *pTopSel, 52 struct SelRec *pBotSel)); 53extern void UnlinkSel ARGS_DECL((struct SelRec *pSel, 54 struct SelRec **ppTopSel, 55 struct SelRec **ppBotSel)); 56extern struct SelRec *FindObjInSel ARGS_DECL((struct ObjRec *pObj, 57 struct SelRec *pTopSel, 58 struct SelRec *pBotSel)); 59extern int PrependObjToSel ARGS_DECL((struct ObjRec *pObj, 60 struct SelRec **ppTopSel, 61 struct SelRec **ppBotSel)); 62extern struct SelRec *AddObjIntoSel ARGS_DECL((struct ObjRec *pObj, 63 struct SelRec *pPrevSel, 64 struct SelRec *pNextSel, 65 struct SelRec **ppTopSel, 66 struct SelRec **ppBotSel)); 67extern void JustRemoveAllVSel ARGS_DECL((void)); 68extern void RemoveAllSel ARGS_DECL((void)); 69extern struct AttrRec * FindObjAttrWithName ARGS_DECL((struct ObjRec *ObjPtr, 70 char *AttrName)); 71extern struct ObjRec * FindAnObj ARGS_DECL((int XOff, int YOff, 72 struct ObjRec **OwnerObj, 73 struct ObjRec **ConnectObj, 74 char *ObjName)); 75extern struct SelRec * AlreadySelected ARGS_DECL((struct ObjRec *)); 76extern void AddSel ARGS_DECL((struct SelRec *Prev, struct SelRec *Next, 77 struct SelRec *)); 78extern void AddNewSelObj ARGS_DECL((struct ObjRec *)); 79extern void ExpandCurSelBBoxes ARGS_DECL((struct ObjRec *)); 80extern void UpdSelBBox ARGS_DECL((void)); 81extern void SelBox ARGS_DECL((Window, GC, int X1, int Y1, int X2, int Y2)); 82extern void Select ARGS_DECL((XEvent *)); 83extern struct AttrRec * FindFileAttrWithName ARGS_DECL((char *AttrName)); 84extern struct AttrRec * FindAttrWithName ARGS_DECL((struct ObjRec *, 85 char *AttrName, 86 struct ObjRec **)); 87extern struct AttrRec * ValidAttrArg ARGS_DECL((char *CPtr, struct ObjRec *, 88 char **NewCPtr)); 89extern int DoTeleport ARGS_DECL((struct AttrRec *)); 90extern int DoPageTeleport ARGS_DECL((struct AttrRec *, int ByPageName)); 91extern void DoExecLoop ARGS_DECL((struct ObjRec *, struct AttrRec *)); 92extern void Teleport ARGS_DECL((XButtonEvent *)); 93extern void SelAllObj ARGS_DECL((int HighLight, int ignore_slideshow)); 94extern void JustMoveSelToTop ARGS_DECL((void)); 95extern void MoveSelToTop ARGS_DECL((void)); 96extern void MoveSelToBot ARGS_DECL((void)); 97extern void DelAllSelObj ARGS_DECL((void)); 98extern void GroupSingleObj ARGS_DECL((int ForcePromoteAttrs)); 99extern void GroupSelObj ARGS_DECL((int highlight, int record_cmd, 100 int redraw)); 101extern void SelectTopObj ARGS_DECL((void)); 102 103#ifdef _INCLUDE_FROM_SELECT_C_ 104#undef extern 105#ifndef _NO_RECURSIVE_EXTERN 106#define extern extern 107#endif /* ~_NO_RECURSIVE_EXTERN */ 108#endif /*_INCLUDE_FROM_SELECT_C_*/ 109 110#endif /*_SELECT_E_*/ 111