📄 defs.h
字号:
#ifdef WORDS_BIGENDIAN
#define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val)
#define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val)
#define wxUINT16_SWAP_ON_LE(val) (val)
#define wxINT16_SWAP_ON_LE(val) (val)
#define wxUINT32_SWAP_ON_BE(val) wxUINT32_SWAP_ALWAYS(val)
#define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val)
#define wxUINT32_SWAP_ON_LE(val) (val)
#define wxINT32_SWAP_ON_LE(val) (val)
#define wxUINT64_SWAP_ON_BE(val) wxUINT64_SWAP_ALWAYS(val)
#define wxUINT64_SWAP_ON_LE(val) (val)
#else
#define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val)
#define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val)
#define wxUINT16_SWAP_ON_BE(val) (val)
#define wxINT16_SWAP_ON_BE(val) (val)
#define wxUINT32_SWAP_ON_LE(val) wxUINT32_SWAP_ALWAYS(val)
#define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val)
#define wxUINT32_SWAP_ON_BE(val) (val)
#define wxINT32_SWAP_ON_BE(val) (val)
#define wxUINT64_SWAP_ON_LE(val) wxUINT64_SWAP_ALWAYS(val)
#define wxUINT64_SWAP_ON_BE(val) (val)
#endif
// ----------------------------------------------------------------------------
// Geometric flags
// ----------------------------------------------------------------------------
enum wxGeometryCentre
{
wxCENTRE = 0x0001,
wxCENTER = wxCENTRE
};
// centering into frame rather than screen (obsolete)
#define wxCENTER_FRAME 0x0000
// centre on screen rather than parent
#define wxCENTRE_ON_SCREEN 0x0002
#define wxCENTER_ON_SCREEN wxCENTRE_ON_SCREEN
enum wxOrientation
{
wxHORIZONTAL = 0x0004,
wxVERTICAL = 0x0008,
wxBOTH = (wxVERTICAL | wxHORIZONTAL)
};
enum wxDirection
{
wxLEFT = 0x0010,
wxRIGHT = 0x0020,
wxUP = 0x0040,
wxDOWN = 0x0080,
wxTOP = wxUP,
wxBOTTOM = wxDOWN,
wxNORTH = wxUP,
wxSOUTH = wxDOWN,
wxWEST = wxLEFT,
wxEAST = wxRIGHT,
wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT)
};
enum wxAlignment
{
wxALIGN_NOT = 0x0000,
wxALIGN_CENTER_HORIZONTAL = 0x0100,
wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL,
wxALIGN_LEFT = wxALIGN_NOT,
wxALIGN_TOP = wxALIGN_NOT,
wxALIGN_RIGHT = 0x0200,
wxALIGN_BOTTOM = 0x0400,
wxALIGN_CENTER_VERTICAL = 0x0800,
wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL,
wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL),
wxALIGN_CENTRE = wxALIGN_CENTER,
// a mask to extract alignment from the combination of flags
wxALIGN_MASK = 0x0f00
};
enum wxStretch
{
wxSTRETCH_NOT = 0x0000,
wxSHRINK = 0x1000,
wxGROW = 0x2000,
wxEXPAND = wxGROW,
wxSHAPED = 0x4000,
wxADJUST_MINSIZE = 0x8000,
wxTILE = 0xc000
};
// border flags: the values are chosen for backwards compatibility
enum wxBorder
{
// this is different from wxBORDER_NONE as by default the controls do have
// border
wxBORDER_DEFAULT = 0,
wxBORDER_NONE = 0x00200000,
wxBORDER_STATIC = 0x01000000,
wxBORDER_SIMPLE = 0x02000000,
wxBORDER_RAISED = 0x04000000,
wxBORDER_SUNKEN = 0x08000000,
wxBORDER_DOUBLE = 0x10000000,
// a mask to extract border style from the combination of flags
wxBORDER_MASK = 0x1f200000
};
// ----------------------------------------------------------------------------
// Window style flags
// ----------------------------------------------------------------------------
/*
* Values are chosen so they can be |'ed in a bit list.
* Some styles are used across more than one group,
* so the values mustn't clash with others in the group.
* Otherwise, numbers can be reused across groups.
*
* From version 1.66:
* Window (cross-group) styles now take up the first half
* of the flag, and control-specific styles the
* second half.
*
*/
/*
* Window (Frame/dialog/subwindow/panel item) style flags
*/
#define wxVSCROLL 0x80000000
#define wxHSCROLL 0x40000000
#define wxCAPTION 0x20000000
// New styles (border styles are now in their own enum)
#define wxDOUBLE_BORDER wxBORDER_DOUBLE
#define wxSUNKEN_BORDER wxBORDER_SUNKEN
#define wxRAISED_BORDER wxBORDER_RAISED
#define wxBORDER wxBORDER_SIMPLE
#define wxSIMPLE_BORDER wxBORDER_SIMPLE
#define wxSTATIC_BORDER wxBORDER_STATIC
#define wxNO_BORDER wxBORDER_NONE
// Override CTL3D etc. control colour processing to allow own background
// colour.
// Override CTL3D or native 3D styles for children
#define wxNO_3D 0x00800000
// OBSOLETE - use wxNO_3D instead
#define wxUSER_COLOURS wxNO_3D
// wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed,
// disable it - but still show (see also wxLB_ALWAYS_SB style)
//
// NB: as this style is only supported by wxUniversal so far as it doesn't use
// wxUSER_COLOURS/wxNO_3D, we reuse the same style value
#define wxALWAYS_SHOW_SB 0x00800000
// Clip children when painting, which reduces flicker in e.g. frames and
// splitter windows, but can't be used in a panel where a static box must be
// 'transparent' (panel paints the background for it)
#define wxCLIP_CHILDREN 0x00400000
// Note we're reusing the wxCAPTION style because we won't need captions
// for subwindows/controls
#define wxCLIP_SIBLINGS 0x20000000
#define wxTRANSPARENT_WINDOW 0x00100000
// Add this style to a panel to get tab traversal working outside of dialogs
// (on by default for wxPanel, wxDialog, wxScrolledWindow)
#define wxTAB_TRAVERSAL 0x00080000
// Add this style if the control wants to get all keyboard messages (under
// Windows, it won't normally get the dialog navigation key events)
#define wxWANTS_CHARS 0x00040000
// Make window retained (mostly Motif, I think) -- obsolete (VZ)?
#define wxRETAINED 0x00020000
#define wxBACKINGSTORE wxRETAINED
// set this flag to create a special popup window: it will be always shown on
// top of other windows, will capture the mouse and will be dismissed when the
// mouse is clicked outside of it or if it loses focus in any other way
#define wxPOPUP_WINDOW 0x00020000
// don't invalidate the whole window (resulting in a PAINT event) when the
// window is resized (currently, makes sense for wxMSW only)
#define wxNO_FULL_REPAINT_ON_RESIZE 0x00010000
/*
* Extra window style flags (use wxWS_EX prefix to make it clear that they
* should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle())
*/
// by default, TransferDataTo/FromWindow() only work on direct children of the
// window (compatible behaviour), set this flag to make them recursively
// descend into all subwindows
#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
// wxCommandEvents and the objects of the derived classes are forwarded to the
// parent window and so on recursively by default. Using this flag for the
// given window allows to block this propagation at this window, i.e. prevent
// the events from being propagated further upwards. The dialogs have this
// flag on by default.
#define wxWS_EX_BLOCK_EVENTS 0x00000002
// don't use this window as an implicit parent for the other windows: this must
// be used with transient windows as otherwise there is the risk of creating a
// dialog/frame with this window as a parent which would lead to a crash if the
// parent is destroyed before the child
#define wxWS_EX_TRANSIENT 0x00000004
// Use this style to add a context-sensitive help to the window (currently for
// Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used)
#define wxFRAME_EX_CONTEXTHELP 0x00000004
#define wxDIALOG_EX_CONTEXTHELP 0x00000004
/*
* wxFrame/wxDialog style flags
*/
#define wxSTAY_ON_TOP 0x8000
#define wxICONIZE 0x4000
#define wxMINIMIZE wxICONIZE
#define wxMAXIMIZE 0x2000
// free flag value: 0x1000
#define wxSYSTEM_MENU 0x0800
#define wxMINIMIZE_BOX 0x0400
#define wxMAXIMIZE_BOX 0x0200
#define wxTINY_CAPTION_HORIZ 0x0100
#define wxTINY_CAPTION_VERT 0x0080
#define wxRESIZE_BORDER 0x0040
#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only)
#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu
#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent
#define wxFRAME_SHAPED 0x0010 // Create a window that is able to be shaped
// deprecated versions defined for compatibility reasons
#define wxRESIZE_BOX wxMAXIMIZE_BOX
#define wxTHICK_FRAME wxRESIZE_BORDER
// obsolete styles, unused any more
#define wxDIALOG_MODAL 0x0020 // free flag value 0x0020
#define wxDIALOG_MODELESS 0x0000
/*
* MDI parent frame style flags
* Can overlap with some of the above.
*/
#define wxFRAME_NO_WINDOW_MENU 0x0100
#if WXWIN_COMPATIBILITY
#define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE
#endif
#define wxDEFAULT_FRAME_STYLE \
(wxSYSTEM_MENU | wxRESIZE_BORDER | \
wxMINIMIZE_BOX | wxMAXIMIZE_BOX | \
wxCAPTION | wxCLIP_CHILDREN)
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMGL__)
# define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION)
#else
// Under Unix, the dialogs don't have a system menu. Specifying wxSYSTEM_MENU
// here will make a close button appear.
# define wxDEFAULT_DIALOG_STYLE wxCAPTION
#endif
/*
* wxExtDialog style flags
*/
#define wxED_CLIENT_MARGIN 0x0004
#define wxED_BUTTONS_BOTTOM 0x0000 // has no effect
#define wxED_BUTTONS_RIGHT 0x0002
#define wxED_STATIC_LINE 0x0001
#if defined(__WXMSW__) || defined(__WXMAC__)
# define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN)
#else
# define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN|wxED_STATIC_LINE)
#endif
/*
* wxMenuBar style flags
*/
// use native docking
#define wxMB_DOCKABLE 0x0001
/*
* wxMenu style flags
*/
#define wxMENU_TEAROFF 0x0001
/*
* Apply to all panel items
*/
#define wxCOLOURED 0x0800
#define wxFIXED_LENGTH 0x0400
/*
* Styles for wxListBox
*/
#define wxLB_SORT 0x0010
#define wxLB_SINGLE 0x0020
#define wxLB_MULTIPLE 0x0040
#define wxLB_EXTENDED 0x0080
// wxLB_OWNERDRAW is Windows-only
#define wxLB_OWNERDRAW 0x0100
#define wxLB_NEEDED_SB 0x0200
#define wxLB_ALWAYS_SB 0x0400
#define wxLB_HSCROLL wxHSCROLL
// always show an entire number of rows
#define wxLB_INT_HEIGHT 0x0800
// deprecated synonyms
#define wxPROCESS_ENTER 0x0400 // wxTE_PROCESS_ENTER
#define wxPASSWORD 0x0800 // wxTE_PASSWORD
/*
* wxComboBox style flags
*/
#define wxCB_SIMPLE 0x0004
#define wxCB_SORT 0x0008
#define wxCB_READONLY 0x0010
#define wxCB_DROPDOWN 0x0020
/*
* wxRadioBox style flags
*/
// should we number the items from left to right or from top to bottom in a 2d
// radiobox?
#define wxRA_LEFTTORIGHT 0x0001
#define wxRA_TOPTOBOTTOM 0x0002
// New, more intuitive names to specify majorDim argument
#define wxRA_SPECIFY_COLS wxHORIZONTAL
#define wxRA_SPECIFY_ROWS wxVERTICAL
// Old names for compatibility
#define wxRA_HORIZONTAL wxHORIZONTAL
#define wxRA_VERTICAL wxVERTICAL
/*
* wxRadioButton style flag
*/
#define wxRB_GROUP 0x0004
#define wxRB_SINGLE 0x0008
/*
* wxGauge flags
*/
#define wxGA_HORIZONTAL wxHORIZONTAL
#define wxGA_VERTICAL wxVERTICAL
#define wxGA_PROGRESSBAR 0x0010
// Windows only
#define wxGA_SMOOTH 0x0020
/*
* wxSlider flags
*/
#define wxSL_HORIZONTAL wxHORIZONTAL // 4
#define wxSL_VERTICAL wxVERTICAL // 8
// The next one is obsolete - use scroll events instead
#define wxSL_NOTIFY_DRAG 0x0000
#define wxSL_TICKS 0x0010
#define wxSL_AUTOTICKS wxSL_TICKS // we don't support manual ticks
#define wxSL_LABELS 0x0020
#define wxSL_LEFT 0x0040
#define wxSL_TOP 0x0080
#define wxSL_RIGHT 0x0100
#define wxSL_BOTTOM 0x0200
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -