1: <?php
  2:     // This file describes the various enumeration classes that are used throughout the Qforms layer
  3:     /**
  4:      * Contains the borders type-names that can be used in the CSS 'border' property of block-type elements
  5:      */
  6:     abstract class QBorderStyle {
  7:         /** No set border */
  8:         const NotSet = 'NotSet';
  9:         /** No border at all */
 10:         const None = 'none';
 11:         /** Border made of dots */
 12:         const Dotted = 'dotted';
 13:         /** BOrder made ofdashes */
 14:         const Dashed = 'dashed';
 15:         /** Solid line border */
 16:         const Solid = 'solid';
 17:         /** Double lined border */
 18:         const Double = 'double';
 19:         /** A 3D groove border */
 20:         const Groove = 'groove';
 21:         /** A 3D ridged border */
 22:         const Ridge = 'ridge';
 23:         /** A 3D inset border */
 24:         const Inset = 'inset';
 25:         /** A 3D outset border */
 26:         const Outset = 'outset';
 27:     }
 28: 
 29:     /**
 30:      * Contains the type of 'display' (CSS) style one can use for QControls
 31:      */
 32:     abstract class QDisplayStyle {
 33:         /** Hide the control */
 34:         const None = 'none';
 35:         /** Treat as a block element */
 36:         const Block = 'block';
 37:         /** Treat as an inline element */
 38:         const Inline = 'inline';
 39:         /** Treat as an inline-block element */
 40:         const InlineBlock = 'inline-block';
 41:         /** Display style not set. Browser will take care */
 42:         const NotSet = 'NotSet';
 43:     }
 44: 
 45:     /**
 46:      * Contains the text alignment CSS style options
 47:      */
 48:     abstract class QTextAlign {
 49:         /** Align the text left */
 50:         const Left = 'left';
 51:         /** Align the text right */
 52:         const Right = 'right';
 53:     }
 54: 
 55:     /**
 56:      * Class QRepeatDirection: Set the direction in which QRadioButtonList and QCheckBoxList will be repeated
 57:      */
 58:     abstract class QRepeatDirection {
 59:         /** Repeat Horizontally */
 60:         const Horizontal = 'Horizontal';
 61:         /** Repeat Vertically */
 62:         const Vertical = 'Vertical';
 63:     }
 64: 
 65:     /**
 66:      * Class QGridLines: Set the gridlines which have to be rendered for a QDataGrid. HTML5 no longer supports
 67:      * the "rules" attributes, so this is now handled in CSS by adding a particular class to the table. So
 68:      * the text below corresponds to class names added to the table.
 69:      */
 70:     abstract class QGridLines {
 71:         /** No gridlines to be rendered */
 72:         const None = '';
 73:         /** Horizontal gridlines but not vertical gridlines should be renderd */
 74:         const Horizontal = 'horizontalRules';
 75:         /** Vertical gridlines should be rendered but not horizontal ones */
 76:         const Vertical = 'verticalRules';
 77:         /** Both horizontal and verical gridlines have to be rendered */
 78:         const Both = 'horizontalRules verticalRules';
 79:     }
 80: 
 81:     /**
 82:      * Used usually for QListBoxes, it contains the 'multiple' option for select drop-down boxes
 83:      */
 84:     abstract class QSelectionMode {
 85:         /** Can select only one item. */
 86:         const Single = 'Single';
 87:         /** Can select more than one */
 88:         const Multiple = 'Multiple';
 89:         /** Selection mode not specified */
 90:         const None = 'None';
 91:     }
 92: 
 93:     /**
 94:      * The type of textboxes you can create. Most correspond to the input "type" attribute.
 95:      */
 96:     abstract class QTextMode {
 97:         /** Single line text inputs INPUT type="text" boxes */
 98:         const SingleLine = 'text';
 99:         /** Textareas */
100:         const MultiLine = 'MultiLine';
101:         /** Single line password inputs INPUT type="password" boxes */
102:         const Password = 'password';
103:         /** HTML5 Search box */
104:         const Search = 'search';
105:         /** HTML5 Number box */
106:         const Number = 'number';
107:         /** HTML5 email box.  */
108:         const Email = 'email';
109:         /** HTML5 telephone box.  */
110:         const Tel = 'tel';
111:         /** HTML5 url box.  */
112:         const Url = 'url';
113:     }
114: 
115:     /**
116:      * Class QHorizontalAlign: Horizontal alignment of a QControl (mostly the text of the control)
117:      */
118:     abstract class QHorizontalAlign {
119:         /** Not set */
120:         const NotSet = 'NotSet';
121:         /** Left align */
122:         const Left = 'left';
123:         /** Center align */
124:         const Center = 'center';
125:         /** Right align */
126:         const Right = 'right';
127:         /** Justify alignment for text */
128:         const Justify = 'justify';
129:     }
130: 
131:     /**
132:      * Class QVerticalAlign: Vertical alignment of a QControl
133:      */
134:     abstract class QVerticalAlign {
135:         /** Not set */
136:         const NotSet = 'NotSet';
137:         /** Pull to top (top alignment) */
138:         const Top = 'top';
139:         /** Center vertically */
140:         const Middle = 'middle';
141:         /** Push to bottom (bottom alignment) */
142:         const Bottom = 'bottom';
143:     }
144: 
145:     /**
146:      * Class QBorderCollapse: css "border-collapse" property for QDataGrid
147:      */
148:     abstract class QBorderCollapse {
149:         /** Not set */
150:         const NotSet = 'NotSet';
151:         /** Borders are not collapsed */
152:         const Separate = 'Separate';
153:         /** Collapse the borders */
154:         const Collapse = 'Collapse';
155:     }
156: 
157:     /**
158:      * Contains the display options for the QDateTimePicker control
159:      */
160:     abstract class QDateTimePickerType {
161:         /** Show only date */
162:         const Date = 'Date';
163:         /** Show date and time */
164:         const DateTime = 'DateTime';
165:         /** Show date and time with seconds */
166:         const DateTimeSeconds = 'DateTimeSeconds';
167:         /** Show only time (not the date) */
168:         const Time = 'Time';
169:         /** Show time with seconds (but not the date) */
170:         const TimeSeconds = 'TimeSeconds';
171:     }
172: 
173:     /**
174:      * Class QCalendarType: [Currently unused]
175:      */
176:     abstract class QCalendarType {
177:         /** Date only */
178:         const DateOnly = 'DateOnly';
179:         /** Date and time */
180:         const DateTime = 'DateTime';
181:         /** Date and time with seconds */
182:         const DateTimeSeconds = 'DateTimeSeconds';
183:         /** Time only */
184:         const TimeOnly = 'TimeOnly';
185:         /** Time with seconds */
186:         const TimeSecondsOnly = 'TimeSecondsOnly';
187:     }
188: 
189:     /**
190:      * Order in which the listboxes of QDateTimePicker are shown/rendered
191:      */
192:     abstract class QDateTimePickerFormat {
193:         /** Render Month, then Day, then Year */
194:         const MonthDayYear = 'MonthDayYear';
195:         /** Render Day first, then Month, then Year */
196:         const DayMonthYear = 'DayMonthYear';
197:         /** Render Year, then Month and then Day */
198:         const YearMonthDay = 'YearMonthDay';
199:     }
200: 
201:     /**
202:      * Modes of CrossScripting (XSS) attack preventions supported by QCubed
203:      */
204:     abstract class QCrossScripting {
205:         /** Let anything pass! */
206:         const Allow = 'Allow';
207:         /** Use the PHP's htmlentities function to convert characters */
208:         const HtmlEntities = 'HtmlEntities';
209:         /** QCubed's built-in (old/legacy) XSS-prevention technique */
210:         const Deny = 'Deny';
211:         /** QCubed's built-in (old/legacy) XSS-prevention technique */
212:         const Legacy = 'Legacy';
213:         /** Utilize the HTMLPurifier library to get the job done */
214:         const HTMLPurifier = 'HTMLPurifier';
215:     }
216: 
217:     /**
218:      * Type of callbacks supported by QCubed
219:      */
220:     abstract class QCallType {
221:         /** Server call backs which cause full refresh of the page */
222:         const Server = 'Server';
223:         /** Ajax Callbacks causing only the respective control to be refreshed */
224:         const Ajax = 'Ajax';
225:         /** No callback/undefined */
226:         const None = 'None';
227:     }
228: 
229:     /**
230:      * Categories of ajax response
231:      */
232:     abstract class QAjaxResponse {
233:         const Watcher = 'watcher';
234:         const Controls = 'controls';
235:         const CommandsHigh = 'commandsHigh';
236:         const CommandsMedium = 'commands';
237:         const CommandsLow = 'commandsLow';
238:         const RegC = 'regc'; // register control list
239:         const Html = 'html';
240:         const Value = 'value';
241:         const Id = 'id';
242:         const Attributes = 'attributes';
243:         const Css = 'css';
244:         const Close = 'winclose';
245:         const Location = 'loc';
246:         const Alert = 'alert';
247:         const StyleSheets = 'ss';
248:         const JavaScripts = 'js';
249:     }
250: 
251: 
252: /**
253:      * Contains options for the CSS 'position' property.
254:      */
255:     abstract class QPosition {
256:         /** Relative to the normal position */
257:         const Relative = 'relative';
258:         /** relative to the first parent element that has a position other than static */
259:         const Absolute = 'absolute';
260:         /** Relative to the browser Window */
261:         const Fixed = 'fixed';
262:         /** Will result in 'static' positioning. Is default */
263:         const NotSet = 'NotSet';
264:     }
265: 
266:     /**
267:      * Class QResizeHandleDirection: [Currently Unused]
268:      */
269:     abstract class QResizeHandleDirection {
270:         /** vertical resize */
271:         const Vertical = 'Vertical';
272:         /** horizontal resize */
273:         const Horizontal = 'Horizontal';
274:     }
275: 
276:     /**
277:      * Contains the CSS styles one can put for the cursor on a "div".
278:      */
279:     abstract class QCursor {
280:         /** Undefined */
281:         const NotSet = 'NotSet';
282:         /** Auto */
283:         const Auto = 'auto';
284:         /** Cell selection cursor (like one used in MS Excel) */
285:         const Cell = 'cell';
286:         /** Right click context menu icon */
287:         const ContextMenu = 'context-menu';
288:         /** The cursor indicates that the column can be resized horizontally */
289:         const ColResize = 'col-resize';
290:         /** Indicates something is going to be copied */
291:         const Copy = 'copy';
292:         /** Frag the damn enemy! */
293:         const CrossHair = 'crosshair';
294:         /** Whatever the browser wants to */
295:         const CursorDefault = 'default';
296:         /** Indicating that something can be grabbed (like hand control when reading a PDF) */
297:         const Grab = 'grab';
298:         /** Indicating that something is being grabbed (closed hand control when you drag a page in a PDF reader) */
299:         const Grabbing = 'grabbing';
300:         /** When you feel like running for your life! (the cursor usually is a '?' symbol) */
301:         const Help = 'help';
302:         /** When a dragged element cannot be dropped */
303:         const NoDrop = 'no-drop';
304:         /** No cursor at all - cursor gets invisible */
305:         const None = 'none';
306:         /** When an action is not allowed (can appear on disabled controls) */
307:         const NotAllowed = 'not-allowed';
308:         /** For links (usually creates the 'hand') */
309:         const Pointer = 'pointer';
310:         /** Indicates an event in progress */
311:         const Progress = 'progress';
312:         /** The icon to move things across */
313:         const Move = 'move';
314:         /** Creates the 'I' cursor usually seen over editable controls */
315:         const Text = 'text';
316:         /** The text editing (I) cursor rotated 90 degrees for editing vertically written text */
317:         const VerticalText = 'vertical-text';
318:         /** Hourglass */
319:         const Wait = 'wait';
320:         /** Magnification glass style zoom in (+) cursor */
321:         const ZoomIn = 'zoom-in';
322:         /** Magnification glass style zoom out (-) cursor */
323:         const ZoomOut = 'zoom-out';
324:         // Resize cursors
325:         /** Right edge resize */
326:         const EResize = 'e-resize';
327:         /** Horizontal bi-directional resize cursor */
328:         const EWResize = 'ew-resize';
329:         /** Top edge resize */
330:         const NResize = 'n-resize';
331:         /** Top-right resize */
332:         const NEResize = 'ne-resize';
333:         /** Bidirectional North-East or South-West resize */
334:         const NESWResize = 'nesw-resize';
335:         /** Bidirectional vertical resize cursor */
336:         const NSResize = 'ns-resize';
337:         /** Top-left resize */
338:         const NWResize = 'nw-resize';
339:         /** Bidirectional North-West or South-East resize cursor */
340:         const NWSEResize = 'nwse-resize';
341:         /** Row can be resized (you might see it when trying to alter height of a row in MS Excel) */
342:         const RowResize = 'row-resize';
343:         /** Bottom edge resize */
344:         const SResize = 's-resize';
345:         /** Bottom-right resize */
346:         const SEResize = 'se-resize';
347:         /** Bottom-left resize */
348:         const SWResize = 'sw-resize';
349:         /** Left edge resize */
350:         const WResize = 'w-resize';
351:     }
352: 
353:     /**
354:      * Contains/Defines Overflow CSS Styles to be used on QControls
355:      */
356:     abstract class QOverflow {
357:         /** Not set */
358:         const NotSet = 'NotSet';
359:         /** Decided by browser */
360:         const Auto = 'auto';
361:         /** Hide the content flowing outside boundary of the HTML element */
362:         const Hidden = 'hidden';
363:         /** The overflow is clipped, but a scroll-bar is added to see the rest of the content */
364:         const Scroll = 'scroll';
365:         /** The overflow is not clipped. It renders outside the element's box. This is default */
366:         const Visible = 'visible';
367:     }
368: 
369:     /**
370:      * Contains The 'CausesValidation' property options
371:      * used by buttons which take actions on Forms and controls.
372:      */
373:     abstract class QCausesValidation {
374:         /** Does not cause the validation */
375:         const None = false;
376:         /** Cause validation of all controls */
377:         const AllControls = true;
378:         /** Cause validation of the control, siblings and children */
379:         const SiblingsAndChildren = 2;
380:         /** Cause validation of siblings only */
381:         const SiblingsOnly = 3;
382:     }
383: 
384:     /**
385:      * Image Formats
386:      */
387:     abstract class QImageType {
388:         /** JPEG IMAGE */
389:         const Jpeg = 'jpg';
390:         /** PNG IMAGE */
391:         const Png = 'png';
392:         /** GIT Image */
393:         const Gif = 'gif';
394:         /** Animated GIF image */
395:         const AnimatedGif = 'AnimatedGif';
396:     }
397: 
398:     /**
399:      * Contains the FileAssetType for an uploaded type.
400:      * Is used in the upload controls
401:      */
402:     abstract class QFileAssetType {
403:         /** The file is an image */
404:         const Image = 1;
405:         /** File is a PDF Document */
406:         const Pdf = 2;
407:         /** File is a document */
408:         const Document = 3;
409:     }
410: 
411:     /**
412:      * Modes supported by model connectors for creation of new controls
413:      */
414:     abstract class QModelConnectorCreateType {
415:         /** Mode to create new or edit existing entry */
416:         const CreateOrEdit = 1;
417:         /** Mode to create a new entry/object if a record for requested ID was not found */
418:         const CreateOnRecordNotFound = 2;
419:         /** Mode to only edit an entry/object but without allowing creation of a new entry */
420:         const EditOnly = 3;
421:     }
422: 
423:     /**
424:      * Class QModelConnectorArgumentType
425:      * Model connectors are created by input received from multiple sources. This class enumerates the three.
426:      * Refer to any DataGrid connector class's AddEditLinkColumn method to see how this is used
427:      */
428:     abstract class QModelConnectorArgumentType {
429:         /** The Pathinfo supplied to the requested file */
430:         const PathInfo = 1;
431:         /** Via a querystring */
432:         const QueryString = 2;
433:         /** Via Post Data (not in use currently) */
434:         const PostData = 3;
435:     }
436: 
437:     /**
438:      * Class QFormGen
439:      * For specifying the FormGen param value. Declares what to generate for the given database object.
440:      */
441:     abstract class QFormGen {
442:         /** Generate both a control and a label */
443:         const Both = 'both';
444:         /** Generate only a label */
445:         const LabelOnly = 'label';
446:         /** Generate only a control */
447:         const ControlOnly = 'control';
448:         /** Do not generate anything for this database object */
449:         const None = 'none';
450:     }
451: 
452:     /**
453:      * Class QOrderedListType
454:      * For specifying how to number an ordered html list. Goes in the type attribute.
455:      */
456:     abstract class QOrderedListType {
457:         const Numbers = '1';
458:         const UppercaseLetters = 'A';
459:         const LowercaseLetters = 'a';
460:         const UppercaseRoman = 'I';
461:         const LowercaseRoman = 'i';
462:     }
463: 
464:     /**
465:      * Class QUnorderedListStyle
466:      * For specifying what to dislay in an unordered html list. Goes in the list-style-type style.
467:      */
468:     abstract class QUnorderedListStyle {
469:         const Disc = 'disc';
470:         const Circle = 'circle';
471:         const Square = 'square';
472:         const None = 'none';
473:     }