flags.h

Go to the documentation of this file.
00001 /*
00002   libwt - Vassilis Virvilis Toolkit - a widget library
00003   Copyright (C) 2006 Vassilis Virvilis <vasvir2@fastmail.fm>
00004  
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009   
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014   
00015   You should have received a copy of the GNU Lesser General Public
00016   License along with this library; if not, write to the
00017   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018   Boston, MA  02111-1307, SA.
00019 */
00020 
00021 #ifndef WT_FLAGS_H
00022 #define WT_FLAGS_H
00023 
00024 #include <SDL/SDL_keysym.h>
00025 
00026 #include <wt/enum.h>
00027 
00028 namespace Wt {
00029 
00030 typedef enum {
00031     AlignAuto = 0,
00032     AlignLeft = 1 << 0,
00033     AlignRight = 1 << 1,
00034     AlignHCenter = 1 << 2,
00035     AlignJustify = 1 << 3,
00036 
00037     AlignTop = 1 << 4,
00038     AlignBottom = 1 << 5,
00039     AlignVCenter = 1 << 6,
00040 
00041     AlignCenter = AlignHCenter | AlignVCenter,
00042 
00043     AlignHorizontal_Mask = (AlignJustify << 1) - 1,
00044     AlignVertical_Mask = (AlignVCenter << 1) - 1 & ~AlignHorizontal_Mask
00045 } AlignmentFlags;
00046 
00047 class W : public Enum<W> {
00048 public:
00049     //! \name Widget properties
00050     //@{
00051     static const Member PaintUnclipped;
00052     static const Member NoAutoErase;
00053     //@}
00054     //! \name Winodw properties
00055     //@{
00056     static const Member DestructiveClose;
00057     static const Member ShowModal;
00058     //@}
00059     //! \name Winodw customization properties
00060     //@{
00061     static const Member Style_Customize;
00062     static const Member Style_StaysOnTop;
00063     static const Member Style_NormalBorder;
00064     static const Member Style_DialogBorder;
00065     static const Member Style_NoBorder;
00066     static const Member Style_Title;
00067     //static const Member Style_SysMenu;
00068     //static const Member Style_Minimize;
00069     //static const Member Style_Maximize;
00070     //static const Member Style_MinMax;
00071     static const Member Style_Dialog;
00072     static const Member Type_Dialog;
00073     static const Member Type_Popup;
00074     //@}
00075     //! \name Pixmap properties
00076     //@{
00077     static const Member SWSurface;
00078     static const Member HWSurface;
00079     static const Member HWPalette;
00080     static const Member HWAccel;
00081     static const Member DefaultPixmapFlags;
00082     static const Member PixmapMask;
00083     //! \name Root Display properties
00084     //@{
00085     static const Member AsyncBlit;
00086     static const Member AnyFormat;
00087     static const Member DoubleBuffer;
00088     static const Member FullScreen;
00089     static const Member OpenGL;
00090     static const Member OpenGLBlit;
00091     static const Member Resizable;
00092     static const Member NoFrame;
00093     static const Member DefaultDisplayPixmapFlags;
00094     static const Member DisplayPixmapMask;
00095     //@}
00096     //@}
00097 };
00098 
00099 typedef enum {
00100     Unscaled = 0,
00101     Scaled = 1 << 0,
00102     Tiled = 1 << 1
00103 } BackgroundImageFlags;
00104 
00105 typedef enum {
00106     NoButton = 0,
00107     LeftButton = 1 << 0,
00108     RightButton = 1 << 1,
00109     MidButton = 1 << 2,
00110     ShiftButton = 1 << 3,
00111     ControlButton = 1 << 4,
00112     AltButton = 1 << 5,
00113     MetaButton = 1 << 6,
00114     Keypad = 1 << 7,
00115     MouseButtonMask = (MidButton << 1) - 1,
00116     KeyButtonMask = (Keypad << 1) - 1 & ~MouseButtonMask
00117 } ButtonState;
00118 
00119 typedef enum {
00120     Key_AltBase = 500,
00121     Key_Unknown = SDLK_UNKNOWN,
00122     Key_Escape = SDLK_ESCAPE,
00123     Key_Tab = SDLK_TAB,
00124     Key_Backtab = Key_AltBase + SDLK_TAB,
00125     Key_Backspace = SDLK_BACKSPACE,
00126     Key_Return = SDLK_RETURN,
00127     Key_Enter = SDLK_RETURN,
00128     Key_Insert = SDLK_INSERT,
00129     Key_Delete = SDLK_DELETE,
00130     Key_Pause = SDLK_PAUSE,
00131     Key_Print = SDLK_PRINT,
00132     Key_SysReq = SDLK_SYSREQ,
00133     Key_Home = SDLK_HOME,
00134     Key_End = SDLK_END,
00135     Key_Left = SDLK_LEFT,
00136     Key_Up = SDLK_UP,
00137     Key_Right = SDLK_RIGHT,
00138     Key_Down = SDLK_DOWN,
00139     Key_Prior = SDLK_PAGEUP,
00140     Key_Next = SDLK_PAGEDOWN,
00141     Key_Shift = SDLK_LSHIFT,
00142     Key_Shift_L = SDLK_LSHIFT,
00143     Key_Shift_R = SDLK_RSHIFT,
00144     Key_Control = SDLK_LCTRL,
00145     Key_Control_L = SDLK_LCTRL,
00146     Key_Control_R = SDLK_RCTRL,
00147     Key_Alt = SDLK_LALT,
00148     Key_Alt_L = SDLK_LALT,
00149     Key_Alt_R = SDLK_RALT,
00150     Key_Meta = SDLK_LMETA,
00151     Key_Meta_L = SDLK_LMETA,
00152     Key_Meta_R = SDLK_RMETA,
00153     Key_CapsLock = SDLK_CAPSLOCK,
00154     Key_NumLock = SDLK_NUMLOCK,
00155     Key_ScrollLock = SDLK_SCROLLOCK,
00156     Key_Clear = SDLK_CLEAR,
00157     Key_F1 = SDLK_F1,
00158     Key_F2 = SDLK_F2,
00159     Key_F3 = SDLK_F3,
00160     Key_F4 = SDLK_F4,
00161     Key_F5 = SDLK_F5,
00162     Key_F6 = SDLK_F6,
00163     Key_F7 = SDLK_F7,
00164     Key_F8 = SDLK_F8,
00165     Key_F9 = SDLK_F9,
00166     Key_F10 = SDLK_F10,
00167     Key_F11 = SDLK_F11,
00168     Key_F12 = SDLK_F12,
00169     Key_F13 = SDLK_F13,
00170     Key_F14 = SDLK_F14,
00171     Key_F15 = SDLK_F15,
00172     Key_Super_L = SDLK_LSUPER,
00173     Key_Super_R = SDLK_RSUPER,
00174     Key_Menu = SDLK_MENU,
00175     Key_Help = SDLK_HELP,
00176     Key_Space = SDLK_SPACE,
00177     //Key_Any
00178     Key_Exclam = SDLK_EXCLAIM,
00179     Key_QuoteDbl = SDLK_QUOTEDBL,
00180     Key_NumberSign = SDLK_HASH,
00181     Key_Dollar = SDLK_DOLLAR,
00182     //Key_Percent
00183     Key_Ampersand = SDLK_AMPERSAND,
00184     Key_Apostrophe = SDLK_QUOTE,
00185     Key_ParenLeft = SDLK_LEFTPAREN,
00186     Key_ParenRight = SDLK_RIGHTPAREN,
00187     Key_Asterisk = SDLK_ASTERISK,
00188     Key_Plus = SDLK_PLUS,
00189     Key_Comma = SDLK_COMMA,
00190     Key_Minus = SDLK_MINUS,
00191     Key_Period = SDLK_PERIOD,
00192     Key_Slash = SDLK_SLASH,
00193     Key_0 = SDLK_0,
00194     Key_1 = SDLK_1,
00195     Key_2 = SDLK_2,
00196     Key_3 = SDLK_3,
00197     Key_4 = SDLK_4,
00198     Key_5 = SDLK_5,
00199     Key_6 = SDLK_6,
00200     Key_7 = SDLK_7,
00201     Key_8 = SDLK_8,
00202     Key_9 = SDLK_9,
00203     Key_Colon = SDLK_COLON,
00204     Key_Semicolon = SDLK_SEMICOLON,
00205     Key_Less = SDLK_LESS,
00206     Key_Equal = SDLK_EQUALS,
00207     Key_Greater = SDLK_GREATER,
00208     Key_Question = SDLK_QUESTION,
00209     Key_At = SDLK_AT,
00210     Key_A = SDLK_a,
00211     Key_B = SDLK_b,
00212     Key_C = SDLK_c,
00213     Key_D = SDLK_d,
00214     Key_E = SDLK_e,
00215     Key_F = SDLK_f,
00216     Key_G = SDLK_g,
00217     Key_H = SDLK_h,
00218     Key_I = SDLK_i,
00219     Key_J = SDLK_j,
00220     Key_K = SDLK_k,
00221     Key_L = SDLK_l,
00222     Key_M = SDLK_m,
00223     Key_N = SDLK_n,
00224     Key_O = SDLK_o,
00225     Key_P = SDLK_p,
00226     Key_Q = SDLK_q,
00227     Key_R = SDLK_r,
00228     Key_S = SDLK_s,
00229     Key_T = SDLK_t,
00230     Key_U = SDLK_u,
00231     Key_V = SDLK_v,
00232     Key_W = SDLK_w,
00233     Key_X = SDLK_x,
00234     Key_Y = SDLK_y,
00235     Key_Z = SDLK_z,
00236     Key_BracketLeft = SDLK_LEFTBRACKET,
00237     Key_Backslash = SDLK_BACKSLASH,
00238     Key_BracketRight = SDLK_RIGHTBRACKET,
00239     //Key_AsciiCircum
00240     Key_Underscore = SDLK_UNDERSCORE,
00241     Key_QuoteLeft = SDLK_BACKQUOTE,
00242 
00243     //keypad
00244     Key_KPBase = 1000,
00245     Key_KP_Period = Key_KPBase + SDLK_KP_PERIOD,
00246     Key_KP_Divide = Key_KPBase + SDLK_KP_DIVIDE,
00247     Key_KP_Multiply = Key_KPBase + SDLK_KP_MULTIPLY,
00248     Key_KP_Enter = Key_KPBase + SDLK_KP_ENTER,
00249     Key_KP_Equal = Key_KPBase + SDLK_KP_EQUALS,
00250     Key_KP_Minus = Key_KPBase + SDLK_KP_MINUS,
00251     Key_KP_Plus = Key_KPBase + SDLK_KP_PLUS,
00252     Key_KP_0 = Key_KPBase + SDLK_KP0,
00253     Key_KP_1 = Key_KPBase + SDLK_KP1,
00254     Key_KP_2 = Key_KPBase + SDLK_KP2,
00255     Key_KP_3 = Key_KPBase + SDLK_KP3,
00256     Key_KP_4 = Key_KPBase + SDLK_KP4,
00257     Key_KP_5 = Key_KPBase + SDLK_KP5,
00258     Key_KP_6 = Key_KPBase + SDLK_KP6,
00259     Key_KP_7 = Key_KPBase + SDLK_KP7,
00260     Key_KP_8 = Key_KPBase + SDLK_KP8,
00261     Key_KP_9 = Key_KPBase + SDLK_KP9
00262 } Key;
00263 
00264 }
00265 
00266 #endif // WT_FLAGS_H

Generated Fri Jul 28 19:23:00 2006.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.