/usr/include/Wt/WGlobal is in libwt-dev 3.3.4+dfsg-6ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WGLOBAL_H_
#define WGLOBAL_H_
#include <Wt/WFlags>
/*! \file */
namespace Wt {
class EventSignalBase;
class JSlot;
class WAbstractArea;
class WAbstractSpinBox;
class WAbstractItemDelegate;
class WAbstractItemModel;
class WAbstractItemView;
class WAbstractMedia;
class WAbstractListModel;
class WAbstractProxyModel;
class WAbstractTableModel;
class WAbstractToggleButton;
class WAggregateProxyModel;
class WAccordionLayout;
class WAnimation;
class WAnchor;
class WApplication;
class WAudio;
class WBatchEditProxyModel;
class WBorder;
class WBorderLayout;
class WBoxLayout;
class WBreak;
class WBrush;
class WButtonGroup;
class WCalendar;
class WCanvasPaintDevice;
class WCheckBox;
class WCircleArea;
class WColor;
class WCombinedLocalizedStrings;
class WComboBox;
class WCompositeWidget;
class WCoreServer;
class WContainerWidget;
class WCssDecorationStyle;
class WCssRule;
class WCssStyleSheet;
class WCssTemplateRule;
class WCssTextRule;
class WCssTheme;
class WDate;
class WDateEdit;
class WDatePicker;
class WDateTime;
class WDateValidator;
class WDefaultLayout;
class WDefaultLoadingIndicator;
class WDialog;
class WDoubleSpinBox;
class WDoubleValidator;
class WDropEvent;
class WEnvironment;
class WEvent;
class WException;
class WFileResource;
class WFileUpload;
class WFitLayout;
class WFlashObject;
class WFont;
class WFormModel;
class WFormWidget;
class WGestureEvent;
class WGLWidget;
class WGoogleMap;
class WGridLayout;
class WGroupBox;
class WHBoxLayout;
class WMouseEvent;
class WIcon;
class WIconPair;
class WImage;
class WInPlaceEdit;
class WIntValidator;
class WInteractWidget;
class WIOService;
class WItemDelegate;
class WItemSelectionModel;
class WKeyEvent;
class WLabel;
class WLayout;
class WLayoutItem;
class WLength;
class WLengthValidator;
class WLineEdit;
class WLineF;
class WLink;
class WLocale;
class WLocalDateTime;
class WLoadingIndicator;
class WLocalizedStrings;
class WLogEntry;
class WLogger;
class WMatrix4x4;
class WMediaPlayer;
class WMemoryResource;
class WMenu;
class WMenuItem;
class WMessageBox;
class WMessageResourceBundle;
class WMessageResources;
class WModelIndex;
class WMouseEvent;
class WNavigationBar;
class WObject;
class WOverlayLoadingIndicator;
class WPaintDevice;
class WPaintedWidget;
class WPainter;
class WPainterPath;
class WPanel;
class WPdfImage;
class WPen;
class WPoint;
class WPointF;
class WPolygonArea;
class WPopupMenu;
class WPopupWidget;
typedef WMenuItem WPopupMenuItem;
class WProgressBar;
class WPushButton;
class WRadioButton;
class WRandom;
class WReadOnlyProxyModel;
class WRasterImage;
class WRectArea;
class WRectF;
class WRegExp;
class WRegExpValidator;
class WResource;
class WScrollArea;
class WScrollBar;
class WScrollEvent;
class WSelectionBox;
class WServer;
class WShadow;
class WSlider;
class WSocketNotifier;
class WSortFilterProxyModel;
class WSound;
class WSpinBox;
class WSplitButton;
class WStackedWidget;
class WStandardItem;
class WStandardItemModel;
class WStreamResource;
class WString;
class WStringListModel;
typedef class WMenuItem WSubMenuItem;
class WSuggestionPopup;
class WSvgImage;
class WTabWidget;
class WTable;
class WTableCell;
class WTableColumn;
class WTableRow;
class WTableView;
class WTemplate;
class WText;
class WTextArea;
class WTextEdit;
class WToolBar;
class WTheme;
class WTime;
class WTimer;
class WTouchEvent;
class WTransform;
class WTree;
class WTreeNode;
class WTreeTable;
class WTreeTableNode;
class WTreeView;
class WVBoxLayout;
class WValidationStatus;
class WValidator;
class WVectorImage;
class WVideo;
class WViewWidget;
class WVirtualImage;
class WVmlImage;
class WWebWidget;
class WWidget;
class WWidgetItem;
namespace Auth {
class AbstractPasswordService;
class AbstractUserDatabase;
class AuthModel;
class AuthService;
class AuthWidget;
class FacebookService;
class FormBaseModel;
class GoogleService;
class HashFunction;
class Identity;
class Login;
class LostPasswordWidget;
class OAuthService;
class PasswordHash;
class PasswordPromptDialog;
class PasswordService;
class PasswordStrengthValidator;
class PasswordVerifier;
class RegistrationModel;
class RegistrationWidget;
class Token;
class UpdatePasswordWidget;
class User;
namespace Dbo {
template <class UserType> class AuthInfo;
template <class DboType> class UserDatabase;
}
}
namespace Chart {
class SeriesIterator;
class WAbstractChart;
class WAxis;
class WCartesianChart;
class WChartPalette;
class WDataSeries;
class WPieChart;
class WStandardPalette;
}
namespace Dbo {
struct dbo_default_traits;
class Call;
class Exception;
class FieldInfo;
class FixedSqlConnectionPool;
class ObjectNotFoundException;
class SaveBaseAction;
class Session;
class SqlConnection;
class SqlConnectionPool;
class SqlStatement;
class StaleObjectException;
class Transaction;
template <class C> class collection;
template <class C> struct dbo_traits;
template <typename V, class Enable> struct sql_value_traits;
template <class C> class ptr;
template <class Result, typename BindStrategy> class Query;
template <class Result> class QueryModel;
namespace backend {
class Firebird;
class Postgres;
class Sqlite3;
}
}
namespace Http {
class Client;
class Message;
class Request;
class Response;
class ResponseContinuation;
class UploadedFile;
class WtClient;
}
namespace Json {
class Array;
class Object;
class TypeException;
class Value;
}
namespace Mail {
class Client;
class Mailbox;
class Message;
}
namespace Payment {
class Address;
class Customer;
class Money;
class Order;
class OrderItem;
class PayPalExpressCheckout;
class PayPalService;
class Result;
class Approval;
}
namespace Render {
class WPdfRenderer;
}
/*! \brief Enumeration that indicates a direction.
*/
enum Orientation { Horizontal = 0x1, //!< Horizontal
Vertical = 0x2 //!< Vertical
};
W_DECLARE_OPERATORS_FOR_FLAGS(Orientation)
/*! \brief Enumeration that indicates a standard button.
*
* Multiple buttons may be specified by logically or'ing these values
* together, e.g.
* \code
* Ok | Cancel
* \endcode
*
* \sa WMessageBox
*/
enum StandardButton {
NoButton = 0x00, //!< No button
Ok = 0x01, //!< An OK button.
Cancel = 0x02, //!< A Cancel button.
Yes = 0x04, //!< A Yes button.
No = 0x08, //!< A No button.
Abort = 0x10, //!< An Abort button.
Retry = 0x20, //!< A Retry button.
Ignore = 0x40, //!< An Ignore button.
YesAll = 0x80, //!< A Yes-to-All button.
NoAll = 0x100 //!< A No-to-All button.
};
W_DECLARE_OPERATORS_FOR_FLAGS(StandardButton)
/*! \brief Enumeration that indiciates a standard icon.
*
* \sa WMessageBox
*/
enum Icon {
NoIcon = 0, //!< No icon.
Information = 1, //!< An information icon.
Warning = 2, //!< A warning icon.
Critical = 3, //!< A critical icon.
Question = 4 //!< A question icon.
};
/*! \brief Enumeration that indicates how items may be selected.
*
* \sa WTreeView::setSelectionMode()
*/
enum SelectionMode { NoSelection = 0, //!< No selections
SingleSelection = 1, //!< Single selection only
ExtendedSelection = 3 //!< Multiple selection
};
/*! \brief Enumeration that indicates what is being selected.
*
* \sa WTreeView::setSelectionBehavior()
*/
enum SelectionBehavior { SelectItems = 0, //!< Select single items
SelectRows = 1 //!< Select only rows
/*, SelectColumns */
};
/*! \brief Enumeration that indicates how to change a selection.
*
* \sa WTreeView::select()
*/
enum SelectionFlag {
Select = 1, //!< Add to selection
Deselect = 2, //!< Remove from selection
ToggleSelect = 3, //!< Toggle in selection
ClearAndSelect = 4 //!< Clear selection and add single item
};
/*! \brief Enumeration that indicates a relative location.
*
* Values of CenterX, CenterY, and CenterXY are only valid for
* WCssDecorationStyle::setBackgroundImage()
*
* \sa WWidget::setMargin(const WLength& x, WFlags<Side> sides)
* \sa WWidget::setOffsets(const WLength& x, WFlags<Side> sides)
* \sa WWidget::setFloatSide(Side s)
* \sa WWidget::setClearSides(WFlags<Side> sides)
* \sa WContainerWidget::setPadding(const WLength& x, WFlags<Side> sides)
* \sa WCssDecorationStyle::setBackgroundImage()
*/
enum Side {
Top = 0x1, //!< Top side
Bottom = 0x2, //!< Bottom side
Left = 0x4, //!< Left side
Right = 0x8, //!< Right side
CenterX = 0x10, //!< Center horiziontally
CenterY = 0x20 //!< Center vertically
};
W_DECLARE_OPERATORS_FOR_FLAGS(Side)
/** \brief No side */
static const WFlags<Side> None = 0;
/** \brief (CenterX | CenterY) */
static const WFlags<Side> CenterXY = CenterX | CenterY;
/** \brief (Left | Right) */
static const WFlags<Side> Horizontals = Left | Right;
/** \brief (Top | Bottom) */
static const WFlags<Side> Verticals = Top | Bottom;
/** \brief All sides */
static const WFlags<Side> All = Top | Bottom | Left | Right;
/*! \brief Enumeration that specifies a horizontal or a vertical alignment.
*
* The vertical alignment flags are AlignBaseline, AlignSub, AlignSuper,
* AlignTop, AlignTextTop, AlignMiddle, AlignBottom and AlignTextBottom.
* The horizontal alignment flags are AlignLeft, AlignRight, AlignCenter
* and AlignJustify.
*
* When used with setVerticalAlignment(), this applies only
* to inline widgets and determines how to position itself on the
* current line, with respect to sibling inline widgets.
*
* When used with WTableCell::setContentAlignment(), this determines the
* vertical alignment of contents within the table cell.
*
* When used with WPainter::drawText(), this determines the horizontal and
* vertical alignment of the text with respect to the bounding rectangle.
*
* When used with WContainerWidget::setContentAlignment(), this specifies how
* contents should be aligned horizontally within the container.
*
* Not all values are applicable in all situations. The most commonly
* used values are AlignLeft, AlignCenter, AlignRight, AlignBottom,
* AlignMiddle and AlignTop.
*/
enum AlignmentFlag {
/*! \brief Align to the left
*/
AlignLeft=0x1,
/*! \brief Align to the right
*/
AlignRight=0x2,
/*! \brief Align horizontally in the center
*/
AlignCenter=0x4,
/*! \brief Justify left and right
*/
AlignJustify=0x8,
/*! \brief Align at baseline (default alignment).
*/
AlignBaseline=0x10,
/*! \brief Align below the baseline (as if subscript).
*/
AlignSub=0x20,
/*! \brief Align above the baseline (as if superscript).
*/
AlignSuper=0x40,
/*! \brief Align top of widget with top of tallest sibling widget.
*/
AlignTop=0x80,
/*! \brief Align top of widget with the top of the parent widget's font.
*/
AlignTextTop=0x100,
/*! \brief Align vertically the middle to the middle of the parent widget.
*/
AlignMiddle=0x200,
/*! \brief Align bottom of widget to the bottom of the lowest sigling widget.
*/
AlignBottom=0x400,
/*! \brief Align bottom of widget to the bottom of parent widget's font.
*/
AlignTextBottom=0x800
};
W_DECLARE_OPERATORS_FOR_FLAGS(AlignmentFlag)
/*! \brief Combination of all horizontal alignment flags */
static const WFlags<AlignmentFlag> AlignHorizontalMask
= AlignLeft | AlignRight | AlignCenter | AlignJustify;
/*! \brief Combination of all vertical alignment flags */
static const WFlags<AlignmentFlag> AlignVerticalMask
= AlignBaseline | AlignSub | AlignSuper | AlignTop | AlignTextTop
| AlignMiddle | AlignBottom | AlignTextBottom;
/*! \brief Enumeration that specifies the way text should be printed.
*
* \sa WPainter::drawText(const WRectF& rect, WFlags<AlignmentFlag> alignmentFlags, TextFlag textFlag, const WString& text)
*/
enum TextFlag {
TextSingleLine, //!< Text will be printed on just one line
TextWordWrap //!< Lines will break at word boundaries
};
/*! \brief Enumeration that specifies a layout mechanism for a widget.
*
* The layout mechanism determines how the widget positions itself relative
* to the parent or sibling widgets.
*
* \sa WWidget::setPositionScheme(PositionScheme scheme)
*/
enum PositionScheme {
/*! \brief Static position scheme.
*
* The widget is layed-out with other \link Wt::Static
* Static \endlink and \link Wt::Relative Relative \endlink
* sibling widgets, one after another.
*
* Inline widgets are layed out in horizontal lines (like text),
* wrapping around at the end of the line to continue on the next
* line. Block widgets are stacked vertically.
*
* Static widgets may also float to the left or right border,
* using setFloatSide().
*/
Static,
/*! \brief Relative position scheme.
*
* The widget is first layed out according to Static layout
* rules, but after layout, the widget may be offset relative to
* where it would be in a static layout, using setOffsets().
*
* Another common use of a Relative position scheme (even with no
* specified offsets) is to provide a new reference coordinate
* system for Absolutely positioned widgets.
*/
Relative,
/*! \brief Absolute position scheme.
*
* The widget is positioned at an absolute position
* with respect to the nearest ancestor widget that is either:
* <ul>
* <li> a WTableCell </li>
* <li> or has a position scheme that is \link Wt::Relative
* Relative\endlink or \link Wt::Absolute Absolute\endlink. </li>
* </ul>
*/
Absolute,
/*! \brief Fixed position scheme.
*
* The widget is positioned at fixed position with respect to
* the browser's view-pane.
*/
Fixed
};
/*! \brief Enumeration for a cursor style
*
* \sa WCssDecorationStyle::setCursor(), WAbstractArea::setCursor()
*/
enum Cursor {
ArrowCursor, //!< Arrow, CSS 'default' cursor
AutoCursor, //!< Cursor chosen by the browser, CSS 'auto' cursor.
CrossCursor, //!< Crosshair, CSS 'cross' cursor
PointingHandCursor, //!< Pointing hand, CSS 'pointer' cursor
OpenHandCursor, //!< Open hand, CSS 'move' cursor
WaitCursor, //!< Wait, CSS 'wait' cursor
IBeamCursor, //!< Text edit, CSS 'text' cursor
WhatsThisCursor //!< Help, CSS 'help' cursor
};
/*! \brief Enumeration that indicates a character encoding.
*
* Character encodings are used to represent characters in a stream of
* bytes.
*
* \relates WString
*/
enum CharEncoding {
/*! \brief Wt's default encoding
*
* Wt's global default encoding, as set through WString::setDefaultEncoding()
*
*/
DefaultEncoding,
/*! \brief The (server) system locale.
*
* Each byte represents a character, according to the locale
* of the server-side system.
*/
LocalEncoding,
/*! \brief UTF-8 unicode encoding.
*
* The byte stream represents unicode characters encoded using
* UTF-8.
*/
UTF8
};
/*! \brief Enumeration that indicates a pen style.
*
* \ingroup painting
*
* \relates WPen
*/
enum PenStyle {
NoPen, //!< Do not stroke
SolidLine, //!< Stroke with a solid line
DashLine, //!< Stroked with a dashed line
DotLine, //!< Stroke with a dotted line
DashDotLine, //!< Stroke with a dash dot line
DashDotDotLine //!< Stroke with a dash dot dot line
};
/*! \brief Enumeration that indicates how line end points are rendered
*
* \ingroup painting
*
* \relates WPen
*/
enum PenCapStyle {
FlatCap, //!< Flat ends
SquareCap, //!< Square ends (prolongs line with half width)
RoundCap //!< Round ends (terminates with a half circle)
};
/*! \brief Enumeration that indicates how line joins are rendered.
*
* \ingroup painting
*
* \relates WPen
*/
enum PenJoinStyle {
MiterJoin, //!< Pointy joins
BevelJoin, //!< Squared-off joins
RoundJoin //!< Rounded joins
};
/*! \brief Enumeration that indicates a fill style.
*
* \ingroup painting
*
* \relates WBrush
*/
enum BrushStyle {
NoBrush, //!< Do not fill
SolidPattern, //!< Fill with a solid color
GradientPattern //!< Fill with a color gradient
};
/*! \brief Enumeration that indicates a gradient style.
*
* \ingroup painting
*
* \relates WGradient
*/
enum GradientStyle {
LinearGradient,
RadialGradient
};
/*! \brief Enumeration that specifies where the target of an anchor should
* be displayed.
*
* \sa WAnchor::setTarget()
*/
enum AnchorTarget {
TargetSelf, //!< Show Instead of the application
TargetThisWindow,//!< Show in the top level frame of the application window
TargetNewWindow //!< Show in a separate new tab or window
};
/*! \brief Enumeration that indicates the text format.
*
* \sa WText::setTextFormat()
*/
enum TextFormat {
XHTMLText, //!< Format text as XSS-safe XHTML markup'ed text
XHTMLUnsafeText, //!< Format text as XHTML markup'ed text
PlainText //!< Format text as plain text
};
/*! \brief Enumeration for predefined colors
*
* \ingroup style
*/
enum GlobalColor {
/*! \brief Color white.
*/
white,
/*! \brief Color black.
*/
black,
/*! \brief Color red.
*/
red,
/*! \brief Color dark red.
*/
darkRed,
/*! \brief Color green.
*/
green,
/*! \brief Color dark green.
*/
darkGreen,
/*! \brief Color blue.
*/
blue,
/*! \brief Color dark blue.
*/
darkBlue,
/*! \brief Color cyan.
*/
cyan,
/*! \brief Color dark cyan.
*/
darkCyan,
/*! \brief Color magenta.
*/
magenta,
/*! \brief Color dark magenta.
*/
darkMagenta,
/*! \brief Color yellow.
*/
yellow,
/*! \brief Color dark yellow.
*/
darkYellow,
/*! \brief Color medium gray.
*/
gray,
/*! \brief Color dark gray.
*/
darkGray,
/*! \brief Color light gray.
*/
lightGray,
/*! \brief Color transparent.
*/
transparent
};
/*! \brief Enumeration for keyboard modifiers
*
* \sa WMouseEvent::modifiers(), WKeyEvent::modifiers()
*
* \ingroup signalslot
*/
enum KeyboardModifier {
NoModifier = 0x0, //!< No modifiers
ShiftModifier = 0x1, //!< Shift key pressed
ControlModifier = 0x2, //!< Control key pressed
AltModifier = 0x4, //!< Alt key pressed
MetaModifier = 0x8 //!< Meta key pressed ("Windows" or "Command" (Mac) key)
};
W_DECLARE_OPERATORS_FOR_FLAGS(KeyboardModifier)
/*! \brief Enumeration for key codes
*
* These are key codes that identify a key on a keyboard. All keys
* listed here can be identified across all browsers and (Western)
* keyboards. A %Key is returned by WKeyEvent::key(). If you want to
* identify a character, you should use the WKeyEvent::charCode()
* method instead.
*
* \sa WInteractWidget::keyWentDown, WInteractWidget::keyWentUp
*
* \ingroup signalslot
*/
enum Key {
Key_unknown = 0, //!< Unknown key.
Key_Enter = 13, //!< Enter key.
Key_Tab = 9, //!< Tab key.
Key_Backspace = 8, //!< Backspace key.
Key_Shift = 16, //!< Shift key.
Key_Control = 17, //!< Control key.
Key_Alt = 18, //!< Alt key.
Key_PageUp = 33, //!< Page up key.
Key_PageDown = 34, //!< Page down key.
Key_End = 35, //!< End key.
Key_Home = 36, //!< Home key.
Key_Left = 37, //!< Left arrow key.
Key_Up = 38, //!< Up arrow key.
Key_Right = 39, //!< Right arrow key.
Key_Down = 40, //!< Down arrow key.
Key_Insert = 45, //!< Insert key.
Key_Delete = 46, //!< Delete key.
Key_Escape = 27, //!< Escape key.
Key_F1 = 112, //!< F1 function key.
Key_F2 = 113, //!< F2 function key.
Key_F3 = 114, //!< F3 function key.
Key_F4 = 115, //!< F4 function key.
Key_F5 = 116, //!< F5 function key.
Key_F6 = 117, //!< F6 function key.
Key_F7 = 118, //!< F7 function key.
Key_F8 = 119, //!< F8 function key.
Key_F9 = 120, //!< F9 function key.
Key_F10 = 121, //!< F10 function key.
Key_F11 = 122, //!< F11 function key.
Key_F12 = 123, //!< F12 function key.
Key_Space = ' ', //!< Space
Key_A = 'A', //!< 'A' key
Key_B = 'B', //!< 'B' key
Key_C = 'C', //!< 'C' key
Key_D = 'D', //!< 'D' key
Key_E = 'E', //!< 'E' key
Key_F = 'F', //!< 'F' key
Key_G = 'G', //!< 'G' key
Key_H = 'H', //!< 'H' key
Key_I = 'I', //!< 'I' key
Key_J = 'J', //!< 'J' key
Key_K = 'K', //!< 'K' key
Key_L = 'L', //!< 'L' key
Key_M = 'M', //!< 'M' key
Key_N = 'N', //!< 'N' key
Key_O = 'O', //!< 'O' key
Key_P = 'P', //!< 'P' key
Key_Q = 'Q', //!< 'Q' key
Key_R = 'R', //!< 'R' key
Key_S = 'S', //!< 'S' key
Key_T = 'T', //!< 'T' key
Key_U = 'U', //!< 'U' key
Key_V = 'V', //!< 'V' key
Key_W = 'W', //!< 'W' key
Key_X = 'X', //!< 'X' key
Key_Y = 'Y', //!< 'Y' key
Key_Z = 'Z', //!< 'Z' key
Key_1 = '1', //!< '1' key
Key_2 = '2', //!< '2' key
Key_3 = '3', //!< '3' key
Key_4 = '4', //!< '4' key
Key_5 = '5', //!< '5' key
Key_6 = '6', //!< '6' key
Key_7 = '7', //!< '7' key
Key_8 = '8', //!< '8' key
Key_9 = '9', //!< '9' key
Key_0 = '0', //!< '0' key
};
/*! \brief Enumeration for the check state of a check box.
*
* \sa WCheckBox
*/
enum CheckState {
Unchecked, //!< Unchecked
PartiallyChecked, //!< Partially checked (for a tri-state checkbox)
Checked //!< Checked
};
/*! \brief Enumeration that indicates how to change a selection.
*
* \sa WPaintedWidget::update(), WPaintDevice::paintFlags()
*/
enum PaintFlag {
PaintUpdate = 0x1 //!< The canvas is not cleared, but further painted on.
};
W_DECLARE_OPERATORS_FOR_FLAGS(PaintFlag)
#ifndef WT_TARGET_JAVA
/*! \brief Enumeration that indicates a regular expression option.
*
* \sa WSortFilterProxyModel::setFilterOptions(), WRegExpValidator::setOptions()
*/
enum RegExpFlag {
MatchCaseInsensitive = 0x1 //!< Case insensitive matching
};
W_DECLARE_OPERATORS_FOR_FLAGS(RegExpFlag)
#else // WT_TARGET_JAVA
enum RegExpFlag { };
const int MatchCaseInsensitive = 0x1;
#endif // WT_TARGET_JAVA
/*! \brief Enumeration that indicates a %Wt entrypoint type.
*
* An entry point binds a behavior to a public URL. Only the wthttpd
* connector currently supports multiple entry points.
*/
enum EntryPointType {
/*! \brief Specifies a full-screen application.
*
* A full screen application manages the entire browser window and
* provides its own HTML page.
*
* \sa WServer::addEntryPoint(), WApplication::root()
*/
Application,
/*! \brief Specifies an application that manages one or more widgets.
*
* A widget set application is part of an existing HTML page. One or
* more HTML elements in that web page may be bound to widgets
* managed by the application.
*
* The application presents itself as a JavaScript file, and
* therefore should be embedded in the web page using a
* <script> tag, from within the <body> (since it needs
* access to the <body>).
*
* \note A WidgetSet application requires JavaScript support
*
* \sa WServer::addEntryPoint(), WApplication::bindWidget()
*/
WidgetSet,
/*! \brief Specifies a static resource.
*
* A static resource binds a WResource to a public URL, and is not bound
* to a specific session.
*
* \if cpp
* \sa WServer::addResource()
* \elseif java
* @see WtServlet#addResource(WResource r, String path)
* \endif
*/
StaticResource
};
/*! \brief Enum for internal use.
*/
enum RenderFlag {
RenderFull = 0x1,
RenderUpdate = 0x2
};
W_DECLARE_OPERATORS_FOR_FLAGS(RenderFlag)
/*! \brief Flags that specify how to match two values.
*
* Except when MatchExactly, the lexical matching is done (by comparing
* string representations of the value with the query). This is by default
* case insensitive, unless MatchCaseSensitive is OR'ed.
*
* \ingroup modelview
*/
enum MatchFlag {
MatchExactly = 0x0, //!< Same type and value
MatchStringExactly = 0x1, //!< Lexical match
MatchStartsWith = 0x2, //!< Match start with query
MatchEndsWith = 0x3, //!< Match end with query
MatchRegExp = 0x4, //!< Regular expression match
MatchWildCard = 0x5, //!< Wildcard match
MatchCaseSensitive = 0x10,//!< Case sensitive
MatchWrap = 0x20 //!< Wrap around whole model
};
W_DECLARE_OPERATORS_FOR_FLAGS(MatchFlag)
/*! \brief Type part of MatchFlags */
static const WFlags<MatchFlag> MatchTypeMask =
MatchExactly | MatchStringExactly | MatchStartsWith | MatchEndsWith |
MatchRegExp | MatchWildCard;
/*! \brief Flags that indicate table header options
*
* \sa WAbstractItemModel::headerFlags()
*
* \ingroup modelview
*/
enum HeaderFlag {
/*! \brief Flag that indicates that the column can be expanded.
*
* \sa WAbstractItemModel::expandColumn()
*/
ColumnIsCollapsed = 0x1,
/*! \brief Flag that indicates that the column was expanded to the left.
*
* \sa WAbstractItemModel::collapseColumn()
*/
ColumnIsExpandedLeft = 0x2,
/*! \brief Flag that indicates that the column was expanded to the right.
*
* \sa WAbstractItemModel::collapseColumn()
*/
ColumnIsExpandedRight = 0x4,
/*! \brief Flag that indicates that the header can be checked.
*/
HeaderIsUserCheckable = 0x8,
/*! \brief Flag that indicates that the item has three states.
*
* When set, Wt::CheckStateRole data is of type Wt::CheckState
*/
HeaderIsTristate = 0x10,
/*! \brief Flag that indicates that the item text (DisplayRole, ToolTipRole)
* is HTML
*/
HeaderIsXHTMLText = 0x40
};
W_DECLARE_OPERATORS_FOR_FLAGS(HeaderFlag)
/*! \brief Enumeration that indicates a meta header type.
*
* \sa WApplication::addMetaHeader()
*/
enum MetaHeaderType {
MetaName, //!< Of the form <meta name=... content=... >
MetaProperty, //!< Of the form <meta property=... content=... >
MetaHttpHeader //!< Of the form <meta http-equiv=... content=... >
};
/*! \brief An enumeration describing an event's type.
*
* \sa WEvent::eventType()
*/
enum EventType {
OtherEvent, //!< An event which is not user- or timer-initiated
UserEvent, //!< A user-initiated event
TimerEvent, //!< A timer-initiated event
ResourceEvent //!< An event which is a resource request
};
/*! \brief An enumeration describing a layout direction.
*/
enum LayoutDirection {
LeftToRight, //!< Left-to-Right (Western and other languages)
RightToLeft //!< Right-to-Left (Many Middle Eastern and Arabic languages)
};
enum WebWriteEvent {
WriteCompleted, // Write was successful
WriteError // Write failed
};
enum WebReadEvent {
ReadError, // Read failed
ReadMessage, // Read a WebSocket message
ReadPing // Read Ping message
};
}
#endif // WGLOBALS_H_
|