Back to index

plt-scheme  4.2.1
wx.h
Go to the documentation of this file.
00001 /*                                                      -*- C++ -*-
00002  *
00003  * Purpose: wxWindows Xt-port main include file
00004  *
00005  * Authors: Markus Holzem and Julian Smart
00006  *
00007  * Copyright: (C) 2004-2009 PLT Scheme Inc.
00008  * Copyright: (C) 1995, AIAI, University of Edinburgh (Julian)
00009  * Copyright: (C) 1995, GNU (Markus)
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00024  * 02110-1301 USA.
00025  */
00026 
00027 //=============================================================================
00028 // basic includes for wxWindows
00029 //=============================================================================
00030 
00031 #ifndef wx_h
00032 #define wx_h
00033 
00034 #if   defined (Uses_XtIntrinsicP)
00035 #      include <X11/IntrinsicP.h>
00036 #      define  Have_X_Types
00037 #      define  Have_Xt_Types
00038 #elif defined (Uses_XtIntrinsic)
00039 #      include <X11/Intrinsic.h>
00040 #      define  Have_X_Types
00041 #      define  Have_Xt_Types
00042 #elif defined (Uses_XLib)
00043 #      include <X11/Xlib.h>
00044 #      include <X11/Xutil.h>
00045 #      include <X11/Xresource.h>
00046 #      define  Have_X_Types
00047 #endif
00048 
00049 // standard include files needed in addition to wx include files
00050 #include <stdio.h>
00051 #include <stdlib.h>
00052 #include <string.h>
00053 
00054 // standard wx include files
00055 #include <wxSetup.h>
00056 #include <wxVersion.h>
00057 
00058 #include <wxDefines.h>
00059 
00060 #include <Application/GlobalData.h>
00061 #include <Dialogs/Dialogs.h>
00062 #include <Utilities/Utilities.h>
00063 
00064 #include "../../wxcommon/wxGC.h"
00065 
00066 #endif // wx_h
00067 
00068 //=============================================================================
00069 // If the application doesn't use Uses_..., emulate the AIAI behaviour
00070 //=============================================================================
00071 
00072 #ifdef _NO_USES_DEFINES
00073 #      define Uses_wxApp
00074 #      define Uses_wxButton
00075 #      define Uses_wxCanvas
00076 #      define Uses_wxCanvasDC
00077 #      define Uses_wxCheckBox
00078 #      define Uses_wxChoice
00079 #      define Uses_wxDC
00080 #      define Uses_wxDialogBox
00081 #      define Uses_wxEvent
00082 #      define Uses_wxFrame
00083 #      define Uses_wxGDI
00084 #      define Uses_wxGauge
00085 #      define Uses_wxGroupBox
00086 #      define Uses_wxLayout
00087 #      define Uses_wxList
00088 #      define Uses_wxListBox
00089 #      define Uses_wxMemoryDC
00090 #      define Uses_wxMenu
00091 #      define Uses_wxMenuBar
00092 #      define Uses_wxMessage
00093 #      define Uses_wxMultiText
00094 #      define Uses_wxObject
00095 #      define Uses_wxPanel
00096 #      define Uses_wxPanelDC
00097 #      define Uses_wxPathList
00098 #      define Uses_wxPostScriptDC
00099 #      define Uses_wxRadioBox
00100 #      define Uses_wxSlider
00101 #      define Uses_wxText
00102 #      define Uses_wxTextWindow
00103 #      define Uses_wxWindow
00104 #endif
00105 
00106 //=============================================================================
00107 // class dependencies
00108 //=============================================================================
00109 
00110 //--- application -------------------------------------------------------------
00111 
00112 #if defined(Uses_wxApp)
00113 #      define Uses_wxObject
00114 #endif
00115 
00116 //--- PrologIO RPC ------------------------------------------------------------
00117 
00118 #if defined(Uses_wxRPC)
00119 #      define Uses_wxIPC
00120 #      define Uses_wxClient
00121 #      define Uses_wxServer
00122 #      define Uses_wxPrologIO
00123 #endif
00124 
00125 #if defined(Uses_wxPrologIO)
00126 #      define Uses_wxHashTable
00127 #      define Uses_wxList
00128 #endif
00129 
00130 //--- data structures ---------------------------------------------------------
00131 
00132 #if defined(Uses_wxTypeDef)
00133 #      define Uses_wxTypeTree
00134 #endif
00135 
00136 #if defined(Uses_wxTypeTree)
00137 #      define Uses_wxHashTable
00138 #endif
00139 
00140 /* MATTHEW */
00141 #if defined(Uses_wxClipboard)
00142 #      define Uses_wxObject
00143 #       define Uses_wxStringList
00144 #endif
00145 
00146 #if defined(Uses_wxNode) || defined(Uses_wxStringList) \
00147  || defined(Uses_wxPathList) || defined(Uses_wxHashTable) \
00148  || defined(Uses_wxPrintSetup)
00149 #      define Uses_wxList
00150 #endif
00151 
00152 #if defined(Uses_wxList) \
00153  || defined(Uses_wxDebugContext) || defined(Uses_wxDebugStreamBuf)
00154 #      define Uses_wxObject
00155 #endif
00156 
00157 #if defined(Uses_wxString) && !USE_GNU_WXSTRING
00158 #      define Uses_wxObject
00159 #endif
00160 
00161 //--- windows -----------------------------------------------------------------
00162 
00163 //--- items ---
00164 #if defined(Uses_wxMultiText) || defined(Uses_wxTextWindow)
00165 #      define Uses_wxText
00166 #endif
00167 
00168 #if defined(Uses_wxButton) \
00169  || defined(Uses_wxCanvas) \
00170  || defined(Uses_wxCheckBox) \
00171  || defined(Uses_wxChoice) \
00172  || defined(Uses_wxGauge) \
00173  || defined(Uses_wxGroupBox) \
00174  || defined(Uses_wxListBox) \
00175  || defined(Uses_wxMenuBar) \
00176  || defined(Uses_wxMessage) \
00177  || defined(Uses_wxRadioBox) \
00178  || defined(Uses_wxScrollBar) \
00179  || defined(Uses_wxSlider) \
00180  || defined(Uses_wxText) \
00181  || defined(Uses_wxToolBar) \
00182  || defined(Uses_wxVirtListBox)
00183 #      define Uses_wxItem
00184 #endif
00185 
00186 #if defined(Uses_wxStaticItems)
00187 #      define Uses_wxObject
00188 #endif
00189 
00190 #if defined(Uses_wxMenuBar)
00191 #      define Uses_wxMenu
00192 #endif
00193 
00194 #if defined(Uses_wxItem)
00195 #      define Uses_wxPanel
00196 #      define Uses_wxWindow
00197 #endif
00198 
00199 //--- panels ---
00200 #if defined(Uses_wxDialogBase) || defined(Uses_wxEnhDialogBox)
00201 #      define Uses_wxDialogBox
00202 #endif
00203 
00204 #if defined(Uses_wxDialogBox)
00205 #      define Uses_wxFrame
00206 #endif
00207 
00208 #if defined(Uses_wxFrame)
00209 #      define Uses_wxPanel
00210 #endif
00211 
00212 #if defined(Uses_wxPanel)
00213 #      define Uses_wxWindow
00214 #endif
00215 
00216 //--- window ---
00217 #if defined(Uses_wxWindow)
00218 #      define Uses_wxEvtHandler
00219 #      define Uses_wxWindowDC
00220 #      define Uses_wxGDI
00221 #endif
00222 
00223 #if defined(Uses_wxLayout) || defined(Uses_wxMenu)
00224 #      define Uses_wxEvent
00225 #      define Uses_wxObject
00226 #endif
00227 
00228 //--- device contexts ---------------------------------------------------------
00229 
00230 #if defined(Uses_wxCanvasDC) || defined(Uses_wxPanelDC) \
00231  || defined(Uses_wxMemoryDC)
00232 #      define Uses_wxWindowDC
00233 #endif
00234 
00235 #if defined(Uses_wxWindowDC) || defined(Uses_wxPostScriptDC) || defined(Uses_MetafileDC)
00236 #      define Uses_wxDC
00237 #      define Uses_wxGDI
00238 #endif
00239 
00240 #if defined(Uses_wxDC)
00241 #      define Uses_wxObject
00242 #      define Uses_wxColour
00243 #endif 
00244 
00245 //--- event handling ----------------------------------------------------------
00246 
00247 #if defined(Uses_wxCommandEvent) || defined(Uses_wxKeyEvent) \
00248  || defined(Uses_wxMouseEvent)   || defined(Uses_wxEvent) \
00249  || defined(Uses_wxEvtHandler)
00250 #      define Uses_wxEvent
00251 #      define Uses_wxObject
00252 #endif
00253 
00254 //--- GDI classes -------------------------------------------------------------
00255 
00256 #if defined(Uses_wxGDI)
00257 #      define Uses_wxBitmap
00258 #      define Uses_wxColour
00259 #      define Uses_wxFont
00260 #      define Uses_wxPenBrush
00261 #endif
00262 
00263 #if defined(Uses_wxBitmap) || defined(Uses_wxCursor) || defined(Uses_wxIcon) \
00264  || defined(Uses_wxGDIList)
00265 #      define Uses_wxList
00266 #      define Uses_wxBitmap
00267 #      define Uses_wxObject
00268 #endif
00269 
00270 #if defined(Uses_wxBrush) || defined(Uses_wxPen) || defined(Uses_wxPenBrush) \
00271  || defined(Uses_wxPenList) || defined(Uses_BrushList)
00272 #      define Uses_wxPenBrush
00273 #      define Uses_wxColour
00274 #      define Uses_wxList
00275 #      define Uses_wxObject
00276 #endif
00277 
00278 #if defined(Uses_wxFont) || defined(Uses_wxFontList)
00279 #      define Uses_wxList
00280 #      define Uses_wxObject
00281 #       define Uses_wxFontNameDirectory
00282 #endif
00283 
00284 #if defined(Uses_wxFontNameDirectory)
00285 #      define Uses_wxObject
00286 #      define Uses_wxList
00287 #       define Uses_wxHashTable
00288 #endif
00289 
00290 #if defined(Uses_wxColour) || defined(Uses_wxColourMap) \
00291  || defined(Uses_wxColourDatabase)
00292 #      define Uses_wxList
00293 #      define Uses_wxObject
00294 #endif
00295 
00296 //--- high level classes ------------------------------------------------------
00297 
00298 #if defined(Uses_wxForm)
00299 #      define Uses_wxObject
00300 #endif
00301 
00302 //--- IPC classes -------------------------------------------------------------
00303 
00304 #if defined(Uses_wxHelp)
00305 #      define Uses_wxClient
00306 #endif
00307 
00308 #if defined(Uses_wxClient) || defined(Uses_wxServer) || defined(Uses_wxIPC)
00309 #      define Uses_wxIPC
00310 #      define Uses_wxList
00311 #      define Uses_wxObject
00312 #endif
00313 
00314 //--- miscellaneous classes ---------------------------------------------------
00315 
00316 #if defined(Uses_wxTimer)
00317 #      define Uses_wxObject
00318 #endif
00319 
00320 //=============================================================================
00321 // include files depending on Uses defines
00322 //=============================================================================
00323 
00324 //--- data structures ---------------------------------------------------------
00325 
00326 #if defined(Uses_wxObject)
00327 #      include "DataStructures/Object.h"
00328 #endif
00329 #if defined(Uses_wxList)
00330 #      include "../../wxcommon/wx_list.h"
00331 #endif
00332 #if defined(Uses_wxHashTable)
00333 #      include "../../wxcommon/wx_hash.h"
00334 #endif
00335 #if defined(Uses_wxTypeTree)
00336 #      include "DataStructures/TypeTree.h"
00337 #endif
00338 #if defined(Uses_wxPrintSetup)
00339 #      include "DataStructures/PrintSetup.h"
00340 #endif
00341 
00342 //--- application -------------------------------------------------------------
00343 
00344 #if defined(Uses_wxApp)
00345 #      include "Application/AppMain.h"
00346 #endif
00347 
00348 //--- event handling ----------------------------------------------------------
00349 
00350 #if defined(Uses_wxEvent)
00351 #      include "EventHandling/wx_sysev.h"
00352 #      include "EventHandling/wx_stdev.h"
00353 #endif
00354 
00355 #if defined(Uses_wxEvtHandler)
00356 #      include "EventHandling/EvtHandler.h"
00357 #endif
00358 
00359 //--- GDI classes -------------------------------------------------------------
00360 
00361 #if defined(Uses_wxBitmap)
00362 #      include "GDI-Classes/Bitmap.h"
00363 #endif
00364 
00365 #if defined(Uses_wxColour)
00366 #      include "GDI-Classes/Colour.h"
00367 #endif
00368 
00369 #if defined(Uses_wxFont)
00370 #      include "GDI-Classes/Font.h"
00371 #endif
00372 
00373 #if defined(Uses_wxFontNameDirectory)
00374 #      include "GDI-Classes/FontDirectory.h"
00375 #endif
00376 
00377 #if defined(Uses_wxPenBrush)
00378 #      include "GDI-Classes/Pen+Brush.h"
00379 #endif
00380 
00381 #if defined(Uses_wxRegion)
00382 #      include "../../wxcommon/Region.h"
00383 #endif
00384 
00385 //--- device contexts ---------------------------------------------------------
00386 
00387 #if defined(Uses_wxDC)
00388 #      include "DeviceContexts/DC.h"
00389 #endif
00390 
00391 #if defined(Uses_wxWindowDC)
00392 #      include "DeviceContexts/WindowDC.h"
00393 #endif
00394 
00395 #if defined(Uses_wxMemoryDC)
00396 #      include "DeviceContexts/MemoryDC.h"
00397 #endif
00398 
00399 #if USE_METAFILE && defined(Uses_wxMetaFileDC)
00400 #      include "DeviceContexts/MetaFileDC.h"
00401 #endif
00402 
00403 #if USE_POSTSCRIPT && defined(Uses_wxPostScriptDC)
00404 #      include "DeviceContexts/PSDC.h"
00405 #endif
00406 
00407 //--- high level classes ------------------------------------------------------
00408 
00409 #if USE_DOC_VIEW_ARCHITECTURE && defined(Uses_wxDocView)
00410 #      include "HighLevel/DocView.h"
00411 #endif
00412 
00413 #if USE_FORM && defined(Uses_wxForm)
00414 #      include "HighLevel/wx_form.h"
00415 #endif
00416 
00417 #if USE_PRINTING_ARCHITECTURE && defined(Uses_wxPrintPreview)
00418 #      include "HighLevel/PrintPreview.h"
00419 #endif
00420 
00421 //--- IPC classes -------------------------------------------------------------
00422 
00423 #if USE_IPC && defined(Uses_wxIPC)
00424 #      include "IPC-Classes/IPC.h"
00425 #endif
00426 
00427 #if USE_IPC && defined(Uses_wxClient)
00428 #      include "IPC-Classes/Client.h"
00429 #endif
00430 
00431 #if USE_IPC && defined(Uses_wxServer)
00432 #      include "IPC-Classes/Server.h"
00433 #endif
00434 
00435 #if USE_HELP && defined(Uses_wxHelp)
00436 #      include "IPC-Classes/Help.h"
00437 #endif
00438 
00439 //--- PrologIO RPC ------------------------------------------------------------
00440 
00441 #if USE_PROLOGIO && defined(Uses_wxPrologIO)
00442 #      include "PrologIO/read.h"
00443 #endif
00444 
00445 #if USE_RPC && defined(Uses_wxRPC)
00446 #      include "PrologIO/prorpc.h"
00447 #endif
00448 
00449 //--- miscellaneous classes ---------------------------------------------------
00450 
00451 #if USE_CLIPBOARD && defined(Uses_wxClipboard)
00452 #      include "Misc/Clipboard.h"
00453 #endif
00454 
00455 #if defined(Uses_wxTimer)
00456 #      include "Misc/Timer.h"
00457 #endif
00458 
00459 //--- windows -----------------------------------------------------------------
00460 
00461 #if defined(Uses_wxLayout)
00462 #      include "Windows/Layout.h"
00463 #endif
00464 
00465 #if defined(Uses_wxWindow)
00466 #      include "Windows/Window.h"
00467 #endif
00468 
00469 //--- panels ---
00470 #if defined(Uses_wxPanel)
00471 #      include "Windows/Panel.h"
00472 #endif
00473 
00474 #if defined(Uses_wxFrame)
00475 #      include "Windows/Frame.h"
00476 #endif
00477 
00478 #if defined(Uses_wxDialogBox)
00479 #      include "Windows/DialogBox.h"
00480 #endif
00481 
00482 #if USE_ENHANCED_DIALOG && defined(wx_UsesEnhDialogBox)
00483 #      include "Windows/EnhDialogBox.h"
00484 #endif
00485 
00486 //--- items ---
00487 #if defined(Uses_wxItem)
00488 #      include "Windows/Item.h"
00489 #endif
00490 
00491 #if defined(Uses_wxButton)
00492 #      include "Windows/Button.h"
00493 #endif
00494 
00495 #if defined(Uses_wxCanvas)
00496 #      include "Windows/Canvas.h"
00497 #endif
00498 
00499 #if defined(Uses_wxCheckBox)
00500 #      include "Windows/CheckBox.h"
00501 #endif
00502 
00503 #if defined(Uses_wxChoice)
00504 #      include "Windows/Choice.h"
00505 #endif
00506 
00507 #if USE_GAUGE && defined(Uses_wxGauge)
00508 #      include "Windows/Gauge.h"
00509 #endif
00510 
00511 #if defined(Uses_wxListBox)
00512 #      include "Windows/ListBox.h"
00513 #endif
00514 
00515 #if defined(Uses_wxMenu)
00516 #      include "Windows/Menu.h"
00517 #endif
00518 
00519 #if defined(Uses_wxMenuBar)
00520 #      include "Windows/MenuBar.h"
00521 #endif
00522 
00523 #if defined(Uses_wxMessage)
00524 #      include "Windows/Message.h"
00525 #endif
00526 
00527 #if defined(Uses_wxRadioBox)
00528 #      include "Windows/RadioBox.h"
00529 #endif
00530 
00531 #if USE_SCROLLBAR && defined(Uses_wxScrollBar)
00532 #      include "Windows/ScrollBar.h"
00533 #endif
00534 
00535 #if defined(Uses_wxSlider)
00536 #      include "Windows/Slider.h"
00537 #endif