defs.h 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/defs.h
  3. // Purpose: interface of global functions
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. // ----------------------------------------------------------------------------
  8. // enumerations
  9. // ----------------------------------------------------------------------------
  10. /**
  11. Generic flags.
  12. */
  13. enum wxGeometryCentre
  14. {
  15. wxCENTRE = 0x0001,
  16. wxCENTER = wxCENTRE
  17. };
  18. /**
  19. A generic orientation value.
  20. */
  21. enum wxOrientation
  22. {
  23. wxHORIZONTAL = 0x0004,
  24. wxVERTICAL = 0x0008,
  25. /**
  26. A mask value to indicate both vertical and horizontal orientations.
  27. */
  28. wxBOTH = wxVERTICAL | wxHORIZONTAL,
  29. /// A synonym for @c wxBOTH.
  30. wxORIENTATION_MASK = wxBOTH
  31. };
  32. /**
  33. A generic direction value.
  34. */
  35. enum wxDirection
  36. {
  37. wxLEFT = 0x0010,
  38. wxRIGHT = 0x0020,
  39. wxUP = 0x0040,
  40. wxDOWN = 0x0080,
  41. wxTOP = wxUP,
  42. wxBOTTOM = wxDOWN,
  43. wxNORTH = wxUP,
  44. wxSOUTH = wxDOWN,
  45. wxWEST = wxLEFT,
  46. wxEAST = wxRIGHT,
  47. wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT),
  48. /** A mask to extract direction from the combination of flags. */
  49. wxDIRECTION_MASK = wxALL
  50. };
  51. /**
  52. Generic alignment values. Can be combined together.
  53. */
  54. enum wxAlignment
  55. {
  56. /**
  57. A value different from any valid alignment value.
  58. Note that you shouldn't use 0 for this as it's the value of (valid)
  59. alignments wxALIGN_LEFT and wxALIGN_TOP.
  60. @since 2.9.1
  61. */
  62. wxALIGN_INVALID = -1,
  63. wxALIGN_NOT = 0x0000,
  64. wxALIGN_CENTER_HORIZONTAL = 0x0100,
  65. wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL,
  66. wxALIGN_LEFT = wxALIGN_NOT,
  67. wxALIGN_TOP = wxALIGN_NOT,
  68. wxALIGN_RIGHT = 0x0200,
  69. wxALIGN_BOTTOM = 0x0400,
  70. wxALIGN_CENTER_VERTICAL = 0x0800,
  71. wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL,
  72. wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL),
  73. wxALIGN_CENTRE = wxALIGN_CENTER,
  74. /** A mask to extract alignment from the combination of flags. */
  75. wxALIGN_MASK = 0x0f00
  76. };
  77. /**
  78. Miscellaneous flags for wxSizer items.
  79. */
  80. enum wxSizerFlagBits
  81. {
  82. wxFIXED_MINSIZE = 0x8000,
  83. wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002,
  84. /* a mask to extract wxSizerFlagBits from combination of flags */
  85. wxSIZER_FLAG_BITS_MASK = 0x8002
  86. };
  87. /**
  88. Generic stretch values.
  89. */
  90. enum wxStretch
  91. {
  92. wxSTRETCH_NOT = 0x0000,
  93. wxSHRINK = 0x1000,
  94. wxGROW = 0x2000,
  95. wxEXPAND = wxGROW,
  96. wxSHAPED = 0x4000,
  97. wxTILE = wxSHAPED | wxFIXED_MINSIZE,
  98. /* a mask to extract stretch from the combination of flags */
  99. wxSTRETCH_MASK = 0x7000 /* sans wxTILE */
  100. };
  101. /**
  102. Border flags for wxWindow.
  103. */
  104. enum wxBorder
  105. {
  106. /**
  107. This is different from wxBORDER_NONE as by default the controls do have
  108. a border.
  109. */
  110. wxBORDER_DEFAULT = 0,
  111. wxBORDER_NONE = 0x00200000,
  112. wxBORDER_STATIC = 0x01000000,
  113. wxBORDER_SIMPLE = 0x02000000,
  114. wxBORDER_RAISED = 0x04000000,
  115. wxBORDER_SUNKEN = 0x08000000,
  116. wxBORDER_DOUBLE = 0x10000000, /* deprecated */
  117. wxBORDER_THEME = wxBORDER_DOUBLE,
  118. /* a mask to extract border style from the combination of flags */
  119. wxBORDER_MASK = 0x1f200000
  120. };
  121. /* ---------------------------------------------------------------------------- */
  122. /* Possible SetSize flags */
  123. /* ---------------------------------------------------------------------------- */
  124. /* Use internally-calculated width if -1 */
  125. #define wxSIZE_AUTO_WIDTH 0x0001
  126. /* Use internally-calculated height if -1 */
  127. #define wxSIZE_AUTO_HEIGHT 0x0002
  128. /* Use internally-calculated width and height if each is -1 */
  129. #define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT)
  130. /* Ignore missing (-1) dimensions (use existing). */
  131. /* For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. */
  132. #define wxSIZE_USE_EXISTING 0x0000
  133. /* Allow -1 as a valid position */
  134. #define wxSIZE_ALLOW_MINUS_ONE 0x0004
  135. /* Don't do parent client adjustments (for implementation only) */
  136. #define wxSIZE_NO_ADJUSTMENTS 0x0008
  137. /* Change the window position even if it seems to be already correct */
  138. #define wxSIZE_FORCE 0x0010
  139. /* Emit size event even if size didn't change */
  140. #define wxSIZE_FORCE_EVENT 0x0020
  141. /* ---------------------------------------------------------------------------- */
  142. /* Window style flags */
  143. /* ---------------------------------------------------------------------------- */
  144. /*
  145. * Values are chosen so they can be |'ed in a bit list.
  146. * Some styles are used across more than one group,
  147. * so the values mustn't clash with others in the group.
  148. * Otherwise, numbers can be reused across groups.
  149. */
  150. /*
  151. Summary of the bits used by various styles.
  152. High word, containing styles which can be used with many windows:
  153. +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  154. |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|
  155. +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  156. | | | | | | | | | | | | | | | |
  157. | | | | | | | | | | | | | | | \_ wxFULL_REPAINT_ON_RESIZE
  158. | | | | | | | | | | | | | | \____ wxPOPUP_WINDOW
  159. | | | | | | | | | | | | | \_______ wxWANTS_CHARS
  160. | | | | | | | | | | | | \__________ wxTAB_TRAVERSAL
  161. | | | | | | | | | | | \_____________ wxTRANSPARENT_WINDOW
  162. | | | | | | | | | | \________________ wxBORDER_NONE
  163. | | | | | | | | | \___________________ wxCLIP_CHILDREN
  164. | | | | | | | | \______________________ wxALWAYS_SHOW_SB
  165. | | | | | | | \_________________________ wxBORDER_STATIC
  166. | | | | | | \____________________________ wxBORDER_SIMPLE
  167. | | | | | \_______________________________ wxBORDER_RAISED
  168. | | | | \__________________________________ wxBORDER_SUNKEN
  169. | | | \_____________________________________ wxBORDER_{DOUBLE,THEME}
  170. | | \________________________________________ wxCAPTION/wxCLIP_SIBLINGS
  171. | \___________________________________________ wxHSCROLL
  172. \______________________________________________ wxVSCROLL
  173. Low word style bits is class-specific meaning that the same bit can have
  174. different meanings for different controls (e.g. 0x10 is wxCB_READONLY
  175. meaning that the control can't be modified for wxComboBox but wxLB_SORT
  176. meaning that the control should be kept sorted for wxListBox, while
  177. wxLB_SORT has a different value -- and this is just fine).
  178. */
  179. /*
  180. * Window (Frame/dialog/subwindow/panel item) style flags
  181. */
  182. #define wxVSCROLL 0x80000000
  183. #define wxHSCROLL 0x40000000
  184. #define wxCAPTION 0x20000000
  185. /* New styles (border styles are now in their own enum) */
  186. #define wxDOUBLE_BORDER wxBORDER_DOUBLE
  187. #define wxSUNKEN_BORDER wxBORDER_SUNKEN
  188. #define wxRAISED_BORDER wxBORDER_RAISED
  189. #define wxBORDER wxBORDER_SIMPLE
  190. #define wxSIMPLE_BORDER wxBORDER_SIMPLE
  191. #define wxSTATIC_BORDER wxBORDER_STATIC
  192. #define wxNO_BORDER wxBORDER_NONE
  193. /* wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, */
  194. /* disable it - but still show (see also wxLB_ALWAYS_SB style) */
  195. /* */
  196. /* NB: as this style is only supported by wxUniversal and wxMSW so far */
  197. #define wxALWAYS_SHOW_SB 0x00800000
  198. /* Clip children when painting, which reduces flicker in e.g. frames and */
  199. /* splitter windows, but can't be used in a panel where a static box must be */
  200. /* 'transparent' (panel paints the background for it) */
  201. #define wxCLIP_CHILDREN 0x00400000
  202. /* Note we're reusing the wxCAPTION style because we won't need captions */
  203. /* for subwindows/controls */
  204. #define wxCLIP_SIBLINGS 0x20000000
  205. #define wxTRANSPARENT_WINDOW 0x00100000
  206. /* Add this style to a panel to get tab traversal working outside of dialogs */
  207. /* (on by default for wxPanel, wxDialog, wxScrolledWindow) */
  208. #define wxTAB_TRAVERSAL 0x00080000
  209. /* Add this style if the control wants to get all keyboard messages (under */
  210. /* Windows, it won't normally get the dialog navigation key events) */
  211. #define wxWANTS_CHARS 0x00040000
  212. /* Make window retained (Motif only, see src/generic/scrolwing.cpp)
  213. * This is non-zero only under wxMotif, to avoid a clash with wxPOPUP_WINDOW
  214. * on other platforms
  215. */
  216. #ifdef __WXMOTIF__
  217. #define wxRETAINED 0x00020000
  218. #else
  219. #define wxRETAINED 0x00000000
  220. #endif
  221. #define wxBACKINGSTORE wxRETAINED
  222. /* set this flag to create a special popup window: it will be always shown on */
  223. /* top of other windows, will capture the mouse and will be dismissed when the */
  224. /* mouse is clicked outside of it or if it loses focus in any other way */
  225. #define wxPOPUP_WINDOW 0x00020000
  226. /* force a full repaint when the window is resized (instead of repainting just */
  227. /* the invalidated area) */
  228. #define wxFULL_REPAINT_ON_RESIZE 0x00010000
  229. /* obsolete: now this is the default behaviour */
  230. /* */
  231. /* don't invalidate the whole window (resulting in a PAINT event) when the */
  232. /* window is resized (currently, makes sense for wxMSW only) */
  233. #define wxNO_FULL_REPAINT_ON_RESIZE 0
  234. /* A mask which can be used to filter (out) all wxWindow-specific styles.
  235. */
  236. #define wxWINDOW_STYLE_MASK \
  237. (wxVSCROLL|wxHSCROLL|wxBORDER_MASK|wxALWAYS_SHOW_SB|wxCLIP_CHILDREN| \
  238. wxCLIP_SIBLINGS|wxTRANSPARENT_WINDOW|wxTAB_TRAVERSAL|wxWANTS_CHARS| \
  239. wxRETAINED|wxPOPUP_WINDOW|wxFULL_REPAINT_ON_RESIZE)
  240. /*
  241. * Extra window style flags (use wxWS_EX prefix to make it clear that they
  242. * should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle())
  243. */
  244. /* by default, TransferDataTo/FromWindow() only work on direct children of the */
  245. /* window (compatible behaviour), set this flag to make them recursively */
  246. /* descend into all subwindows */
  247. #define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
  248. /* wxCommandEvents and the objects of the derived classes are forwarded to the */
  249. /* parent window and so on recursively by default. Using this flag for the */
  250. /* given window allows to block this propagation at this window, i.e. prevent */
  251. /* the events from being propagated further upwards. The dialogs have this */
  252. /* flag on by default. */
  253. #define wxWS_EX_BLOCK_EVENTS 0x00000002
  254. /* don't use this window as an implicit parent for the other windows: this must */
  255. /* be used with transient windows as otherwise there is the risk of creating a */
  256. /* dialog/frame with this window as a parent which would lead to a crash if the */
  257. /* parent is destroyed before the child */
  258. #define wxWS_EX_TRANSIENT 0x00000004
  259. /* don't paint the window background, we'll assume it will */
  260. /* be done by a theming engine. This is not yet used but could */
  261. /* possibly be made to work in the future, at least on Windows */
  262. #define wxWS_EX_THEMED_BACKGROUND 0x00000008
  263. /* this window should always process idle events */
  264. #define wxWS_EX_PROCESS_IDLE 0x00000010
  265. /* this window should always process UI update events */
  266. #define wxWS_EX_PROCESS_UI_UPDATES 0x00000020
  267. /* Draw the window in a metal theme on Mac */
  268. #define wxFRAME_EX_METAL 0x00000040
  269. #define wxDIALOG_EX_METAL 0x00000040
  270. /* Use this style to add a context-sensitive help to the window (currently for */
  271. /* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */
  272. #define wxWS_EX_CONTEXTHELP 0x00000080
  273. /* synonyms for wxWS_EX_CONTEXTHELP for compatibility */
  274. #define wxFRAME_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
  275. #define wxDIALOG_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
  276. /* Create a window which is attachable to another top level window */
  277. #define wxFRAME_DRAWER 0x0020
  278. /*
  279. * MDI parent frame style flags
  280. * Can overlap with some of the above.
  281. */
  282. #define wxFRAME_NO_WINDOW_MENU 0x0100
  283. /*
  284. * wxMenuBar style flags
  285. */
  286. /* use native docking */
  287. #define wxMB_DOCKABLE 0x0001
  288. /*
  289. * wxMenu style flags
  290. */
  291. #define wxMENU_TEAROFF 0x0001
  292. /*
  293. * Apply to all panel items
  294. */
  295. #define wxCOLOURED 0x0800
  296. #define wxFIXED_LENGTH 0x0400
  297. /*
  298. * Styles for wxListBox
  299. */
  300. #define wxLB_SORT 0x0010
  301. #define wxLB_SINGLE 0x0020
  302. #define wxLB_MULTIPLE 0x0040
  303. #define wxLB_EXTENDED 0x0080
  304. /* wxLB_OWNERDRAW is Windows-only */
  305. #define wxLB_NEEDED_SB 0x0000
  306. #define wxLB_OWNERDRAW 0x0100
  307. #define wxLB_ALWAYS_SB 0x0200
  308. #define wxLB_NO_SB 0x0400
  309. #define wxLB_HSCROLL wxHSCROLL
  310. /* always show an entire number of rows */
  311. #define wxLB_INT_HEIGHT 0x0800
  312. /*
  313. * wxComboBox style flags
  314. */
  315. #define wxCB_SIMPLE 0x0004
  316. #define wxCB_SORT 0x0008
  317. #define wxCB_READONLY 0x0010
  318. #define wxCB_DROPDOWN 0x0020
  319. /*
  320. * wxRadioBox style flags
  321. */
  322. /* should we number the items from left to right or from top to bottom in a 2d */
  323. /* radiobox? */
  324. #define wxRA_LEFTTORIGHT 0x0001
  325. #define wxRA_TOPTOBOTTOM 0x0002
  326. /* New, more intuitive names to specify majorDim argument */
  327. #define wxRA_SPECIFY_COLS wxHORIZONTAL
  328. #define wxRA_SPECIFY_ROWS wxVERTICAL
  329. /* Old names for compatibility */
  330. #define wxRA_HORIZONTAL wxHORIZONTAL
  331. #define wxRA_VERTICAL wxVERTICAL
  332. /*
  333. * wxRadioButton style flag
  334. */
  335. #define wxRB_GROUP 0x0004
  336. #define wxRB_SINGLE 0x0008
  337. /*
  338. * wxScrollBar flags
  339. */
  340. #define wxSB_HORIZONTAL wxHORIZONTAL
  341. #define wxSB_VERTICAL wxVERTICAL
  342. /*
  343. * wxSpinButton flags.
  344. * Note that a wxSpinCtrl is sometimes defined as a wxTextCtrl, and so the
  345. * flags shouldn't overlap with wxTextCtrl flags that can be used for a single
  346. * line controls (currently we reuse wxTE_CHARWRAP and wxTE_RICH2 neither of
  347. * which makes sense for them).
  348. */
  349. #define wxSP_HORIZONTAL wxHORIZONTAL /* 4 */
  350. #define wxSP_VERTICAL wxVERTICAL /* 8 */
  351. #define wxSP_ARROW_KEYS 0x4000
  352. #define wxSP_WRAP 0x8000
  353. /*
  354. * wxTabCtrl flags
  355. */
  356. #define wxTC_RIGHTJUSTIFY 0x0010
  357. #define wxTC_FIXEDWIDTH 0x0020
  358. #define wxTC_TOP 0x0000 /* default */
  359. #define wxTC_LEFT 0x0020
  360. #define wxTC_RIGHT 0x0040
  361. #define wxTC_BOTTOM 0x0080
  362. #define wxTC_MULTILINE 0x0200 /* == wxNB_MULTILINE */
  363. #define wxTC_OWNERDRAW 0x0400
  364. /*
  365. * wxStaticBitmap flags
  366. */
  367. #define wxBI_EXPAND wxEXPAND
  368. /*
  369. * wxStaticLine flags
  370. */
  371. #define wxLI_HORIZONTAL wxHORIZONTAL
  372. #define wxLI_VERTICAL wxVERTICAL
  373. /*
  374. * extended dialog specifiers. these values are stored in a different
  375. * flag and thus do not overlap with other style flags. note that these
  376. * values do not correspond to the return values of the dialogs (for
  377. * those values, look at the wxID_XXX defines).
  378. */
  379. /* wxCENTRE already defined as 0x00000001 */
  380. #define wxYES 0x00000002
  381. #define wxOK 0x00000004
  382. #define wxNO 0x00000008
  383. #define wxYES_NO (wxYES | wxNO)
  384. #define wxCANCEL 0x00000010
  385. #define wxAPPLY 0x00000020
  386. #define wxCLOSE 0x00000040
  387. #define wxOK_DEFAULT 0x00000000 /* has no effect (default) */
  388. #define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
  389. #define wxNO_DEFAULT 0x00000080 /* only valid with wxYES_NO */
  390. #define wxCANCEL_DEFAULT 0x80000000 /* only valid with wxCANCEL */
  391. #define wxICON_EXCLAMATION 0x00000100
  392. #define wxICON_HAND 0x00000200
  393. #define wxICON_WARNING wxICON_EXCLAMATION
  394. #define wxICON_ERROR wxICON_HAND
  395. #define wxICON_QUESTION 0x00000400
  396. #define wxICON_INFORMATION 0x00000800
  397. #define wxICON_STOP wxICON_HAND
  398. #define wxICON_ASTERISK wxICON_INFORMATION
  399. #define wxHELP 0x00001000
  400. #define wxFORWARD 0x00002000
  401. #define wxBACKWARD 0x00004000
  402. #define wxRESET 0x00008000
  403. #define wxMORE 0x00010000
  404. #define wxSETUP 0x00020000
  405. #define wxICON_NONE 0x00040000
  406. #define wxICON_AUTH_NEEDED 0x00080000
  407. #define wxICON_MASK \
  408. (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE)
  409. /* symbolic constant used by all Find()-like functions returning positive */
  410. /* integer on success as failure indicator */
  411. #define wxNOT_FOUND (-1)
  412. /**
  413. Background styles.
  414. @see wxWindow::SetBackgroundStyle()
  415. */
  416. enum wxBackgroundStyle
  417. {
  418. /**
  419. Default background style value indicating that the background may be
  420. erased in the user-defined EVT_ERASE_BACKGROUND handler.
  421. If no such handler is defined (or if it skips the event), the effect of
  422. this style is the same as wxBG_STYLE_SYSTEM. If an empty handler (@em
  423. not skipping the event) is defined, the effect is the same as
  424. wxBG_STYLE_PAINT, i.e. the background is not erased at all until
  425. EVT_PAINT handler is executed.
  426. This is the only background style value for which erase background
  427. events are generated at all.
  428. */
  429. wxBG_STYLE_ERASE,
  430. /**
  431. Use the default background, as determined by the system or the current
  432. theme.
  433. If the window has been assigned a non-default background colour, it
  434. will be used for erasing its background. Otherwise the default
  435. background (which might be a gradient or a pattern) will be used.
  436. EVT_ERASE_BACKGROUND event will not be generated at all for windows
  437. with this style.
  438. */
  439. wxBG_STYLE_SYSTEM,
  440. /**
  441. Indicates that the background is only erased in the user-defined
  442. EVT_PAINT handler.
  443. Using this style avoids flicker which would result from redrawing the
  444. background twice if the EVT_PAINT handler entirely overwrites it. It
  445. must not be used however if the paint handler leaves any parts of the
  446. window unpainted as their contents is then undetermined. Only use it if
  447. you repaint the whole window in your handler.
  448. EVT_ERASE_BACKGROUND event will not be generated at all for windows
  449. with this style.
  450. */
  451. wxBG_STYLE_PAINT,
  452. /* this style is deprecated and doesn't do anything, don't use */
  453. wxBG_STYLE_COLOUR,
  454. /**
  455. Indicates that the window background is not erased, letting the parent
  456. window show through.
  457. Currently this style is only supported in wxOSX and wxGTK with
  458. compositing available, see wxWindow::IsTransparentBackgroundSupported().
  459. */
  460. wxBG_STYLE_TRANSPARENT,
  461. };
  462. /**
  463. Standard IDs.
  464. Notice that some, but @em not all, of these IDs are also stock IDs, i.e.
  465. you can use them for the button or menu items without specifying the label
  466. which will be provided by the underlying platform itself. See @ref page_stockitems "the
  467. list of stock items" for the subset of standard IDs which are stock IDs as well.
  468. */
  469. enum wxStandardID
  470. {
  471. /**
  472. This id delimits the lower bound of the range used by automatically-generated ids
  473. (i.e. those used when wxID_ANY is specified during construction).
  474. */
  475. wxID_AUTO_LOWEST,
  476. /**
  477. This id delimits the upper bound of the range used by automatically-generated ids
  478. (i.e. those used when wxID_ANY is specified during construction).
  479. */
  480. wxID_AUTO_HIGHEST,
  481. /**
  482. No id matches this one when compared to it.
  483. */
  484. wxID_NONE = -3,
  485. /**
  486. Id for a separator line in the menu (invalid for normal item).
  487. */
  488. wxID_SEPARATOR = -2,
  489. /**
  490. Any id: means that we don't care about the id, whether when installing
  491. an event handler or when creating a new window.
  492. */
  493. wxID_ANY = -1,
  494. wxID_LOWEST = 4999,
  495. wxID_OPEN,
  496. wxID_CLOSE,
  497. wxID_NEW,
  498. wxID_SAVE,
  499. wxID_SAVEAS,
  500. wxID_REVERT,
  501. wxID_EXIT,
  502. wxID_UNDO,
  503. wxID_REDO,
  504. wxID_HELP,
  505. wxID_PRINT,
  506. wxID_PRINT_SETUP,
  507. wxID_PAGE_SETUP,
  508. wxID_PREVIEW,
  509. wxID_ABOUT,
  510. wxID_HELP_CONTENTS,
  511. wxID_HELP_INDEX,
  512. wxID_HELP_SEARCH,
  513. wxID_HELP_COMMANDS,
  514. wxID_HELP_PROCEDURES,
  515. wxID_HELP_CONTEXT,
  516. wxID_CLOSE_ALL,
  517. wxID_PREFERENCES,
  518. wxID_EDIT = 5030,
  519. wxID_CUT,
  520. wxID_COPY,
  521. wxID_PASTE,
  522. wxID_CLEAR,
  523. wxID_FIND,
  524. wxID_DUPLICATE,
  525. wxID_SELECTALL,
  526. wxID_DELETE,
  527. wxID_REPLACE,
  528. wxID_REPLACE_ALL,
  529. wxID_PROPERTIES,
  530. wxID_VIEW_DETAILS,
  531. wxID_VIEW_LARGEICONS,
  532. wxID_VIEW_SMALLICONS,
  533. wxID_VIEW_LIST,
  534. wxID_VIEW_SORTDATE,
  535. wxID_VIEW_SORTNAME,
  536. wxID_VIEW_SORTSIZE,
  537. wxID_VIEW_SORTTYPE,
  538. wxID_FILE = 5050,
  539. wxID_FILE1,
  540. wxID_FILE2,
  541. wxID_FILE3,
  542. wxID_FILE4,
  543. wxID_FILE5,
  544. wxID_FILE6,
  545. wxID_FILE7,
  546. wxID_FILE8,
  547. wxID_FILE9,
  548. /** Standard button and menu IDs */
  549. wxID_OK = 5100,
  550. wxID_CANCEL,
  551. wxID_APPLY,
  552. wxID_YES,
  553. wxID_NO,
  554. wxID_STATIC,
  555. wxID_FORWARD,
  556. wxID_BACKWARD,
  557. wxID_DEFAULT,
  558. wxID_MORE,
  559. wxID_SETUP,
  560. wxID_RESET,
  561. wxID_CONTEXT_HELP,
  562. wxID_YESTOALL,
  563. wxID_NOTOALL,
  564. wxID_ABORT,
  565. wxID_RETRY,
  566. wxID_IGNORE,
  567. wxID_ADD,
  568. wxID_REMOVE,
  569. wxID_UP,
  570. wxID_DOWN,
  571. wxID_HOME,
  572. wxID_REFRESH,
  573. wxID_STOP,
  574. wxID_INDEX,
  575. wxID_BOLD,
  576. wxID_ITALIC,
  577. wxID_JUSTIFY_CENTER,
  578. wxID_JUSTIFY_FILL,
  579. wxID_JUSTIFY_RIGHT,
  580. wxID_JUSTIFY_LEFT,
  581. wxID_UNDERLINE,
  582. wxID_INDENT,
  583. wxID_UNINDENT,
  584. wxID_ZOOM_100,
  585. wxID_ZOOM_FIT,
  586. wxID_ZOOM_IN,
  587. wxID_ZOOM_OUT,
  588. wxID_UNDELETE,
  589. wxID_REVERT_TO_SAVED,
  590. wxID_CDROM,
  591. wxID_CONVERT,
  592. wxID_EXECUTE,
  593. wxID_FLOPPY,
  594. wxID_HARDDISK,
  595. wxID_BOTTOM,
  596. wxID_FIRST,
  597. wxID_LAST,
  598. wxID_TOP,
  599. wxID_INFO,
  600. wxID_JUMP_TO,
  601. wxID_NETWORK,
  602. wxID_SELECT_COLOR,
  603. wxID_SELECT_FONT,
  604. wxID_SORT_ASCENDING,
  605. wxID_SORT_DESCENDING,
  606. wxID_SPELL_CHECK,
  607. wxID_STRIKETHROUGH,
  608. /** System menu IDs (used by wxUniv): */
  609. wxID_SYSTEM_MENU = 5200,
  610. wxID_CLOSE_FRAME,
  611. wxID_MOVE_FRAME,
  612. wxID_RESIZE_FRAME,
  613. wxID_MAXIMIZE_FRAME,
  614. wxID_ICONIZE_FRAME,
  615. wxID_RESTORE_FRAME,
  616. /** MDI window menu ids */
  617. wxID_MDI_WINDOW_FIRST = 5230,
  618. wxID_MDI_WINDOW_CASCADE = wxID_MDI_WINDOW_FIRST,
  619. wxID_MDI_WINDOW_TILE_HORZ,
  620. wxID_MDI_WINDOW_TILE_VERT,
  621. wxID_MDI_WINDOW_ARRANGE_ICONS,
  622. wxID_MDI_WINDOW_PREV,
  623. wxID_MDI_WINDOW_NEXT,
  624. wxID_MDI_WINDOW_LAST = wxID_MDI_WINDOW_NEXT,
  625. /** IDs used by generic file dialog (13 consecutive starting from this value) */
  626. wxID_FILEDLGG = 5900,
  627. /** IDs used by generic file ctrl (4 consecutive starting from this value) */
  628. wxID_FILECTRL = 5950,
  629. wxID_HIGHEST = 5999
  630. };
  631. /**
  632. Item kinds for use with wxMenu, wxMenuItem, and wxToolBar.
  633. @see wxMenu::Append(), wxMenuItem::wxMenuItem(), wxToolBar::AddTool()
  634. */
  635. enum wxItemKind
  636. {
  637. wxITEM_SEPARATOR = -1,
  638. /**
  639. Normal tool button / menu item.
  640. @see wxToolBar::AddTool(), wxMenu::AppendItem().
  641. */
  642. wxITEM_NORMAL,
  643. /**
  644. Check (or toggle) tool button / menu item.
  645. @see wxToolBar::AddCheckTool(), wxMenu::AppendCheckItem().
  646. */
  647. wxITEM_CHECK,
  648. /**
  649. Radio tool button / menu item.
  650. @see wxToolBar::AddRadioTool(), wxMenu::AppendRadioItem().
  651. */
  652. wxITEM_RADIO,
  653. /**
  654. Normal tool button with a dropdown arrow next to it. Clicking the
  655. dropdown arrow sends a @c wxEVT_TOOL_DROPDOWN event and may
  656. also display the menu previously associated with the item with
  657. wxToolBar::SetDropdownMenu(). Currently this type of tools is supported
  658. under MSW and GTK.
  659. */
  660. wxITEM_DROPDOWN,
  661. wxITEM_MAX
  662. };
  663. /**
  664. Generic hit test results.
  665. */
  666. enum wxHitTest
  667. {
  668. wxHT_NOWHERE,
  669. /* scrollbar */
  670. wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE,
  671. wxHT_SCROLLBAR_ARROW_LINE_1, /**< left or upper arrow to scroll by line */
  672. wxHT_SCROLLBAR_ARROW_LINE_2, /**< right or down */
  673. wxHT_SCROLLBAR_ARROW_PAGE_1, /**< left or upper arrow to scroll by page */
  674. wxHT_SCROLLBAR_ARROW_PAGE_2, /**< right or down */
  675. wxHT_SCROLLBAR_THUMB, /**< on the thumb */
  676. wxHT_SCROLLBAR_BAR_1, /**< bar to the left/above the thumb */
  677. wxHT_SCROLLBAR_BAR_2, /**< bar to the right/below the thumb */
  678. wxHT_SCROLLBAR_LAST,
  679. /* window */
  680. wxHT_WINDOW_OUTSIDE, /**< not in this window at all */
  681. wxHT_WINDOW_INSIDE, /**< in the client area */
  682. wxHT_WINDOW_VERT_SCROLLBAR, /**< on the vertical scrollbar */
  683. wxHT_WINDOW_HORZ_SCROLLBAR, /**< on the horizontal scrollbar */
  684. wxHT_WINDOW_CORNER, /**< on the corner between 2 scrollbars */
  685. wxHT_MAX
  686. };
  687. /**
  688. Data format IDs used by wxDataFormat.
  689. */
  690. enum wxDataFormatId
  691. {
  692. wxDF_INVALID = 0,
  693. wxDF_TEXT = 1, /* CF_TEXT */
  694. wxDF_BITMAP = 2, /* CF_BITMAP */
  695. wxDF_METAFILE = 3, /* CF_METAFILEPICT */
  696. wxDF_SYLK = 4,
  697. wxDF_DIF = 5,
  698. wxDF_TIFF = 6,
  699. wxDF_OEMTEXT = 7, /* CF_OEMTEXT */
  700. wxDF_DIB = 8, /* CF_DIB */
  701. wxDF_PALETTE = 9,
  702. wxDF_PENDATA = 10,
  703. wxDF_RIFF = 11,
  704. wxDF_WAVE = 12,
  705. wxDF_UNICODETEXT = 13,
  706. wxDF_ENHMETAFILE = 14,
  707. wxDF_FILENAME = 15, /* CF_HDROP */
  708. wxDF_LOCALE = 16,
  709. wxDF_PRIVATE = 20,
  710. wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */
  711. wxDF_MAX
  712. };
  713. /**
  714. Virtual keycodes used by wxKeyEvent and some other wxWidgets functions.
  715. Note that the range <code>0..255</code> corresponds to the characters of
  716. the current locale, in particular the <code>32..127</code> subrange is for
  717. the ASCII symbols, and all the special key values such as @c WXK_END lie
  718. above this range.
  719. */
  720. enum wxKeyCode
  721. {
  722. /**
  723. No key.
  724. This value is returned by wxKeyEvent::GetKeyCode() if there is no
  725. non-Unicode representation for the pressed key (e.g. a Cyrillic letter
  726. was entered when not using a Cyrillic locale) and by
  727. wxKeyEvent::GetUnicodeKey() if there is no Unicode representation for
  728. the key (this happens for the special, non printable, keys only, e.g.
  729. WXK_HOME).
  730. @since 2.9.2 (you can simply use 0 with previous versions).
  731. */
  732. WXK_NONE = 0,
  733. WXK_CONTROL_A = 1,
  734. WXK_CONTROL_B,
  735. WXK_CONTROL_C,
  736. WXK_CONTROL_D,
  737. WXK_CONTROL_E,
  738. WXK_CONTROL_F,
  739. WXK_CONTROL_G,
  740. WXK_CONTROL_H,
  741. WXK_CONTROL_I,
  742. WXK_CONTROL_J,
  743. WXK_CONTROL_K,
  744. WXK_CONTROL_L,
  745. WXK_CONTROL_M,
  746. WXK_CONTROL_N,
  747. WXK_CONTROL_O,
  748. WXK_CONTROL_P,
  749. WXK_CONTROL_Q,
  750. WXK_CONTROL_R,
  751. WXK_CONTROL_S,
  752. WXK_CONTROL_T,
  753. WXK_CONTROL_U,
  754. WXK_CONTROL_V,
  755. WXK_CONTROL_W,
  756. WXK_CONTROL_X,
  757. WXK_CONTROL_Y,
  758. WXK_CONTROL_Z,
  759. WXK_BACK = 8, //!< Backspace.
  760. WXK_TAB = 9,
  761. WXK_RETURN = 13,
  762. WXK_ESCAPE = 27,
  763. WXK_SPACE = 32,
  764. WXK_DELETE = 127,
  765. /**
  766. Special key values.
  767. These are, by design, not compatible with Unicode characters.
  768. If you want to get a Unicode character from a key event, use
  769. wxKeyEvent::GetUnicodeKey() instead.
  770. */
  771. WXK_START = 300,
  772. WXK_LBUTTON,
  773. WXK_RBUTTON,
  774. WXK_CANCEL,
  775. WXK_MBUTTON,
  776. WXK_CLEAR,
  777. WXK_SHIFT,
  778. WXK_ALT,
  779. /** Note that under Mac OS X, to improve compatibility with other
  780. * systems, 'WXK_CONTROL' represents the 'Command' key. Use this
  781. * constant to work with keyboard shortcuts. See 'WXK_RAW_CONTROL'
  782. * to get the state of the actual 'Control' key.
  783. */
  784. WXK_CONTROL,
  785. /** Under Mac OS X, where the 'Command' key is mapped to 'Control'
  786. * to improve compatibility with other systems, WXK_RAW_CONTROL may
  787. * be used to obtain the state of the actual 'Control' key
  788. * ('WXK_CONTROL' would obtain the status of the 'Command' key).
  789. * Under Windows/Linux/Others, this is equivalent to WXK_CONTROL
  790. */
  791. WXK_RAW_CONTROL,
  792. WXK_MENU,
  793. WXK_PAUSE,
  794. WXK_CAPITAL,
  795. WXK_END,
  796. WXK_HOME,
  797. WXK_LEFT,
  798. WXK_UP,
  799. WXK_RIGHT,
  800. WXK_DOWN,
  801. WXK_SELECT,
  802. WXK_PRINT,
  803. WXK_EXECUTE,
  804. WXK_SNAPSHOT,
  805. WXK_INSERT,
  806. WXK_HELP,
  807. WXK_NUMPAD0,
  808. WXK_NUMPAD1,
  809. WXK_NUMPAD2,
  810. WXK_NUMPAD3,
  811. WXK_NUMPAD4,
  812. WXK_NUMPAD5,
  813. WXK_NUMPAD6,
  814. WXK_NUMPAD7,
  815. WXK_NUMPAD8,
  816. WXK_NUMPAD9,
  817. WXK_MULTIPLY,
  818. WXK_ADD,
  819. WXK_SEPARATOR,
  820. WXK_SUBTRACT,
  821. WXK_DECIMAL,
  822. WXK_DIVIDE,
  823. WXK_F1,
  824. WXK_F2,
  825. WXK_F3,
  826. WXK_F4,
  827. WXK_F5,
  828. WXK_F6,
  829. WXK_F7,
  830. WXK_F8,
  831. WXK_F9,
  832. WXK_F10,
  833. WXK_F11,
  834. WXK_F12,
  835. WXK_F13,
  836. WXK_F14,
  837. WXK_F15,
  838. WXK_F16,
  839. WXK_F17,
  840. WXK_F18,
  841. WXK_F19,
  842. WXK_F20,
  843. WXK_F21,
  844. WXK_F22,
  845. WXK_F23,
  846. WXK_F24,
  847. WXK_NUMLOCK,
  848. WXK_SCROLL,
  849. WXK_PAGEUP,
  850. WXK_PAGEDOWN,
  851. WXK_NUMPAD_SPACE,
  852. WXK_NUMPAD_TAB,
  853. WXK_NUMPAD_ENTER,
  854. WXK_NUMPAD_F1,
  855. WXK_NUMPAD_F2,
  856. WXK_NUMPAD_F3,
  857. WXK_NUMPAD_F4,
  858. WXK_NUMPAD_HOME,
  859. WXK_NUMPAD_LEFT,
  860. WXK_NUMPAD_UP,
  861. WXK_NUMPAD_RIGHT,
  862. WXK_NUMPAD_DOWN,
  863. WXK_NUMPAD_PAGEUP,
  864. WXK_NUMPAD_PAGEDOWN,
  865. WXK_NUMPAD_END,
  866. WXK_NUMPAD_BEGIN,
  867. WXK_NUMPAD_INSERT,
  868. WXK_NUMPAD_DELETE,
  869. WXK_NUMPAD_EQUAL,
  870. WXK_NUMPAD_MULTIPLY,
  871. WXK_NUMPAD_ADD,
  872. WXK_NUMPAD_SEPARATOR,
  873. WXK_NUMPAD_SUBTRACT,
  874. WXK_NUMPAD_DECIMAL,
  875. WXK_NUMPAD_DIVIDE,
  876. /** The following key codes are only generated under Windows currently */
  877. WXK_WINDOWS_LEFT,
  878. WXK_WINDOWS_RIGHT,
  879. WXK_WINDOWS_MENU ,
  880. /** This special key code was used to represent the key used for keyboard shortcuts. Under Mac OS X,
  881. * this key maps to the 'Command' (aka logo or 'Apple') key, whereas on Linux/Windows/others
  882. * this is the Control key, with the new semantic of WXK_CONTROL, WXK_COMMAND is not needed anymore
  883. */
  884. WXK_COMMAND,
  885. /** Hardware-specific buttons */
  886. WXK_SPECIAL1 = 193,
  887. WXK_SPECIAL2,
  888. WXK_SPECIAL3,
  889. WXK_SPECIAL4,
  890. WXK_SPECIAL5,
  891. WXK_SPECIAL6,
  892. WXK_SPECIAL7,
  893. WXK_SPECIAL8,
  894. WXK_SPECIAL9,
  895. WXK_SPECIAL10,
  896. WXK_SPECIAL11,
  897. WXK_SPECIAL12,
  898. WXK_SPECIAL13,
  899. WXK_SPECIAL14,
  900. WXK_SPECIAL15,
  901. WXK_SPECIAL16,
  902. WXK_SPECIAL17,
  903. WXK_SPECIAL18,
  904. WXK_SPECIAL19,
  905. WXK_SPECIAL20
  906. };
  907. /**
  908. This enum contains bit mask constants used in wxKeyEvent.
  909. */
  910. enum wxKeyModifier
  911. {
  912. wxMOD_NONE = 0x0000,
  913. wxMOD_ALT = 0x0001,
  914. /** Ctlr Key, corresponds to Command key on OS X */
  915. wxMOD_CONTROL = 0x0002,
  916. wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL,
  917. wxMOD_SHIFT = 0x0004,
  918. wxMOD_META = 0x0008,
  919. wxMOD_WIN = wxMOD_META,
  920. /** used to describe the true Ctrl Key under OSX,
  921. identic to @c wxMOD_CONTROL on other platforms */
  922. wxMOD_RAW_CONTROL,
  923. /** deprecated, identic to @c wxMOD_CONTROL on all platforms */
  924. wxMOD_CMD = wxMOD_CONTROL,
  925. wxMOD_ALL = 0xffff
  926. };
  927. /**
  928. Paper size types for use with the printing framework.
  929. @see overview_printing, wxPrintData::SetPaperId()
  930. */
  931. enum wxPaperSize
  932. {
  933. wxPAPER_10X11, ///< 10 x 11 in
  934. wxPAPER_10X14, ///< 10-by-14-inch sheet
  935. wxPAPER_11X17, ///< 11-by-17-inch sheet
  936. wxPAPER_12X11, ///< 12 x 11 in
  937. wxPAPER_15X11, ///< 15 x 11 in
  938. wxPAPER_9X11, ///< 9 x 11 in
  939. wxPAPER_A2, ///< A2 420 x 594 mm
  940. wxPAPER_A3, ///< A3 sheet, 297 by 420 millimeters
  941. wxPAPER_A3_EXTRA, ///< A3 Extra 322 x 445 mm
  942. wxPAPER_A3_EXTRA_TRANSVERSE, ///< A3 Extra Transverse 322 x 445 mm
  943. wxPAPER_A3_ROTATED, ///< A3 Rotated 420 x 297 mm
  944. wxPAPER_A3_TRANSVERSE, ///< A3 Transverse 297 x 420 mm
  945. wxPAPER_A4, ///< A4 Sheet, 210 by 297 millimeters
  946. wxPAPER_A4SMALL, ///< A4 small sheet, 210 by 297 millimeters
  947. wxPAPER_A4_EXTRA, ///< A4 Extra 9.27 x 12.69 in
  948. wxPAPER_A4_PLUS, ///< A4 Plus 210 x 330 mm
  949. wxPAPER_A4_ROTATED, ///< A4 Rotated 297 x 210 mm
  950. wxPAPER_A4_TRANSVERSE, ///< A4 Transverse 210 x 297 mm
  951. wxPAPER_A5, ///< A5 sheet, 148 by 210 millimeters
  952. wxPAPER_A5_EXTRA, ///< A5 Extra 174 x 235 mm
  953. wxPAPER_A5_ROTATED, ///< A5 Rotated 210 x 148 mm
  954. wxPAPER_A5_TRANSVERSE, ///< A5 Transverse 148 x 210 mm
  955. wxPAPER_A6, ///< A6 105 x 148 mm
  956. wxPAPER_A6_ROTATED, ///< A6 Rotated 148 x 105 mm
  957. wxPAPER_A_PLUS, ///< SuperA/SuperA/A4 227 x 356 mm
  958. wxPAPER_B4, ///< B4 sheet, 250 by 354 millimeters
  959. wxPAPER_B4_JIS_ROTATED, ///< B4 (JIS) Rotated 364 x 257 mm
  960. wxPAPER_B5, ///< B5 sheet, 182-by-257-millimeter paper
  961. wxPAPER_B5_EXTRA, ///< B5 (ISO) Extra 201 x 276 mm
  962. wxPAPER_B5_JIS_ROTATED, ///< B5 (JIS) Rotated 257 x 182 mm
  963. wxPAPER_B5_TRANSVERSE, ///< B5 (JIS) Transverse 182 x 257 mm
  964. wxPAPER_B6_JIS, ///< B6 (JIS) 128 x 182 mm
  965. wxPAPER_B6_JIS_ROTATED, ///< B6 (JIS) Rotated 182 x 128 mm
  966. wxPAPER_B_PLUS, ///< SuperB/SuperB/A3 305 x 487 mm
  967. wxPAPER_CSHEET, ///< C Sheet, 17 by 22 inches
  968. wxPAPER_DBL_JAPANESE_POSTCARD, ///< Japanese Double Postcard 200 x 148 mm
  969. wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED, ///< Double Japanese Postcard Rotated 148 x 200 mm
  970. wxPAPER_DSHEET, ///< D Sheet, 22 by 34 inches
  971. wxPAPER_ENV_10, ///< #10 Envelope, 4 1/8 by 9 1/2 inches
  972. wxPAPER_ENV_11, ///< #11 Envelope, 4 1/2 by 10 3/8 inches
  973. wxPAPER_ENV_12, ///< #12 Envelope, 4 3/4 by 11 inches
  974. wxPAPER_ENV_14, ///< #14 Envelope, 5 by 11 1/2 inches
  975. wxPAPER_ENV_9, ///< #9 Envelope, 3 7/8 by 8 7/8 inches
  976. wxPAPER_ENV_B4, ///< B4 Envelope, 250 by 353 millimeters
  977. wxPAPER_ENV_B5, ///< B5 Envelope, 176 by 250 millimeters
  978. wxPAPER_ENV_B6, ///< B6 Envelope, 176 by 125 millimeters
  979. wxPAPER_ENV_C3, ///< C3 Envelope, 324 by 458 millimeters
  980. wxPAPER_ENV_C4, ///< C4 Envelope, 229 by 324 millimeters
  981. wxPAPER_ENV_C5, ///< C5 Envelope, 162 by 229 millimeters
  982. wxPAPER_ENV_C6, ///< C6 Envelope, 114 by 162 millimeters
  983. wxPAPER_ENV_C65, ///< C65 Envelope, 114 by 229 millimeters
  984. wxPAPER_ENV_DL, ///< DL Envelope, 110 by 220 millimeters
  985. wxPAPER_ENV_INVITE, ///< Envelope Invite 220 x 220 mm
  986. wxPAPER_ENV_ITALY, ///< Italy Envelope, 110 by 230 millimeters
  987. wxPAPER_ENV_MONARCH, ///< Monarch Envelope, 3 7/8 by 7 1/2 inches
  988. wxPAPER_ENV_PERSONAL, ///< 6 3/4 Envelope, 3 5/8 by 6 1/2 inches
  989. wxPAPER_ESHEET, ///< E Sheet, 34 by 44 inches
  990. wxPAPER_EXECUTIVE, ///< Executive, 7 1/4 by 10 1/2 inches
  991. wxPAPER_FANFOLD_LGL_GERMAN, ///< German Legal Fanfold, 8 1/2 by 13 inches
  992. wxPAPER_FANFOLD_STD_GERMAN, ///< German Std Fanfold, 8 1/2 by 12 inches
  993. wxPAPER_FANFOLD_US, ///< US Std Fanfold, 14 7/8 by 11 inches
  994. wxPAPER_FOLIO, ///< Folio, 8-1/2-by-13-inch paper
  995. wxPAPER_ISO_B4, ///< B4 (ISO) 250 x 353 mm
  996. wxPAPER_JAPANESE_POSTCARD, ///< Japanese Postcard 100 x 148 mm
  997. wxPAPER_JAPANESE_POSTCARD_ROTATED, ///< Japanese Postcard Rotated 148 x 100 mm
  998. wxPAPER_JENV_CHOU3, ///< Japanese Envelope Chou #3
  999. wxPAPER_JENV_CHOU3_ROTATED, ///< Japanese Envelope Chou #3 Rotated
  1000. wxPAPER_JENV_CHOU4, ///< Japanese Envelope Chou #4
  1001. wxPAPER_JENV_CHOU4_ROTATED, ///< Japanese Envelope Chou #4 Rotated
  1002. wxPAPER_JENV_KAKU2, ///< Japanese Envelope Kaku #2
  1003. wxPAPER_JENV_KAKU2_ROTATED, ///< Japanese Envelope Kaku #2 Rotated
  1004. wxPAPER_JENV_KAKU3, ///< Japanese Envelope Kaku #3
  1005. wxPAPER_JENV_KAKU3_ROTATED, ///< Japanese Envelope Kaku #3 Rotated
  1006. wxPAPER_JENV_YOU4, ///< Japanese Envelope You #4
  1007. wxPAPER_JENV_YOU4_ROTATED, ///< Japanese Envelope You #4 Rotated
  1008. wxPAPER_LEDGER, ///< Ledger, 17 by 11 inches
  1009. wxPAPER_LEGAL, ///< Legal, 8 1/2 by 14 inches
  1010. wxPAPER_LEGAL_EXTRA, ///< Legal Extra 9.5 x 15 in
  1011. wxPAPER_LETTER, ///< Letter, 8 1/2 by 11 inches
  1012. wxPAPER_LETTERSMALL, ///< Letter Small, 8 1/2 by 11 inches
  1013. wxPAPER_LETTER_EXTRA, ///< Letter Extra 9.5 x 12 in
  1014. wxPAPER_LETTER_EXTRA_TRANSVERSE, ///< Letter Extra Transverse 9.5 x 12 in
  1015. wxPAPER_LETTER_PLUS, ///< Letter Plus 8.5 x 12.69 in
  1016. wxPAPER_LETTER_ROTATED, ///< Letter Rotated 11 x 8 1/2 in
  1017. wxPAPER_LETTER_TRANSVERSE, ///< Letter Transverse 8.5 x 11 in
  1018. wxPAPER_NONE, ///< Use specific dimensions
  1019. wxPAPER_NOTE, ///< Note, 8 1/2 by 11 inches
  1020. wxPAPER_P16K, ///< PRC 16K 146 x 215 mm
  1021. wxPAPER_P16K_ROTATED, ///< PRC 16K Rotated
  1022. wxPAPER_P32K, ///< PRC 32K 97 x 151 mm
  1023. wxPAPER_P32KBIG, ///< PRC 32K(Big) 97 x 151 mm
  1024. wxPAPER_P32KBIG_ROTATED, ///< PRC 32K(Big) Rotated
  1025. wxPAPER_P32K_ROTATED, ///< PRC 32K Rotated
  1026. wxPAPER_PENV_1, ///< PRC Envelope #1 102 x 165 mm
  1027. wxPAPER_PENV_10, ///< PRC Envelope #10 324 x 458 mm
  1028. wxPAPER_PENV_10_ROTATED, ///< PRC Envelope #10 Rotated 458 x 324 m
  1029. wxPAPER_PENV_1_ROTATED, ///< PRC Envelope #1 Rotated 165 x 102 mm
  1030. wxPAPER_PENV_2, ///< PRC Envelope #2 102 x 176 mm
  1031. wxPAPER_PENV_2_ROTATED, ///< PRC Envelope #2 Rotated 176 x 102 mm
  1032. wxPAPER_PENV_3, ///< PRC Envelope #3 125 x 176 mm
  1033. wxPAPER_PENV_3_ROTATED, ///< PRC Envelope #3 Rotated 176 x 125 mm
  1034. wxPAPER_PENV_4, ///< PRC Envelope #4 110 x 208 mm
  1035. wxPAPER_PENV_4_ROTATED, ///< PRC Envelope #4 Rotated 208 x 110 mm
  1036. wxPAPER_PENV_5, ///< PRC Envelope #5 110 x 220 mm
  1037. wxPAPER_PENV_5_ROTATED, ///< PRC Envelope #5 Rotated 220 x 110 mm
  1038. wxPAPER_PENV_6, ///< PRC Envelope #6 120 x 230 mm
  1039. wxPAPER_PENV_6_ROTATED, ///< PRC Envelope #6 Rotated 230 x 120 mm
  1040. wxPAPER_PENV_7, ///< PRC Envelope #7 160 x 230 mm
  1041. wxPAPER_PENV_7_ROTATED, ///< PRC Envelope #7 Rotated 230 x 160 mm
  1042. wxPAPER_PENV_8, ///< PRC Envelope #8 120 x 309 mm
  1043. wxPAPER_PENV_8_ROTATED, ///< PRC Envelope #8 Rotated 309 x 120 mm
  1044. wxPAPER_PENV_9, ///< PRC Envelope #9 229 x 324 mm
  1045. wxPAPER_PENV_9_ROTATED, ///< PRC Envelope #9 Rotated 324 x 229 mm
  1046. wxPAPER_QUARTO, ///< Quarto, 215-by-275-millimeter paper
  1047. wxPAPER_STATEMENT, ///< Statement, 5 1/2 by 8 1/2 inches
  1048. wxPAPER_TABLOID, ///< Tabloid, 11 by 17 inches
  1049. wxPAPER_TABLOID_EXTRA ///< Tabloid Extra 11.69 x 18 in
  1050. };
  1051. /**
  1052. Printing orientation
  1053. */
  1054. enum wxPrintOrientation
  1055. {
  1056. wxPORTRAIT,
  1057. wxLANDSCAPE
  1058. };
  1059. /**
  1060. Duplex printing modes.
  1061. */
  1062. enum wxDuplexMode
  1063. {
  1064. wxDUPLEX_SIMPLEX, /**< Non-duplex */
  1065. wxDUPLEX_HORIZONTAL,
  1066. wxDUPLEX_VERTICAL
  1067. };
  1068. /**
  1069. Print quality.
  1070. */
  1071. #define wxPRINT_QUALITY_HIGH -1
  1072. #define wxPRINT_QUALITY_MEDIUM -2
  1073. #define wxPRINT_QUALITY_LOW -3
  1074. #define wxPRINT_QUALITY_DRAFT -4
  1075. typedef int wxPrintQuality;
  1076. /**
  1077. Print mode (currently PostScript only).
  1078. */
  1079. enum wxPrintMode
  1080. {
  1081. wxPRINT_MODE_NONE = 0,
  1082. wxPRINT_MODE_PREVIEW = 1, /**< Preview in external application */
  1083. wxPRINT_MODE_FILE = 2, /**< Print to file */
  1084. wxPRINT_MODE_PRINTER = 3, /**< Send to printer */
  1085. wxPRINT_MODE_STREAM = 4 /**< Send postscript data into a stream */
  1086. };
  1087. /**
  1088. Flags which can be used in wxWindow::UpdateWindowUI().
  1089. */
  1090. enum wxUpdateUI
  1091. {
  1092. wxUPDATE_UI_NONE,
  1093. wxUPDATE_UI_RECURSE,
  1094. wxUPDATE_UI_FROMIDLE /**< Invoked from On(Internal)Idle */
  1095. };
  1096. // ----------------------------------------------------------------------------
  1097. // constants
  1098. // ----------------------------------------------------------------------------
  1099. /**
  1100. Top level window styles common to wxFrame and wxDialog
  1101. */
  1102. #define wxSTAY_ON_TOP 0x8000
  1103. #define wxICONIZE 0x4000
  1104. #define wxMINIMIZE wxICONIZE
  1105. #define wxMAXIMIZE 0x2000
  1106. #define wxCLOSE_BOX 0x1000
  1107. #define wxSYSTEM_MENU 0x0800
  1108. #define wxMINIMIZE_BOX 0x0400
  1109. #define wxMAXIMIZE_BOX 0x0200
  1110. #define wxTINY_CAPTION 0x0080 // clashes with wxNO_DEFAULT
  1111. #define wxRESIZE_BORDER 0x0040
  1112. /**
  1113. C99-like sized MIN/MAX constants for all integer types.
  1114. For each @c n in the set 8, 16, 32, 64 we define @c wxINTn_MIN, @c
  1115. wxINTn_MAX and @c wxUINTc_MAX (@c wxUINTc_MIN is always 0 and so is not
  1116. defined).
  1117. */
  1118. //@{
  1119. #define wxINT8_MIN CHAR_MIN
  1120. #define wxINT8_MAX CHAR_MAX
  1121. #define wxUINT8_MAX UCHAR_MAX
  1122. #define wxINT16_MIN SHRT_MIN
  1123. #define wxINT16_MAX SHRT_MAX
  1124. #define wxUINT16_MAX USHRT_MAX
  1125. #define wxINT32_MIN INT_MIN-or-LONG_MIN
  1126. #define wxINT32_MAX INT_MAX-or-LONG_MAX
  1127. #define wxUINT32_MAX UINT_MAX-or-LONG_MAX
  1128. #define wxINT64_MIN LLONG_MIN
  1129. #define wxINT64_MAX LLONG_MAX
  1130. #define wxUINT64_MAX ULLONG_MAX
  1131. //@}
  1132. // ----------------------------------------------------------------------------
  1133. // types
  1134. // ----------------------------------------------------------------------------
  1135. /** The type for screen and DC coordinates. */
  1136. typedef int wxCoord;
  1137. /** A special value meaning "use default coordinate". */
  1138. wxCoord wxDefaultCoord = -1;
  1139. //@{
  1140. /** 8 bit type (the mapping is more complex than a simple @c typedef and is not shown here). */
  1141. typedef signed char wxInt8;
  1142. typedef unsigned char wxUint8;
  1143. typedef wxUint8 wxByte;
  1144. //@}
  1145. //@{
  1146. /** 16 bit type (the mapping is more complex than a simple @c typedef and is not shown here). */
  1147. typedef signed short wxInt16;
  1148. typedef unsigned short wxUint16;
  1149. typedef wxUint16 wxWord;
  1150. typedef wxUint16 wxChar16;
  1151. //@}
  1152. //@{
  1153. /** 32 bit type (the mapping is more complex than a simple @c typedef and is not shown here). */
  1154. typedef int wxInt32;
  1155. typedef unsigned int wxUint32;
  1156. typedef wxUint32 wxDword;
  1157. typedef wxUint32 wxChar32;
  1158. //@}
  1159. //@{
  1160. /** 64 bit type (the mapping is more complex than a simple @c typedef and is not shown here). */
  1161. typedef wxLongLong_t wxInt64;
  1162. typedef wxULongLong_t wxUint64;
  1163. //@}
  1164. //@{
  1165. /**
  1166. Signed and unsigned integral types big enough to contain all of @c long,
  1167. @c size_t and @c void*.
  1168. (The mapping is more complex than a simple @c typedef and is not shown here).
  1169. */
  1170. typedef ssize_t wxIntPtr;
  1171. typedef size_t wxUIntPtr;
  1172. //@}
  1173. /**
  1174. 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits ).
  1175. (The mapping is more complex than a simple @c typedef and is not shown here).
  1176. */
  1177. typedef float wxFloat32;
  1178. /**
  1179. 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits ).
  1180. (The mapping is more complex than a simple @c typedef and is not shown here).
  1181. */
  1182. typedef double wxFloat64;
  1183. /**
  1184. Native fastest representation that has at least wxFloat64 precision, so use
  1185. the IEEE types for storage, and this for calculations.
  1186. (The mapping is more complex than a simple @c typedef and is not shown here).
  1187. */
  1188. typedef double wxDouble;
  1189. // ----------------------------------------------------------------------------
  1190. // macros
  1191. // ----------------------------------------------------------------------------
  1192. /** @addtogroup group_funcmacro_byteorder */
  1193. //@{
  1194. /**
  1195. This macro will swap the bytes of the @a value variable from little endian
  1196. to big endian or vice versa unconditionally, i.e. independently of the
  1197. current platform.
  1198. @header{wx/defs.h}
  1199. */
  1200. #define wxINT32_SWAP_ALWAYS( wxInt32_value )
  1201. #define wxUINT32_SWAP_ALWAYS( wxUint32_value )
  1202. #define wxINT16_SWAP_ALWAYS( wxInt16_value )
  1203. #define wxUINT16_SWAP_ALWAYS( wxUint16_value )
  1204. //@}
  1205. /** @addtogroup group_funcmacro_byteorder */
  1206. //@{
  1207. /**
  1208. This macro will swap the bytes of the @a value variable from little endian
  1209. to big endian or vice versa if the program is compiled on a big-endian
  1210. architecture (such as Sun work stations). If the program has been compiled
  1211. on a little-endian architecture, the value will be unchanged.
  1212. Use these macros to read data from and write data to a file that stores
  1213. data in little-endian (for example Intel i386) format.
  1214. @header{wx/defs.h}
  1215. */
  1216. #define wxINT32_SWAP_ON_BE( wxInt32_value )
  1217. #define wxUINT32_SWAP_ON_BE( wxUint32_value )
  1218. #define wxINT16_SWAP_ON_BE( wxInt16_value )
  1219. #define wxUINT16_SWAP_ON_BE( wxUint16_value )
  1220. //@}
  1221. /** @addtogroup group_funcmacro_byteorder */
  1222. //@{
  1223. /**
  1224. This macro will swap the bytes of the @a value variable from little endian
  1225. to big endian or vice versa if the program is compiled on a little-endian
  1226. architecture (such as Intel PCs). If the program has been compiled on a
  1227. big-endian architecture, the value will be unchanged.
  1228. Use these macros to read data from and write data to a file that stores
  1229. data in big-endian format.
  1230. @header{wx/defs.h}
  1231. */
  1232. #define wxINT32_SWAP_ON_LE( wxInt32_value )
  1233. #define wxUINT32_SWAP_ON_LE( wxUint32_value )
  1234. #define wxINT16_SWAP_ON_LE( wxInt16_value )
  1235. #define wxUINT16_SWAP_ON_LE( wxUint16_value )
  1236. //@}
  1237. /** @addtogroup group_funcmacro_misc */
  1238. //@{
  1239. /**
  1240. This macro can be used in a class declaration to disable the generation of
  1241. default assignment operator.
  1242. Some classes have a well-defined copy constructor but cannot have an
  1243. assignment operator, typically because they can't be modified once created.
  1244. In such case, this macro can be used to disable the automatic assignment
  1245. operator generation.
  1246. @see wxDECLARE_NO_COPY_CLASS()
  1247. */
  1248. #define wxDECLARE_NO_ASSIGN_CLASS(classname)
  1249. /**
  1250. This macro can be used in a class declaration to disable the generation of
  1251. default copy ctor and assignment operator.
  1252. Some classes don't have a well-defined copying semantics. In this case the
  1253. standard C++ convention is to not allow copying them. One way of achieving
  1254. it is to use this macro which simply defines a private copy constructor and
  1255. assignment operator.
  1256. Beware that simply not defining copy constructor and assignment operator is
  1257. @em not enough as the compiler would provide its own automatically-generated
  1258. versions of them -- hence the usefulness of this macro.
  1259. Example of use:
  1260. @code
  1261. class FooWidget
  1262. {
  1263. public:
  1264. FooWidget();
  1265. ...
  1266. private:
  1267. // widgets can't be copied
  1268. wxDECLARE_NO_COPY_CLASS(FooWidget);
  1269. };
  1270. @endcode
  1271. Notice that a semicolon must be used after this macro and that it changes
  1272. the access specifier to private internally so it is better to use it at the
  1273. end of the class declaration.
  1274. @see wxDECLARE_NO_ASSIGN_CLASS(), wxDECLARE_NO_COPY_TEMPLATE_CLASS()
  1275. */
  1276. #define wxDECLARE_NO_COPY_CLASS(classname)
  1277. /**
  1278. Analog of wxDECLARE_NO_COPY_CLASS() for template classes.
  1279. This macro can be used for template classes (with a single template
  1280. parameter) for the same purpose as wxDECLARE_NO_COPY_CLASS() is used with the
  1281. non-template classes.
  1282. @param classname The name of the template class.
  1283. @param arg The name of the template parameter.
  1284. @see wxDECLARE_NO_COPY_TEMPLATE_CLASS_2
  1285. */
  1286. #define wxDECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg)
  1287. /**
  1288. Analog of wxDECLARE_NO_COPY_TEMPLATE_CLASS() for templates with 2
  1289. parameters.
  1290. This macro can be used for template classes with two template
  1291. parameters for the same purpose as wxDECLARE_NO_COPY_CLASS() is used with
  1292. the non-template classes.
  1293. @param classname The name of the template class.
  1294. @param arg1 The name of the first template parameter.
  1295. @param arg2 The name of the second template parameter.
  1296. @see wxDECLARE_NO_COPY_TEMPLATE_CLASS
  1297. */
  1298. #define wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(classname, arg1, arg2)
  1299. /**
  1300. A function which deletes and nulls the pointer.
  1301. This function uses operator delete to free the pointer and also sets it to
  1302. @NULL. Notice that this does @em not work for arrays, use wxDELETEA() for
  1303. them.
  1304. @code
  1305. MyClass *ptr = new MyClass;
  1306. ...
  1307. wxDELETE(ptr);
  1308. wxASSERT(!ptr);
  1309. @endcode
  1310. @header{wx/defs.h}
  1311. */
  1312. template <typename T> wxDELETE(T*& ptr);
  1313. /**
  1314. A function which deletes and nulls the pointer.
  1315. This function uses vector operator delete (@c delete[]) to free the array
  1316. pointer and also sets it to @NULL. Notice that this does @em not work for
  1317. non-array pointers, use wxDELETE() for them.
  1318. @code
  1319. MyClass *array = new MyClass[17];
  1320. ...
  1321. wxDELETEA(array);
  1322. wxASSERT(!array);
  1323. @endcode
  1324. @see wxDELETE()
  1325. @header{wx/defs.h}
  1326. */
  1327. template <typename T> wxDELETEA(T*& array);
  1328. /**
  1329. Generate deprecation warning with the given message when a function is
  1330. used.
  1331. This macro can be used to generate a warning indicating that a function is
  1332. deprecated (i.e. scheduled for removal in the future) and explaining why is
  1333. it so and/or what should it be replaced with. It applies to the declaration
  1334. following it, for example:
  1335. @code
  1336. wxDEPRECATED_MSG("use safer overload returning wxString instead")
  1337. void wxGetSomething(char* buf, size_t len);
  1338. wxString wxGetSomething();
  1339. @endcode
  1340. For compilers other than clang, g++ 4.5 or later and MSVC 8 (MSVS 2005) or
  1341. later, the message is ignored and a generic deprecation warning is given if
  1342. possible, i.e. if the compiler is g++ (any supported version) or MSVC 7
  1343. (MSVS 2003) or later.
  1344. @since 3.0
  1345. @header{wx/defs.h}
  1346. */
  1347. /**
  1348. This macro can be used around a function declaration to generate warnings
  1349. indicating that this function is deprecated (i.e. obsolete and planned to
  1350. be removed in the future) when it is used.
  1351. Notice that this macro itself is deprecated in favour of wxDEPRECATED_MSG()!
  1352. Only Visual C++ 7 and higher and g++ compilers currently support this
  1353. functionality.
  1354. Example of use:
  1355. @code
  1356. // old function, use wxString version instead
  1357. wxDEPRECATED( void wxGetSomething(char *buf, size_t len) );
  1358. // ...
  1359. wxString wxGetSomething();
  1360. @endcode
  1361. @header{wx/defs.h}
  1362. */
  1363. #define wxDEPRECATED(function)
  1364. /**
  1365. This is a special version of wxDEPRECATED() macro which only does something
  1366. when the deprecated function is used from the code outside wxWidgets itself
  1367. but doesn't generate warnings when it is used from wxWidgets.
  1368. It is used with the virtual functions which are called by the library
  1369. itself -- even if such function is deprecated the library still has to call
  1370. it to ensure that the existing code overriding it continues to work, but
  1371. the use of this macro ensures that a deprecation warning will be generated
  1372. if this function is used from the user code or, in case of Visual C++, even
  1373. when it is simply overridden.
  1374. @header{wx/defs.h}
  1375. */
  1376. #define wxDEPRECATED_BUT_USED_INTERNALLY(function)
  1377. /**
  1378. This macro is similar to wxDEPRECATED() but can be used to not only declare
  1379. the function @a function as deprecated but to also provide its (inline)
  1380. implementation @a body.
  1381. It can be used as following:
  1382. @code
  1383. class wxFoo
  1384. {
  1385. public:
  1386. // OldMethod() is deprecated, use NewMethod() instead
  1387. void NewMethod();
  1388. wxDEPRECATED_INLINE( void OldMethod(), NewMethod(); )
  1389. };
  1390. @endcode
  1391. @header{wx/defs.h}
  1392. */
  1393. #define wxDEPRECATED_INLINE(func, body)
  1394. /**
  1395. A helper macro allowing to easily define a simple deprecated accessor.
  1396. Compared to wxDEPRECATED_INLINE() it saves a @c return statement and,
  1397. especially, a strangely looking semicolon inside a macro.
  1398. Example of use
  1399. @code
  1400. class wxFoo
  1401. {
  1402. public:
  1403. int GetValue() const { return m_value; }
  1404. // this one is deprecated because it was erroneously non-const
  1405. wxDEPRECATED_ACCESSOR( int GetValue(), m_value )
  1406. private:
  1407. int m_value;
  1408. };
  1409. @endcode
  1410. */
  1411. #define wxDEPRECATED_ACCESSOR(func, what)
  1412. /**
  1413. Combination of wxDEPRECATED_BUT_USED_INTERNALLY() and wxDEPRECATED_INLINE().
  1414. This macro should be used for deprecated functions called by the library
  1415. itself (usually for backwards compatibility reasons) and which are defined
  1416. inline.
  1417. @header{wx/defs.h}
  1418. */
  1419. #define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body)
  1420. /**
  1421. @c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if
  1422. the compiler supports it or nothing otherwise. Thus, it can be used even in
  1423. the code which might have to be compiled with an old compiler without
  1424. support for this language feature but still take advantage of it when it is
  1425. available.
  1426. @header{wx/defs.h}
  1427. */
  1428. #define wxEXPLICIT
  1429. /**
  1430. GNU C++ compiler gives a warning for any class whose destructor is private
  1431. unless it has a friend. This warning may sometimes be useful but it doesn't
  1432. make sense for reference counted class which always delete themselves
  1433. (hence destructor should be private) but don't necessarily have any
  1434. friends, so this macro is provided to disable the warning in such case. The
  1435. @a name parameter should be the name of the class but is only used to
  1436. construct a unique friend class name internally.
  1437. Example of using the macro:
  1438. @code
  1439. class RefCounted
  1440. {
  1441. public:
  1442. RefCounted() { m_nRef = 1; }
  1443. void IncRef() { m_nRef++ ; }
  1444. void DecRef() { if ( !--m_nRef ) delete this; }
  1445. private:
  1446. ~RefCounted() { }
  1447. wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted)
  1448. };
  1449. @endcode
  1450. Notice that there should be no semicolon after this macro.
  1451. @header{wx/defs.h}
  1452. */
  1453. #define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name)
  1454. /**
  1455. Swaps the contents of two variables.
  1456. This is similar to std::swap() but can be used even on the platforms where
  1457. the standard C++ library is not available (if you don't target such
  1458. platforms, please use std::swap() instead).
  1459. The function relies on type T being copy constructible and assignable.
  1460. Example of use:
  1461. @code
  1462. int x = 3,
  1463. y = 4;
  1464. wxSwap(x, y);
  1465. wxASSERT( x == 4 && y == 3 );
  1466. @endcode
  1467. */
  1468. template <typename T> wxSwap(T& first, T& second);
  1469. /**
  1470. This macro is the same as the standard C99 @c va_copy for the compilers
  1471. which support it or its replacement for those that don't. It must be used
  1472. to preserve the value of a @c va_list object if you need to use it after
  1473. passing it to another function because it can be modified by the latter.
  1474. As with @c va_start, each call to @c wxVaCopy must have a matching
  1475. @c va_end.
  1476. @header{wx/defs.h}
  1477. */
  1478. void wxVaCopy(va_list argptrDst, va_list argptrSrc);
  1479. //@}