2017-04-25 14:41:48 +02:00
|
|
|
/*
|
|
|
|
|
* commands.h --
|
|
|
|
|
*
|
|
|
|
|
* Definitions for the commands module.
|
|
|
|
|
*
|
2020-05-23 23:13:14 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
* * Copyright (C) 1985, 1990 Regents of the University of California. *
|
|
|
|
|
* * Permission to use, copy, modify, and distribute this *
|
|
|
|
|
* * software and its documentation for any purpose and without *
|
|
|
|
|
* * fee is hereby granted, provided that the above copyright *
|
|
|
|
|
* * notice appear in all copies. The University of California *
|
|
|
|
|
* * makes no representations about the suitability of this *
|
|
|
|
|
* * software for any purpose. It is provided "as is" without *
|
|
|
|
|
* * express or implied warranty. Export of this software outside *
|
|
|
|
|
* * of the United States of America may require an export license. *
|
2017-04-25 14:41:48 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Needs to include: tiles.h, database.h
|
|
|
|
|
*
|
|
|
|
|
* rcsid $Header: /usr/cvsroot/magic-8.0/commands/commands.h,v 1.3 2009/01/19 15:43:03 tim Exp $
|
|
|
|
|
*/
|
|
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#ifndef _MAGIC__COMMANDS__COMMANDS_H
|
|
|
|
|
#define _MAGIC__COMMANDS__COMMANDS_H
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
#include "windows/windows.h"
|
|
|
|
|
#include "database/database.h"
|
2024-10-04 13:03:18 +02:00
|
|
|
#include "textio/txcommands.h" /* TxCommand */
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Name of default yank buffer
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define YANKBUFFERNAME "y"
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Manipulation of user-supplied "layer" masks.
|
|
|
|
|
* These may include both layers specifiable in a TileTypeMask,
|
|
|
|
|
* and pseudo-layers such as "subcells" and "labels".
|
|
|
|
|
*
|
|
|
|
|
* These are treated just like other TileTypes, except they
|
|
|
|
|
* reside in the uppermost TT_RESERVEDTYPES tile type numbers.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define L_CELL (TT_MAXTYPES-1) /* Subcell layer */
|
|
|
|
|
#define L_LABEL (TT_MAXTYPES-2) /* Label "layer" */
|
|
|
|
|
|
|
|
|
|
extern TileTypeBitMask CmdYMCell;
|
|
|
|
|
extern TileTypeBitMask CmdYMLabel;
|
|
|
|
|
extern TileTypeBitMask CmdYMAllButSpace;
|
|
|
|
|
|
|
|
|
|
/* --------------------- Global procedure headers --------------------- */
|
|
|
|
|
|
2024-10-04 13:03:11 +02:00
|
|
|
extern MagWindow *CmdGetEditPoint(Point *point, Rect *rect);
|
|
|
|
|
extern MagWindow *CmdGetRootPoint(Point *point, Rect *rect);
|
|
|
|
|
extern bool CmdWarnWrite(void);
|
|
|
|
|
extern bool CmdParseLayers(char *s, TileTypeBitMask *mask);
|
|
|
|
|
extern void CmdLabelProc(char *text, int font, int size, int rotate, int offx, int offy,
|
|
|
|
|
int pos, bool sticky, TileType type);
|
|
|
|
|
extern void CmdSetWindCaption(CellUse *newEditUse, CellDef *rootDef);
|
|
|
|
|
extern CellUse *CmdGetSelectedCell(Transform *pTrans);
|
|
|
|
|
extern bool CmdIllegalChars(char *string, char *illegal, char *msg);
|
|
|
|
|
extern TileType CmdFindNetProc(char *nodename, CellUse *use, Rect *rect, bool warn_not_found, bool *isvalid);
|
|
|
|
|
extern bool CmdCheckForPaintFunc(void);
|
2017-04-25 14:41:48 +02:00
|
|
|
|
2022-10-10 11:50:15 +02:00
|
|
|
/* C99 compat */
|
2024-10-04 13:03:11 +02:00
|
|
|
extern int cmdScaleCoord(MagWindow *w, char *arg, bool is_relative, bool is_x, int scale);
|
|
|
|
|
extern void FlatCopyAllLabels(SearchContext *scx, TileTypeBitMask *mask, int xMask, CellUse *targetUse);
|
|
|
|
|
extern bool cmdDumpParseArgs(char *cmdName, MagWindow *w, TxCommand *cmd, CellUse *dummy, SearchContext *scx);
|
|
|
|
|
extern void cmdFlushCell(CellDef *def, bool force_deref);
|
|
|
|
|
extern int cmdParseCoord(MagWindow *w, char *arg, bool is_relative, bool is_x);
|
|
|
|
|
extern void cmdSaveCell(CellDef *cellDef, char *newName, bool noninteractive, bool tryRename);
|
|
|
|
|
extern void CmdInit(void);
|
2022-10-10 11:50:15 +02:00
|
|
|
|
Extended the "property" command and modified the way that properties
are handled. Properties were previously only character strings,
which had become cumbersome because properties were being used for
mask hints and bounding boxes, with the necessity of constantly
converting values from string to integer and back, which can cause
a performance impact as well as just being messy. The main difference
to the command is the addition of an optional first keyword argument
for the property type, which can be "string", "integer", "dimension",
or "double". All types except "string" can consist of multiple
values. Multiple values can be specified as separate arguments on
the command line, so that, for example, values of FIXED_BBOX or
MASKHINTS_* no longer need to be quoted. In addition, this completes
the handling of "units" implemented recently, as all properties of
the type "dimension" can be entered in the current units, will display
in the current units, and will scale with the database.
2026-02-18 16:48:47 +01:00
|
|
|
extern void CmdDoProperty(CellDef *def, MagWindow *w, TxCommand *cmd, int argstart);
|
2024-10-04 13:03:11 +02:00
|
|
|
extern void CmdPaintEraseButton(MagWindow *w, Point *refPoint, bool isPaint, bool isScreen);
|
2022-10-10 11:50:15 +02:00
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#endif /* _MAGIC__COMMANDS__COMMANDS_H */
|