defs.h
来自「A*算法 A*算法 A*算法 A*算法A*算法A*算法」· C头文件 代码 · 共 1,861 行 · 第 1/5 页
H
1,861 行
#define wxUINT32_SWAP_ALWAYS(val) \
((wxUint32) ( \
(((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
(((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
(((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
(((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
#define wxINT32_SWAP_ALWAYS(val) \
((wxInt32) ( \
(((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
(((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
(((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
(((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
#endif
/* machine specific byte swapping */
#ifdef wxLongLong_t
#define wxUINT64_SWAP_ALWAYS(val) \
((wxUint64) ( \
(((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
(((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
#define wxINT64_SWAP_ALWAYS(val) \
((wxInt64) ( \
(((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
(((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
(((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
#else /* !wxLongLong_t */
#define wxUINT64_SWAP_ALWAYS(val) \
((wxUint64) ( \
((wxULongLong(val) & wxULongLong(0L, 0x000000ffU)) << 56) | \
((wxULongLong(val) & wxULongLong(0L, 0x0000ff00U)) << 40) | \
((wxULongLong(val) & wxULongLong(0L, 0x00ff0000U)) << 24) | \
((wxULongLong(val) & wxULongLong(0L, 0xff000000U)) << 8) | \
((wxULongLong(val) & wxULongLong(0x000000ffL, 0U)) >> 8) | \
((wxULongLong(val) & wxULongLong(0x0000ff00L, 0U)) >> 24) | \
((wxULongLong(val) & wxULongLong(0x00ff0000L, 0U)) >> 40) | \
((wxULongLong(val) & wxULongLong(0xff000000L, 0U)) >> 56)))
#define wxINT64_SWAP_ALWAYS(val) \
((wxInt64) ( \
((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \
((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \
((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \
((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \
((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \
((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \
((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \
((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56)))
#endif /* wxLongLong_t/!wxLongLong_t */
#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
{
/* don't change the values of these elements, they are used elsewhere */
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,
wxFIXED_MINSIZE = 0x8000,
wxTILE = 0xc000,
/* for compatibility only, default now, don't use explicitly any more */
#if WXWIN_COMPATIBILITY_2_4
wxADJUST_MINSIZE = 0x00100000
#else
wxADJUST_MINSIZE = 0
#endif
};
/* 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
};
/* This makes it easier to specify a 'normal' border for a control */
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
#define wxDEFAULT_CONTROL_BORDER wxBORDER_SIMPLE
#else
#define wxDEFAULT_CONTROL_BORDER wxBORDER_SUNKEN
#endif
/* ---------------------------------------------------------------------------- */
/* 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
/* 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 and wxMSW so far */
#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 (Motif only, see src/generic/scrolwing.cpp)
* This is non-zero only under wxMotif, to avoid a clash with wxPOPUP_WINDOW
* on other platforms
*/
#ifdef __WXMOTIF__
#define wxRETAINED 0x00020000
#else
#define wxRETAINED 0x00000000
#endif
#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
/* force a full repaint when the window is resized (instead of repainting just */
/* the invalidated area) */
#define wxFULL_REPAINT_ON_RESIZE 0x00010000
/* obsolete: now this is the default behaviour */
/* */
/* 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 0
/*
* 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
/* don't paint the window background, we'll assume it will */
/* be done by a theming engine. This is not yet used but could */
/* possibly be made to work in the future, at least on Windows */
#define wxWS_EX_THEMED_BACKGROUND 0x00000008
/* this window should always process idle events */
#define wxWS_EX_PROCESS_IDLE 0x00000010
/* this window should always process UI update events */
#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020
/* 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
/* Draw the window in a metal theme on Mac */
#define wxFRAME_EX_METAL 0x00000040
#define wxDIALOG_EX_METAL 0x00000040
/* Create a window which is attachable to another top level window */
#define wxFRAME_DRAWER 0x0020
/*
* MDI parent frame style flags
* Can overlap with some of the above.
*/
#define wxFRAME_NO_WINDOW_MENU 0x0100
/*
* 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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?