wxWidgets3: update to svn r70933

This commit is contained in:
Shawn Hoffman 2012-03-17 18:12:27 -07:00
parent 0ed8af2287
commit a648aca65c
906 changed files with 39468 additions and 17244 deletions

View File

@ -13,7 +13,7 @@ wxenv = env.Clone()
wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations', '-Wno-shadow']
wxenv['CPPDEFINES'] += ['WXBUILDING']
# gtk, msw, osx and shared files as of r67291
# gtk, msw, osx and shared files as of r70933
aui = [
'src/aui/auibar.cpp',
@ -27,6 +27,7 @@ aui = [
common = [
'src/common/accelcmn.cpp',
#'src/common/accesscmn.cpp',
'src/common/affinematrix2d.cpp',
'src/common/anidecod.cpp',
'src/common/animatecmn.cpp',
'src/common/any.cpp',
@ -231,6 +232,7 @@ common = [
'src/common/textcmn.cpp',
'src/common/textentrycmn.cpp',
'src/common/textfile.cpp',
'src/common/time.cpp',
'src/common/timercmn.cpp',
'src/common/timerimpl.cpp',
'src/common/tokenzr.cpp',
@ -249,6 +251,7 @@ common = [
'src/common/valnum.cpp',
'src/common/valtext.cpp',
'src/common/variant.cpp',
#'src/common/webview.cpp',
'src/common/wfstream.cpp',
'src/common/wincmn.cpp',
'src/common/windowid.cpp',
@ -264,25 +267,9 @@ common = [
'src/common/zstream.cpp',
]
expat = [
#'src/expat/lib/xmlparse.c',
#'src/expat/lib/xmlrole.c',
#'src/expat/lib/xmltok.c',
#'src/expat/lib/xmltok_impl.c',
#'src/expat/lib/xmltok_ns.c',
#'src/expat/xmlwf/codepage.c',
#'src/expat/xmlwf/ct.c',
#'src/expat/xmlwf/readfilemap.c',
#'src/expat/xmlwf/unixfilemap.c',
#'src/expat/xmlwf/win32filemap.c',
#'src/expat/xmlwf/xmlfile.c',
#'src/expat/xmlwf/xmlmime.c',
#'src/expat/xmlwf/xmlwf.c',
#'src/expat/xmlwf/xmlwin32url.cxx',
]
generic = [
'src/generic/aboutdlgg.cpp',
'src/generic/bannerwindow.cpp',
'src/generic/bmpcboxg.cpp',
'src/generic/busyinfo.cpp',
'src/generic/buttonbar.cpp',
@ -327,7 +314,6 @@ generic = [
'src/generic/notifmsgg.cpp',
'src/generic/numdlgg.cpp',
'src/generic/odcombo.cpp',
'src/generic/panelg.cpp',
'src/generic/printps.cpp',
'src/generic/prntdlgg.cpp',
'src/generic/progdlgg.cpp',
@ -348,12 +334,14 @@ generic = [
'src/generic/statusbr.cpp',
'src/generic/tabg.cpp',
'src/generic/textdlgg.cpp',
'src/generic/timectrlg.cpp',
#'src/generic/timer.cpp',
'src/generic/tipdlg.cpp',
'src/generic/tipwin.cpp',
'src/generic/toolbkg.cpp',
'src/generic/treebkg.cpp',
'src/generic/treectlg.cpp',
'src/generic/treelist.cpp',
'src/generic/vlbox.cpp',
'src/generic/vscroll.cpp',
'src/generic/wizard.cpp',
@ -379,9 +367,10 @@ genericosx = [
gtk = [
'src/gtk/aboutdlg.cpp',
'src/gtk/animate.cpp',
'src/gtk/anybutton.cpp',
'src/gtk/app.cpp',
'src/gtk/artgtk.cpp',
'src/gtk/assertdlg_gtk.c',
'src/gtk/assertdlg_gtk.cpp',
'src/gtk/bitmap.cpp',
'src/gtk/bmpbuttn.cpp',
'src/gtk/bmpcbox.cpp',
@ -432,6 +421,7 @@ gtk = [
'src/gtk/mnemonics.cpp',
'src/gtk/msgdlg.cpp',
'src/gtk/nativewin.cpp',
'src/gtk/nonownedwnd.cpp',
'src/gtk/notebook.cpp',
'src/gtk/pen.cpp',
'src/gtk/popupwin.cpp',
@ -462,93 +452,15 @@ gtk = [
'src/gtk/toplevel.cpp',
'src/gtk/treeentry_gtk.c',
'src/gtk/utilsgtk.cpp',
#'src/gtk/webview_webkit.cpp',
'src/gtk/win_gtk.cpp',
'src/gtk/window.cpp',
]
html = [
'src/html/chm.cpp',
'src/html/helpctrl.cpp',
'src/html/helpdata.cpp',
'src/html/helpdlg.cpp',
'src/html/helpfrm.cpp',
'src/html/helpwnd.cpp',
'src/html/htmlcell.cpp',
#'src/html/htmlctrl/webkit/webkit.mm',
'src/html/htmlfilt.cpp',
'src/html/htmlpars.cpp',
'src/html/htmltag.cpp',
'src/html/htmlwin.cpp',
'src/html/htmprint.cpp',
'src/html/m_dflist.cpp',
'src/html/m_fonts.cpp',
'src/html/m_hline.cpp',
'src/html/m_image.cpp',
'src/html/m_layout.cpp',
'src/html/m_links.cpp',
'src/html/m_list.cpp',
'src/html/m_pre.cpp',
'src/html/m_span.cpp',
'src/html/m_style.cpp',
'src/html/m_tables.cpp',
'src/html/styleparams.cpp',
'src/html/winpars.cpp',
]
jpeg = [
'src/jpeg/jcapimin.c',
'src/jpeg/jcapistd.c',
'src/jpeg/jccoefct.c',
'src/jpeg/jccolor.c',
'src/jpeg/jcdctmgr.c',
'src/jpeg/jchuff.c',
'src/jpeg/jcinit.c',
'src/jpeg/jcmainct.c',
'src/jpeg/jcmarker.c',
'src/jpeg/jcmaster.c',
'src/jpeg/jcomapi.c',
'src/jpeg/jcparam.c',
'src/jpeg/jcphuff.c',
'src/jpeg/jcprepct.c',
'src/jpeg/jcsample.c',
'src/jpeg/jctrans.c',
'src/jpeg/jdapimin.c',
'src/jpeg/jdapistd.c',
'src/jpeg/jdatadst.c',
'src/jpeg/jdatasrc.c',
'src/jpeg/jdcoefct.c',
'src/jpeg/jdcolor.c',
'src/jpeg/jddctmgr.c',
'src/jpeg/jdhuff.c',
'src/jpeg/jdinput.c',
'src/jpeg/jdmainct.c',
'src/jpeg/jdmarker.c',
'src/jpeg/jdmaster.c',
'src/jpeg/jdmerge.c',
'src/jpeg/jdphuff.c',
'src/jpeg/jdpostct.c',
'src/jpeg/jdsample.c',
'src/jpeg/jdtrans.c',
'src/jpeg/jerror.c',
'src/jpeg/jfdctflt.c',
'src/jpeg/jfdctfst.c',
'src/jpeg/jfdctint.c',
'src/jpeg/jidctflt.c',
'src/jpeg/jidctfst.c',
'src/jpeg/jidctint.c',
'src/jpeg/jidctred.c',
'src/jpeg/jmemansi.c',
'src/jpeg/jmemmgr.c',
'src/jpeg/jmemname.c',
'src/jpeg/jmemnobs.c',
'src/jpeg/jquant1.c',
'src/jpeg/jquant2.c',
'src/jpeg/jutils.c',
]
msw = [
'src/msw/aboutdlg.cpp',
'src/msw/accel.cpp',
'src/msw/anybutton.cpp',
'src/msw/app.cpp',
'src/msw/artmsw.cpp',
'src/msw/basemsw.cpp',
@ -574,6 +486,7 @@ msw = [
'src/msw/data.cpp',
'src/msw/datecontrols.cpp',
'src/msw/datectrl.cpp',
'src/msw/datetimectrl.cpp',
'src/msw/dc.cpp',
'src/msw/dcclient.cpp',
'src/msw/dcmemory.cpp',
@ -631,6 +544,7 @@ msw = [
'src/msw/mslu.cpp',
'src/msw/nativdlg.cpp',
'src/msw/nativewin.cpp',
'src/msw/nonownedwnd.cpp',
'src/msw/notebook.cpp',
'src/msw/notifmsg.cpp',
'src/msw/ole/access.cpp',
@ -678,6 +592,7 @@ msw = [
'src/msw/textentry.cpp',
'src/msw/tglbtn.cpp',
'src/msw/thread.cpp',
'src/msw/timectrl.cpp',
'src/msw/timer.cpp',
'src/msw/toolbar.cpp',
'src/msw/tooltip.cpp',
@ -691,6 +606,7 @@ msw = [
'src/msw/uxtheme.cpp',
'src/msw/version.rc',
'src/msw/volume.cpp',
#'src/msw/webview_ie.cpp',
'src/msw/wince/checklst.cpp',
'src/msw/wince/choicece.cpp',
'src/msw/wince/crt.cpp',
@ -708,6 +624,7 @@ msw = [
osx = [
'src/osx/accel.cpp',
'src/osx/anybutton_osx.cpp',
'src/osx/artmac.cpp',
'src/osx/bmpbuttn_osx.cpp',
'src/osx/brush.cpp',
@ -717,6 +634,8 @@ osx = [
'src/osx/choice_osx.cpp',
'src/osx/combobox_osx.cpp',
'src/osx/dataview_osx.cpp',
'src/osx/datectrl_osx.cpp',
'src/osx/datetimectrl_osx.cpp',
'src/osx/dialog_osx.cpp',
'src/osx/dnd_osx.cpp',
'src/osx/fontutil.cpp',
@ -746,12 +665,15 @@ osx = [
'src/osx/textctrl_osx.cpp',
'src/osx/textentry_osx.cpp',
'src/osx/tglbtn_osx.cpp',
'src/osx/timectrl_osx.cpp',
'src/osx/toolbar_osx.cpp',
'src/osx/toplevel_osx.cpp',
'src/osx/uiaction_osx.cpp',
'src/osx/utils_osx.cpp',
#'src/osx/webview_webkit.mm',
'src/osx/window_osx.cpp',
#'src/osx/carbon/aboutdlg.cpp',
'src/osx/carbon/anybutton.cpp',
'src/osx/carbon/app.cpp',
#'src/osx/carbon/bmpbuttn.cpp',
#'src/osx/carbon/button.cpp',
@ -829,12 +751,14 @@ osx = [
'src/osx/carbon/utilscocoa.mm',
#'src/osx/carbon/window.cpp',
'src/osx/cocoa/aboutdlg.mm',
'src/osx/cocoa/anybutton.mm',
'src/osx/cocoa/button.mm',
'src/osx/cocoa/checkbox.mm',
'src/osx/cocoa/choice.mm',
'src/osx/cocoa/colour.mm',
'src/osx/cocoa/combobox.mm',
'src/osx/cocoa/dataview.mm',
'src/osx/cocoa/datetimectrl.mm',
'src/osx/cocoa/dialog.mm',
'src/osx/cocoa/dirdlg.mm',
'src/osx/cocoa/dnd.mm',
@ -902,228 +826,6 @@ osx = [
#'src/osx/iphone/window.mm',
]
png = [
'src/png/png.c',
'src/png/pngerror.c',
'src/png/pngget.c',
'src/png/pngmem.c',
'src/png/pngpread.c',
'src/png/pngread.c',
'src/png/pngrio.c',
'src/png/pngrtran.c',
'src/png/pngrutil.c',
'src/png/pngset.c',
'src/png/pngtrans.c',
'src/png/pngwio.c',
'src/png/pngwrite.c',
'src/png/pngwtran.c',
'src/png/pngwutil.c',
]
propgrid = [
'src/propgrid/advprops.cpp',
'src/propgrid/editors.cpp',
'src/propgrid/manager.cpp',
'src/propgrid/property.cpp',
'src/propgrid/propgrid.cpp',
'src/propgrid/propgridiface.cpp',
'src/propgrid/propgridpagestate.cpp',
'src/propgrid/props.cpp',
]
regex = [
'src/regex/regcomp.c',
'src/regex/regerror.c',
'src/regex/regexec.c',
'src/regex/regfree.c',
]
ribbon = [
'src/ribbon/art_aui.cpp',
'src/ribbon/art_internal.cpp',
'src/ribbon/art_msw.cpp',
'src/ribbon/bar.cpp',
'src/ribbon/buttonbar.cpp',
'src/ribbon/control.cpp',
'src/ribbon/gallery.cpp',
'src/ribbon/page.cpp',
'src/ribbon/panel.cpp',
'src/ribbon/toolbar.cpp',
]
richtext = [
#'src/richtext/richtextbackgroundpage.cpp',
#'src/richtext/richtextborderspage.cpp',
'src/richtext/richtextbuffer.cpp',
#'src/richtext/richtextbulletspage.cpp',
'src/richtext/richtextctrl.cpp',
#'src/richtext/richtextfontpage.cpp',
'src/richtext/richtextformatdlg.cpp',
'src/richtext/richtexthtml.cpp',
'src/richtext/richtextimagedlg.cpp',
#'src/richtext/richtextindentspage.cpp',
#'src/richtext/richtextliststylepage.cpp',
#'src/richtext/richtextmarginspage.cpp',
'src/richtext/richtextprint.cpp',
#'src/richtext/richtextsizepage.cpp',
'src/richtext/richtextstyledlg.cpp',
#'src/richtext/richtextstylepage.cpp',
'src/richtext/richtextstyles.cpp',
'src/richtext/richtextsymboldlg.cpp',
#'src/richtext/richtexttabspage.cpp',
'src/richtext/richtextxml.cpp',
]
stc = [
'src/stc/PlatWX.cpp',
'src/stc/ScintillaWX.cpp',
'src/stc/scintilla/src/AutoComplete.cxx',
'src/stc/scintilla/src/CallTip.cxx',
'src/stc/scintilla/src/CellBuffer.cxx',
'src/stc/scintilla/src/CharClassify.cxx',
'src/stc/scintilla/src/ContractionState.cxx',
'src/stc/scintilla/src/Decoration.cxx',
'src/stc/scintilla/src/Document.cxx',
'src/stc/scintilla/src/DocumentAccessor.cxx',
'src/stc/scintilla/src/Editor.cxx',
'src/stc/scintilla/src/ExternalLexer.cxx',
'src/stc/scintilla/src/Indicator.cxx',
'src/stc/scintilla/src/KeyMap.cxx',
'src/stc/scintilla/src/KeyWords.cxx',
'src/stc/scintilla/src/LexAPDL.cxx',
'src/stc/scintilla/src/LexASY.cxx',
'src/stc/scintilla/src/LexAU3.cxx',
'src/stc/scintilla/src/LexAVE.cxx',
'src/stc/scintilla/src/LexAbaqus.cxx',
'src/stc/scintilla/src/LexAda.cxx',
'src/stc/scintilla/src/LexAsm.cxx',
'src/stc/scintilla/src/LexAsn1.cxx',
'src/stc/scintilla/src/LexBaan.cxx',
'src/stc/scintilla/src/LexBash.cxx',
'src/stc/scintilla/src/LexBasic.cxx',
'src/stc/scintilla/src/LexBullant.cxx',
'src/stc/scintilla/src/LexCLW.cxx',
'src/stc/scintilla/src/LexCOBOL.cxx',
'src/stc/scintilla/src/LexCPP.cxx',
'src/stc/scintilla/src/LexCSS.cxx',
'src/stc/scintilla/src/LexCaml.cxx',
'src/stc/scintilla/src/LexCmake.cxx',
'src/stc/scintilla/src/LexConf.cxx',
'src/stc/scintilla/src/LexCrontab.cxx',
'src/stc/scintilla/src/LexCsound.cxx',
'src/stc/scintilla/src/LexD.cxx',
'src/stc/scintilla/src/LexEScript.cxx',
'src/stc/scintilla/src/LexEiffel.cxx',
'src/stc/scintilla/src/LexErlang.cxx',
'src/stc/scintilla/src/LexFlagship.cxx',
'src/stc/scintilla/src/LexForth.cxx',
'src/stc/scintilla/src/LexFortran.cxx',
'src/stc/scintilla/src/LexGAP.cxx',
'src/stc/scintilla/src/LexGui4Cli.cxx',
'src/stc/scintilla/src/LexHTML.cxx',
'src/stc/scintilla/src/LexHaskell.cxx',
'src/stc/scintilla/src/LexInno.cxx',
'src/stc/scintilla/src/LexKix.cxx',
'src/stc/scintilla/src/LexLisp.cxx',
'src/stc/scintilla/src/LexLout.cxx',
'src/stc/scintilla/src/LexLua.cxx',
'src/stc/scintilla/src/LexMMIXAL.cxx',
'src/stc/scintilla/src/LexMPT.cxx',
'src/stc/scintilla/src/LexMSSQL.cxx',
'src/stc/scintilla/src/LexMagik.cxx',
'src/stc/scintilla/src/LexMarkdown.cxx',
'src/stc/scintilla/src/LexMatlab.cxx',
'src/stc/scintilla/src/LexMetapost.cxx',
'src/stc/scintilla/src/LexMySQL.cxx',
'src/stc/scintilla/src/LexNimrod.cxx',
'src/stc/scintilla/src/LexNsis.cxx',
'src/stc/scintilla/src/LexOpal.cxx',
'src/stc/scintilla/src/LexOthers.cxx',
'src/stc/scintilla/src/LexPB.cxx',
'src/stc/scintilla/src/LexPLM.cxx',
'src/stc/scintilla/src/LexPOV.cxx',
'src/stc/scintilla/src/LexPS.cxx',
'src/stc/scintilla/src/LexPascal.cxx',
'src/stc/scintilla/src/LexPerl.cxx',
'src/stc/scintilla/src/LexPowerPro.cxx',
'src/stc/scintilla/src/LexPowerShell.cxx',
'src/stc/scintilla/src/LexProgress.cxx',
'src/stc/scintilla/src/LexPython.cxx',
'src/stc/scintilla/src/LexR.cxx',
'src/stc/scintilla/src/LexRebol.cxx',
'src/stc/scintilla/src/LexRuby.cxx',
'src/stc/scintilla/src/LexSML.cxx',
'src/stc/scintilla/src/LexSQL.cxx',
'src/stc/scintilla/src/LexScriptol.cxx',
'src/stc/scintilla/src/LexSmalltalk.cxx',
'src/stc/scintilla/src/LexSorcus.cxx',
'src/stc/scintilla/src/LexSpecman.cxx',
'src/stc/scintilla/src/LexSpice.cxx',
'src/stc/scintilla/src/LexTACL.cxx',
'src/stc/scintilla/src/LexTADS3.cxx',
'src/stc/scintilla/src/LexTAL.cxx',
'src/stc/scintilla/src/LexTCL.cxx',
'src/stc/scintilla/src/LexTeX.cxx',
'src/stc/scintilla/src/LexVB.cxx',
'src/stc/scintilla/src/LexVHDL.cxx',
'src/stc/scintilla/src/LexVerilog.cxx',
'src/stc/scintilla/src/LexYAML.cxx',
'src/stc/scintilla/src/LineMarker.cxx',
'src/stc/scintilla/src/PerLine.cxx',
'src/stc/scintilla/src/PositionCache.cxx',
'src/stc/scintilla/src/PropSet.cxx',
'src/stc/scintilla/src/RESearch.cxx',
'src/stc/scintilla/src/RunStyles.cxx',
'src/stc/scintilla/src/ScintillaBase.cxx',
'src/stc/scintilla/src/Selection.cxx',
'src/stc/scintilla/src/Style.cxx',
'src/stc/scintilla/src/StyleContext.cxx',
'src/stc/scintilla/src/UniConversion.cxx',
'src/stc/scintilla/src/ViewStyle.cxx',
'src/stc/scintilla/src/WindowAccessor.cxx',
'src/stc/scintilla/src/XPM.cxx',
'src/stc/stc.cpp',
]
tiff = [
'src/tiff/libtiff/tif_aux.c',
'src/tiff/libtiff/tif_close.c',
'src/tiff/libtiff/tif_codec.c',
'src/tiff/libtiff/tif_color.c',
'src/tiff/libtiff/tif_compress.c',
'src/tiff/libtiff/tif_dir.c',
'src/tiff/libtiff/tif_dirinfo.c',
'src/tiff/libtiff/tif_dirread.c',
'src/tiff/libtiff/tif_dirwrite.c',
'src/tiff/libtiff/tif_dumpmode.c',
'src/tiff/libtiff/tif_error.c',
'src/tiff/libtiff/tif_extension.c',
'src/tiff/libtiff/tif_fax3.c',
'src/tiff/libtiff/tif_fax3sm.c',
'src/tiff/libtiff/tif_flush.c',
'src/tiff/libtiff/tif_getimage.c',
'src/tiff/libtiff/tif_jpeg.c',
'src/tiff/libtiff/tif_luv.c',
'src/tiff/libtiff/tif_lzw.c',
'src/tiff/libtiff/tif_next.c',
'src/tiff/libtiff/tif_ojpeg.c',
'src/tiff/libtiff/tif_open.c',
'src/tiff/libtiff/tif_packbits.c',
'src/tiff/libtiff/tif_pixarlog.c',
'src/tiff/libtiff/tif_predict.c',
'src/tiff/libtiff/tif_print.c',
'src/tiff/libtiff/tif_read.c',
'src/tiff/libtiff/tif_strip.c',
'src/tiff/libtiff/tif_swab.c',
'src/tiff/libtiff/tif_thunder.c',
'src/tiff/libtiff/tif_tile.c',
'src/tiff/libtiff/tif_unix.c',
'src/tiff/libtiff/tif_version.c',
'src/tiff/libtiff/tif_warning.c',
'src/tiff/libtiff/tif_write.c',
'src/tiff/libtiff/tif_zip.c',
]
unix = [
'src/unix/apptraits.cpp',
'src/unix/appunix.cpp',
@ -1160,89 +862,6 @@ unixgtk = [
'src/unix/utilsx11.cpp',
]
xrc = [
'src/xml/xml.cpp',
'src/xrc/xh_animatctrl.cpp',
'src/xrc/xh_bmp.cpp',
'src/xrc/xh_bmpbt.cpp',
'src/xrc/xh_bmpcbox.cpp',
'src/xrc/xh_bttn.cpp',
'src/xrc/xh_cald.cpp',
'src/xrc/xh_chckb.cpp',
'src/xrc/xh_chckl.cpp',
'src/xrc/xh_choic.cpp',
'src/xrc/xh_choicbk.cpp',
'src/xrc/xh_clrpicker.cpp',
'src/xrc/xh_cmdlinkbn.cpp',
'src/xrc/xh_collpane.cpp',
'src/xrc/xh_combo.cpp',
'src/xrc/xh_comboctrl.cpp',
'src/xrc/xh_datectrl.cpp',
'src/xrc/xh_dirpicker.cpp',
'src/xrc/xh_dlg.cpp',
'src/xrc/xh_editlbox.cpp',
'src/xrc/xh_filectrl.cpp',
'src/xrc/xh_filepicker.cpp',
'src/xrc/xh_fontpicker.cpp',
'src/xrc/xh_frame.cpp',
'src/xrc/xh_gauge.cpp',
'src/xrc/xh_gdctl.cpp',
'src/xrc/xh_grid.cpp',
'src/xrc/xh_html.cpp',
'src/xrc/xh_htmllbox.cpp',
'src/xrc/xh_hyperlink.cpp',
'src/xrc/xh_listb.cpp',
'src/xrc/xh_listbk.cpp',
'src/xrc/xh_listc.cpp',
'src/xrc/xh_mdi.cpp',
'src/xrc/xh_menu.cpp',
'src/xrc/xh_notbk.cpp',
'src/xrc/xh_odcombo.cpp',
'src/xrc/xh_panel.cpp',
'src/xrc/xh_propdlg.cpp',
'src/xrc/xh_radbt.cpp',
'src/xrc/xh_radbx.cpp',
'src/xrc/xh_richtext.cpp',
'src/xrc/xh_scrol.cpp',
'src/xrc/xh_scwin.cpp',
'src/xrc/xh_sizer.cpp',
'src/xrc/xh_slidr.cpp',
'src/xrc/xh_spin.cpp',
'src/xrc/xh_split.cpp',
'src/xrc/xh_srchctrl.cpp',
'src/xrc/xh_statbar.cpp',
'src/xrc/xh_stbmp.cpp',
'src/xrc/xh_stbox.cpp',
'src/xrc/xh_stlin.cpp',
'src/xrc/xh_sttxt.cpp',
'src/xrc/xh_text.cpp',
'src/xrc/xh_tglbtn.cpp',
'src/xrc/xh_toolb.cpp',
'src/xrc/xh_toolbk.cpp',
'src/xrc/xh_tree.cpp',
'src/xrc/xh_treebk.cpp',
'src/xrc/xh_unkwn.cpp',
'src/xrc/xh_wizrd.cpp',
'src/xrc/xmladv.cpp',
'src/xrc/xmlres.cpp',
'src/xrc/xmlrsall.cpp',
]
zlib = [
'src/zlib/adler32.c',
'src/zlib/compress.c',
'src/zlib/crc32.c',
'src/zlib/deflate.c',
'src/zlib/gzio.c',
'src/zlib/infback.c',
'src/zlib/inffast.c',
'src/zlib/inflate.c',
'src/zlib/inftrees.c',
'src/zlib/trees.c',
'src/zlib/uncompr.c',
'src/zlib/zutil.c',
]
files = aui + common + generic
if sys.platform == 'win32':

19
Externals/wxWidgets3/build_wx.sh vendored Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
svn co -r 70933 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets
case $OSTYPE in
darwin*)
BACKEND="osx_cocoa"
;;
linux*)
BACKEND="gtk"
;;
esac
mkdir build-local
cd build-local
../configure --with-$BACKEND --disable-shared --enable-unicode --disable-compat28 --disable-exceptions --disable-fswatcher --without-regex --without-expat --disable-xml --disable-ribbon --disable-propgrid --disable-stc --disable-html --disable-richtext --without-libjpeg --without-libtiff --disable-webview --disable-markup
make

View File

@ -3,7 +3,7 @@
// Purpose: declaration of wxAboutDialog class
// Author: Vadim Zeitlin
// Created: 2006-10-07
// RCS-ID: $Id: aboutdlg.h 61534 2009-07-25 22:53:23Z VZ $
// RCS-ID: $Id: aboutdlg.h 67681 2011-05-03 16:29:04Z DS $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -69,7 +69,7 @@ public:
// icon to be shown in the dialog, defaults to the main frame icon
void SetIcon(const wxIcon& icon) { m_icon = icon; }
bool HasIcon() const { return m_icon.Ok(); }
bool HasIcon() const { return m_icon.IsOk(); }
wxIcon GetIcon() const;
// web site for the program and its description (defaults to URL itself if

View File

@ -4,7 +4,7 @@
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
// Modified by:
// Created: 31.05.01 (extracted from other files)
// RCS-ID: $Id: accel.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: accel.h 68718 2011-08-16 11:55:39Z SC $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -34,10 +34,11 @@ enum wxAcceleratorEntryFlags
wxACCEL_CTRL = 0x0002, // hold Ctrl key down
wxACCEL_SHIFT = 0x0004, // hold Shift key down
#if defined(__WXMAC__) || defined(__WXCOCOA__)
wxACCEL_CMD = 0x0008 // Command key on OS X
wxACCEL_RAW_CTRL= 0x0008, //
#else
wxACCEL_CMD = wxACCEL_CTRL
wxACCEL_RAW_CTRL= wxACCEL_CTRL,
#endif
wxACCEL_CMD = wxACCEL_CTRL
};
// ----------------------------------------------------------------------------

View File

@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/affinematrix2d.h
// Purpose: wxAffineMatrix2D class.
// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
// Created: 2011-04-05
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AFFINEMATRIX2D_H_
#define _WX_AFFINEMATRIX2D_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/affinematrix2dbase.h"
// A simple implementation of wxAffineMatrix2DBase interface done entirely in
// wxWidgets.
class WXDLLIMPEXP_CORE wxAffineMatrix2D : public wxAffineMatrix2DBase
{
public:
wxAffineMatrix2D() : m_11(1), m_12(0),
m_21(0), m_22(1),
m_tx(0), m_ty(0)
{
}
// Implement base class pure virtual methods.
virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr);
virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const;
virtual void Concat(const wxAffineMatrix2DBase& t);
virtual bool Invert();
virtual bool IsIdentity() const;
virtual bool IsEqual(const wxAffineMatrix2DBase& t) const;
virtual void Translate(wxDouble dx, wxDouble dy);
virtual void Scale(wxDouble xScale, wxDouble yScale);
virtual void Rotate(wxDouble ccRadians);
protected:
virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const;
virtual wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const;
private:
wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2D_H_

View File

@ -0,0 +1,127 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/affinematrix2dbase.h
// Purpose: Common interface for 2D transformation matrices.
// Author: Catalin Raceanu
// Created: 2011-04-06
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AFFINEMATRIX2DBASE_H_
#define _WX_AFFINEMATRIX2DBASE_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/geometry.h"
struct wxMatrix2D
{
wxMatrix2D(wxDouble v11 = 1,
wxDouble v12 = 0,
wxDouble v21 = 0,
wxDouble v22 = 1)
{
m_11 = v11; m_12 = v12;
m_21 = v21; m_22 = v22;
}
wxDouble m_11, m_12, m_21, m_22;
};
// A 2x3 matrix representing an affine 2D transformation.
//
// This is an abstract base class implemented by wxAffineMatrix2D only so far,
// but in the future we also plan to derive wxGraphicsMatrix from it (it should
// also be documented then as currently only wxAffineMatrix2D itself is).
class WXDLLIMPEXP_CORE wxAffineMatrix2DBase
{
public:
wxAffineMatrix2DBase() {}
virtual ~wxAffineMatrix2DBase() {}
// sets the matrix to the respective values
virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr) = 0;
// gets the component valuess of the matrix
virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const = 0;
// concatenates the matrix
virtual void Concat(const wxAffineMatrix2DBase& t) = 0;
// makes this the inverse matrix
virtual bool Invert() = 0;
// return true if this is the identity matrix
virtual bool IsIdentity() const = 0;
// returns true if the elements of the transformation matrix are equal ?
virtual bool IsEqual(const wxAffineMatrix2DBase& t) const = 0;
bool operator==(const wxAffineMatrix2DBase& t) const { return IsEqual(t); }
bool operator!=(const wxAffineMatrix2DBase& t) const { return !IsEqual(t); }
//
// transformations
//
// add the translation to this matrix
virtual void Translate(wxDouble dx, wxDouble dy) = 0;
// add the scale to this matrix
virtual void Scale(wxDouble xScale, wxDouble yScale) = 0;
// add the rotation to this matrix (counter clockwise, radians)
virtual void Rotate(wxDouble ccRadians) = 0;
// add mirroring to this matrix
void Mirror(int direction = wxHORIZONTAL)
{
wxDouble x = (direction & wxHORIZONTAL) ? -1 : 1;
wxDouble y = (direction & wxVERTICAL) ? -1 : 1;
Scale(x, y);
}
// applies that matrix to the point
wxPoint2DDouble TransformPoint(const wxPoint2DDouble& src) const
{
return DoTransformPoint(src);
}
void TransformPoint(wxDouble* x, wxDouble* y) const
{
wxCHECK_RET( x && y, "Can't be NULL" );
const wxPoint2DDouble dst = DoTransformPoint(wxPoint2DDouble(*x, *y));
*x = dst.m_x;
*y = dst.m_y;
}
// applies the matrix except for translations
wxPoint2DDouble TransformDistance(const wxPoint2DDouble& src) const
{
return DoTransformDistance(src);
}
void TransformDistance(wxDouble* dx, wxDouble* dy) const
{
wxCHECK_RET( dx && dy, "Can't be NULL" );
const wxPoint2DDouble
dst = DoTransformDistance(wxPoint2DDouble(*dx, *dy));
*dx = dst.m_x;
*dy = dst.m_y;
}
protected:
virtual
wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const = 0;
virtual
wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2DBASE_H_

View File

@ -0,0 +1,200 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/anybutton.h
// Purpose: wxAnyButtonBase class
// Author: Vadim Zetlin
// Created: 2000-08-15 (extracted from button.h)
// RCS-ID: $Id: anybutton.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zetlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANYBUTTON_H_BASE_
#define _WX_ANYBUTTON_H_BASE_
#include "wx/defs.h"
#ifdef wxHAS_ANY_BUTTON
// ----------------------------------------------------------------------------
// wxAnyButton specific flags
// ----------------------------------------------------------------------------
// These flags affect label alignment
#define wxBU_LEFT 0x0040
#define wxBU_TOP 0x0080
#define wxBU_RIGHT 0x0100
#define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
// These two flags are obsolete
#define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004
// by default, the buttons will be created with some (system dependent)
// minimal size to make them look nicer, giving this style will make them as
// small as possible
#define wxBU_EXACTFIT 0x0001
// this flag can be used to disable using the text label in the button: it is
// mostly useful when creating buttons showing bitmap and having stock id as
// without it both the standard label corresponding to the stock id and the
// bitmap would be shown
#define wxBU_NOTEXT 0x0002
#include "wx/bitmap.h"
#include "wx/control.h"
// ----------------------------------------------------------------------------
// wxAnyButton: common button functionality
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxAnyButtonBase : public wxControl
{
public:
wxAnyButtonBase() { }
// show the image in the button in addition to the label: this method is
// supported on all (major) platforms
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
{
SetBitmapLabel(bitmap);
SetBitmapPosition(dir);
}
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
// Methods for setting individual images for different states: normal,
// selected (meaning pushed or pressed), focused (meaning normal state for
// a focused button), disabled or hover (a.k.a. hot or current).
//
// Remember that SetBitmap() itself must be called before any other
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
// for it anyhow) and that all bitmaps passed to these functions should be
// of the same size.
void SetBitmapLabel(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Normal); }
void SetBitmapPressed(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Pressed); }
void SetBitmapDisabled(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Disabled); }
void SetBitmapCurrent(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Current); }
void SetBitmapFocus(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Focused); }
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
// set the margins around the image
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
// set the image position relative to the text, i.e. wxLEFT means that the
// image is to the left of the text (this is the default)
void SetBitmapPosition(wxDirection dir);
// Buttons on MSW can look bad if they are not native colours, because
// then they become owner-drawn and not theme-drawn. Disable it here
// in wxAnyButtonBase to make it consistent.
virtual bool ShouldInheritColours() const { return false; }
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
#if WXWIN_COMPATIBILITY_2_8
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
#endif // WXWIN_COMPATIBILITY_2_8
// backwards compatible names for pressed/current bitmaps: they're not
// deprecated as there is nothing really wrong with using them and no real
// advantage to using the new names but the new names are still preferred
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
// this enum is not part of wx public API, it is public because it is used
// in non wxAnyButton-derived classes internally
//
// also notice that MSW code relies on the values of the enum elements, do
// not change them without revising src/msw/button.cpp
enum State
{
State_Normal,
State_Current, // a.k.a. hot or "hovering"
State_Pressed, // a.k.a. "selected" in public API for some reason
State_Disabled,
State_Focused,
State_Max
};
// return true if this button shouldn't show the text label, either because
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
bool DontShowLabel() const
{
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
}
// return true if we do show the label
bool ShowsLabel() const
{
return !DontShowLabel();
}
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
{ return wxBitmap(); }
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
State WXUNUSED(which))
{ }
virtual wxSize DoGetBitmapMargins() const
{ return wxSize(0, 0); }
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
{ }
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
{ }
virtual bool DoGetAuthNeeded() const { return false; }
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
wxDECLARE_NO_COPY_CLASS(wxAnyButtonBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/anybutton.h"
#elif defined(__WXMSW__)
#include "wx/msw/anybutton.h"
//#elif defined(__WXMOTIF__)
// #include "wx/motif/anybutton.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/anybutton.h"
//#elif defined(__WXGTK__)
// #include "wx/gtk1/anybutton.h"
#elif defined(__WXMAC__)
#include "wx/osx/anybutton.h"
//#elif defined(__WXCOCOA__)
// #include "wx/cocoa/anybutton.h"
//#elif defined(__WXPM__)
// #include "wx/os2/anybutton.h"
#else
typedef wxAnyButtonBase wxAnyButton;
#endif
#endif // wxHAS_ANY_BUTTON
#endif // _WX_ANYBUTTON_H_BASE_

View File

@ -5,7 +5,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: app.h 66648 2011-01-08 06:42:41Z PC $
// RCS-ID: $Id: app.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -18,6 +18,7 @@
// ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class
#include "wx/eventfilter.h" // (and another one)
#include "wx/build.h"
#include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv
#include "wx/init.h" // we must declare wxEntry()
@ -70,7 +71,8 @@ extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
// wxAppConsoleBase: wxApp for non-GUI applications
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler
class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler,
public wxEventFilter
{
public:
// ctor and dtor
@ -238,13 +240,8 @@ public:
// event processing functions
// --------------------------
// this method allows to filter all the events processed by the program, so
// you should try to return quickly from it to avoid slowing down the
// program to the crawl
//
// return value should be -1 to continue with the normal event processing,
// or TRUE or FALSE to stop further processing and pretend that the event
// had been already processed or won't be processed at all, respectively
// Implement the inherited wxEventFilter method but just return -1 from it
// to indicate that default processing should take place.
virtual int FilterEvent(wxEvent& event);
// return true if we're running event loop, i.e. if the events can
@ -595,10 +592,10 @@ public:
// ------------------------------------------------------------------------
// Get display mode that is used use. This is only used in framebuffer
// wxWin ports (such as wxMGL or wxDFB).
// wxWin ports such as wxDFB.
virtual wxVideoMode GetDisplayMode() const;
// Set display mode to use. This is only used in framebuffer wxWin
// ports (such as wxMGL or wxDFB). This method should be called from
// ports such as wxDFB. This method should be called from
// wxApp::OnInitGui
virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
@ -684,14 +681,10 @@ protected:
// now include the declaration of the real class
// ----------------------------------------------------------------------------
#if defined(__WXPALMOS__)
#include "wx/palmos/app.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/app.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/app.h"
#elif defined(__WXMGL__)
#include "wx/mgl/app.h"
#elif defined(__WXDFB__)
#include "wx/dfb/app.h"
#elif defined(__WXGTK20__)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.06.2003
// RCS-ID: $Id: apptrait.h 61488 2009-07-21 14:16:44Z VZ $
// RCS-ID: $Id: apptrait.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -177,9 +177,7 @@ private:
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
// Unix code (and otherwise __UNIX__ wouldn't be defined)
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__)
#include "wx/palmos/apptbase.h"
#elif defined(__WIN32__)
#if defined(__WIN32__)
#include "wx/msw/apptbase.h"
#elif defined(__UNIX__) && !defined(__EMX__)
#include "wx/unix/apptbase.h"
@ -274,9 +272,7 @@ public:
// ----------------------------------------------------------------------------
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__)
#include "wx/palmos/apptrait.h"
#elif defined(__WIN32__)
#if defined(__WIN32__)
#include "wx/msw/apptrait.h"
#elif defined(__OS2__)
#include "wx/os2/apptrait.h"

View File

@ -4,7 +4,7 @@
// Author: Mattia Barbon and Vadim Zeitlin
// Modified by:
// Created: 07/07/03
// RCS-ID: $Id: arrstr.h 66724 2011-01-20 08:38:36Z SC $
// RCS-ID: $Id: arrstr.h 67343 2011-03-30 14:16:04Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -28,7 +28,7 @@ inline int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2)
return wxStringSortAscending(s2, s1);
}
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
#include "wx/dynarray.h"
@ -100,7 +100,7 @@ private:
}
};
#else // if !wxUSE_STL
#else // if !wxUSE_STD_CONTAINERS
// this shouldn't be defined for compilers not supporting template methods or
// without std::distance()
@ -384,7 +384,7 @@ public:
{ Copy(array); }
};
#endif // !wxUSE_STL
#endif // !wxUSE_STD_CONTAINERS
// this class provides a temporary wxString* from a
// wxArrayString

View File

@ -3,7 +3,7 @@
// Purpose: functions to manipulate atomically integers and pointers
// Author: Armel Asselin
// Created: 12/13/2006
// RCS-ID: $Id: atomic.h 53954 2008-06-02 20:42:23Z VZ $
// RCS-ID: $Id: atomic.h 70808 2012-03-04 20:31:42Z VZ $
// Copyright: (c) Armel Asselin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -43,7 +43,7 @@ inline wxUint32 wxAtomicDec (wxUint32 &value)
}
#elif defined(__WXMSW__)
#elif defined(__WINDOWS__)
// include standard Windows headers
#include "wx/msw/wrapwin.h"

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams
// Modified by:
// Created: 2008-08-04
// RCS-ID: $Id: auibar.h 66546 2011-01-03 18:43:30Z VZ $
// RCS-ID: $Id: auibar.h 69594 2011-10-30 16:51:10Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1
///////////////////////////////////////////////////////////////////////////////
@ -65,44 +65,44 @@ enum wxAuiToolBarToolTextOrientation
class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent
{
public:
wxAuiToolBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0)
: wxNotifyEvent(command_type, win_id)
wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
int winId = 0)
: wxNotifyEvent(commandType, winId)
{
is_dropdown_clicked = false;
click_pt = wxPoint(-1, -1);
rect = wxRect(-1,-1, 0, 0);
tool_id = -1;
m_isDropdownClicked = false;
m_clickPt = wxPoint(-1, -1);
m_rect = wxRect(-1,-1, 0, 0);
m_toolId = -1;
}
#ifndef SWIG
wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
{
is_dropdown_clicked = c.is_dropdown_clicked;
click_pt = c.click_pt;
rect = c.rect;
tool_id = c.tool_id;
m_isDropdownClicked = c.m_isDropdownClicked;
m_clickPt = c.m_clickPt;
m_rect = c.m_rect;
m_toolId = c.m_toolId;
}
#endif
wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); }
bool IsDropDownClicked() const { return is_dropdown_clicked; }
void SetDropDownClicked(bool c) { is_dropdown_clicked = c; }
bool IsDropDownClicked() const { return m_isDropdownClicked; }
void SetDropDownClicked(bool c) { m_isDropdownClicked = c; }
wxPoint GetClickPoint() const { return click_pt; }
void SetClickPoint(const wxPoint& p) { click_pt = p; }
wxPoint GetClickPoint() const { return m_clickPt; }
void SetClickPoint(const wxPoint& p) { m_clickPt = p; }
wxRect GetItemRect() const { return rect; }
void SetItemRect(const wxRect& r) { rect = r; }
wxRect GetItemRect() const { return m_rect; }
void SetItemRect(const wxRect& r) { m_rect = r; }
int GetToolId() const { return tool_id; }
void SetToolId(int toolid) { tool_id = toolid; }
int GetToolId() const { return m_toolId; }
void SetToolId(int toolId) { m_toolId = toolId; }
private:
bool is_dropdown_clicked;
wxPoint click_pt;
wxRect rect;
int tool_id;
bool m_isDropdownClicked;
wxPoint m_clickPt;
wxRect m_rect;
int m_toolId;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent)
@ -117,18 +117,18 @@ public:
wxAuiToolBarItem()
{
window = NULL;
sizer_item = NULL;
spacer_pixels = 0;
toolid = 0;
kind = wxITEM_NORMAL;
state = 0; // normal, enabled
proportion = 0;
active = true;
dropdown = true;
sticky = true;
user_data = 0;
alignment = wxALIGN_CENTER;
m_window = NULL;
m_sizerItem = NULL;
m_spacerPixels = 0;
m_toolId = 0;
m_kind = wxITEM_NORMAL;
m_state = 0; // normal, enabled
m_proportion = 0;
m_active = true;
m_dropDown = true;
m_sticky = true;
m_userData = 0;
m_alignment = wxALIGN_CENTER;
}
wxAuiToolBarItem(const wxAuiToolBarItem& c)
@ -144,106 +144,106 @@ public:
void Assign(const wxAuiToolBarItem& c)
{
window = c.window;
label = c.label;
bitmap = c.bitmap;
disabled_bitmap = c.disabled_bitmap;
hover_bitmap = c.hover_bitmap;
short_help = c.short_help;
long_help = c.long_help;
sizer_item = c.sizer_item;
min_size = c.min_size;
spacer_pixels = c.spacer_pixels;
toolid = c.toolid;
kind = c.kind;
state = c.state;
proportion = c.proportion;
active = c.active;
dropdown = c.dropdown;
sticky = c.sticky;
user_data = c.user_data;
alignment = c.alignment;
m_window = c.m_window;
m_label = c.m_label;
m_bitmap = c.m_bitmap;
m_disabledBitmap = c.m_disabledBitmap;
m_hoverBitmap = c.m_hoverBitmap;
m_shortHelp = c.m_shortHelp;
m_longHelp = c.m_longHelp;
m_sizerItem = c.m_sizerItem;
m_minSize = c.m_minSize;
m_spacerPixels = c.m_spacerPixels;
m_toolId = c.m_toolId;
m_kind = c.m_kind;
m_state = c.m_state;
m_proportion = c.m_proportion;
m_active = c.m_active;
m_dropDown = c.m_dropDown;
m_sticky = c.m_sticky;
m_userData = c.m_userData;
m_alignment = c.m_alignment;
}
void SetWindow(wxWindow* w) { window = w; }
wxWindow* GetWindow() { return window; }
void SetWindow(wxWindow* w) { m_window = w; }
wxWindow* GetWindow() { return m_window; }
void SetId(int new_id) { toolid = new_id; }
int GetId() const { return toolid; }
void SetId(int newId) { m_toolId = newId; }
int GetId() const { return m_toolId; }
void SetKind(int new_kind) { kind = new_kind; }
int GetKind() const { return kind; }
void SetKind(int newKind) { m_kind = newKind; }
int GetKind() const { return m_kind; }
void SetState(int new_state) { state = new_state; }
int GetState() const { return state; }
void SetState(int newState) { m_state = newState; }
int GetState() const { return m_state; }
void SetSizerItem(wxSizerItem* s) { sizer_item = s; }
wxSizerItem* GetSizerItem() const { return sizer_item; }
void SetSizerItem(wxSizerItem* s) { m_sizerItem = s; }
wxSizerItem* GetSizerItem() const { return m_sizerItem; }
void SetLabel(const wxString& s) { label = s; }
const wxString& GetLabel() const { return label; }
void SetLabel(const wxString& s) { m_label = s; }
const wxString& GetLabel() const { return m_label; }
void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; }
const wxBitmap& GetBitmap() const { return bitmap; }
void SetBitmap(const wxBitmap& bmp) { m_bitmap = bmp; }
const wxBitmap& GetBitmap() const { return m_bitmap; }
void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; }
const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; }
void SetDisabledBitmap(const wxBitmap& bmp) { m_disabledBitmap = bmp; }
const wxBitmap& GetDisabledBitmap() const { return m_disabledBitmap; }
void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; }
const wxBitmap& GetHoverBitmap() const { return hover_bitmap; }
void SetHoverBitmap(const wxBitmap& bmp) { m_hoverBitmap = bmp; }
const wxBitmap& GetHoverBitmap() const { return m_hoverBitmap; }
void SetShortHelp(const wxString& s) { short_help = s; }
const wxString& GetShortHelp() const { return short_help; }
void SetShortHelp(const wxString& s) { m_shortHelp = s; }
const wxString& GetShortHelp() const { return m_shortHelp; }
void SetLongHelp(const wxString& s) { long_help = s; }
const wxString& GetLongHelp() const { return long_help; }
void SetLongHelp(const wxString& s) { m_longHelp = s; }
const wxString& GetLongHelp() const { return m_longHelp; }
void SetMinSize(const wxSize& s) { min_size = s; }
const wxSize& GetMinSize() const { return min_size; }
void SetMinSize(const wxSize& s) { m_minSize = s; }
const wxSize& GetMinSize() const { return m_minSize; }
void SetSpacerPixels(int s) { spacer_pixels = s; }
int GetSpacerPixels() const { return spacer_pixels; }
void SetSpacerPixels(int s) { m_spacerPixels = s; }
int GetSpacerPixels() const { return m_spacerPixels; }
void SetProportion(int p) { proportion = p; }
int GetProportion() const { return proportion; }
void SetProportion(int p) { m_proportion = p; }
int GetProportion() const { return m_proportion; }
void SetActive(bool b) { active = b; }
bool IsActive() const { return active; }
void SetActive(bool b) { m_active = b; }
bool IsActive() const { return m_active; }
void SetHasDropDown(bool b) { dropdown = b; }
bool HasDropDown() const { return dropdown; }
void SetHasDropDown(bool b) { m_dropDown = b; }
bool HasDropDown() const { return m_dropDown; }
void SetSticky(bool b) { sticky = b; }
bool IsSticky() const { return sticky; }
void SetSticky(bool b) { m_sticky = b; }
bool IsSticky() const { return m_sticky; }
void SetUserData(long l) { user_data = l; }
long GetUserData() const { return user_data; }
void SetUserData(long l) { m_userData = l; }
long GetUserData() const { return m_userData; }
void SetAlignment(int l) { alignment = l; }
int GetAlignment() const { return alignment; }
void SetAlignment(int l) { m_alignment = l; }
int GetAlignment() const { return m_alignment; }
private:
wxWindow* window; // item's associated window
wxString label; // label displayed on the item
wxBitmap bitmap; // item's bitmap
wxBitmap disabled_bitmap; // item's disabled bitmap
wxBitmap hover_bitmap; // item's hover bitmap
wxString short_help; // short help (for tooltip)
wxString long_help; // long help (for status bar)
wxSizerItem* sizer_item; // sizer item
wxSize min_size; // item's minimum size
int spacer_pixels; // size of a spacer
int toolid; // item's id
int kind; // item's kind
int state; // state
int proportion; // proportion
bool active; // true if the item is currently active
bool dropdown; // true if the item has a dropdown button
bool sticky; // overrides button states if true (always active)
long user_data; // user-specified data
int alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
wxWindow* m_window; // item's associated window
wxString m_label; // label displayed on the item
wxBitmap m_bitmap; // item's bitmap
wxBitmap m_disabledBitmap; // item's disabled bitmap
wxBitmap m_hoverBitmap; // item's hover bitmap
wxString m_shortHelp; // short help (for tooltip)
wxString m_longHelp; // long help (for status bar)
wxSizerItem* m_sizerItem; // sizer item
wxSize m_minSize; // item's minimum size
int m_spacerPixels; // size of a spacer
int m_toolId; // item's id
int m_kind; // item's kind
int m_state; // state
int m_proportion; // proportion
bool m_active; // true if the item is currently active
bool m_dropDown; // true if the item has a dropdown button
bool m_sticky; // overrides button states if true (always active)
long m_userData; // user-specified data
int m_alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
};
#ifndef SWIG
@ -325,8 +325,8 @@ public:
wxWindow* wnd,
const wxAuiToolBarItem& item) = 0;
virtual int GetElementSize(int element_id) = 0;
virtual void SetElementSize(int element_id, int size) = 0;
virtual int GetElementSize(int elementId) = 0;
virtual void SetElementSize(int elementId, int size) = 0;
virtual int ShowDropDown(
wxWindow* wnd,
@ -407,30 +407,30 @@ public:
const wxAuiToolBarItem& item);
virtual int GetElementSize(int element);
virtual void SetElementSize(int element_id, int size);
virtual void SetElementSize(int elementId, int size);
virtual int ShowDropDown(wxWindow* wnd,
const wxAuiToolBarItemArray& items);
protected:
wxBitmap m_button_dropdown_bmp;
wxBitmap m_disabled_button_dropdown_bmp;
wxBitmap m_overflow_bmp;
wxBitmap m_disabled_overflow_bmp;
wxColour m_base_colour;
wxColour m_highlight_colour;
wxBitmap m_buttonDropDownBmp;
wxBitmap m_disabledButtonDropDownBmp;
wxBitmap m_overflowBmp;
wxBitmap m_disabledOverflowBmp;
wxColour m_baseColour;
wxColour m_highlightColour;
wxFont m_font;
unsigned int m_flags;
int m_text_orientation;
int m_textOrientation;
wxPen m_gripper_pen1;
wxPen m_gripper_pen2;
wxPen m_gripper_pen3;
wxPen m_gripperPen1;
wxPen m_gripperPen2;
wxPen m_gripperPen3;
int m_separator_size;
int m_gripper_size;
int m_overflow_size;
int m_separatorSize;
int m_gripperSize;
int m_overflowSize;
};
@ -456,40 +456,40 @@ public:
bool SetFont(const wxFont& font);
wxAuiToolBarItem* AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int toolId,
const wxString& label,
const wxBitmap& bitmap,
const wxString& short_help_string = wxEmptyString,
const wxString& shortHelpString = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL);
wxAuiToolBarItem* AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int toolId,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
const wxBitmap& disabledBitmap,
wxItemKind kind,
const wxString& short_help_string,
const wxString& long_help_string,
wxObject* client_data);
const wxString& shortHelpString,
const wxString& longHelpString,
wxObject* clientData);
wxAuiToolBarItem* AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int toolId,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
const wxBitmap& disabledBitmap,
bool toggle = false,
wxObject* client_data = NULL,
const wxString& short_help_string = wxEmptyString,
const wxString& long_help_string = wxEmptyString)
wxObject* clientData = NULL,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
{
return AddTool(tool_id,
return AddTool(toolId,
wxEmptyString,
bitmap,
disabled_bitmap,
disabledBitmap,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
short_help_string,
long_help_string,
client_data);
shortHelpString,
longHelpString,
clientData);
}
wxAuiToolBarItem* AddLabel(int tool_id,
wxAuiToolBarItem* AddLabel(int toolId,
const wxString& label = wxEmptyString,
const int width = -1);
wxAuiToolBarItem* AddControl(wxControl* control,
@ -500,22 +500,22 @@ public:
bool Realize();
wxControl* FindControl(int window_id);
wxControl* FindControl(int windowId);
wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
wxAuiToolBarItem* FindToolByIndex(int idx) const;
wxAuiToolBarItem* FindTool(int tool_id) const;
wxAuiToolBarItem* FindTool(int toolId) const;
void ClearTools() { Clear() ; }
void Clear();
bool DeleteTool(int tool_id);
bool DeleteByIndex(int tool_id);
bool DeleteTool(int toolId);
bool DeleteByIndex(int toolId);
size_t GetToolCount() const;
int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); }
int GetToolIndex(int tool_id) const;
bool GetToolFits(int tool_id) const;
wxRect GetToolRect(int tool_id) const;
bool GetToolFitsByIndex(int tool_id) const;
int GetToolPos(int toolId) const { return GetToolIndex(toolId); }
int GetToolIndex(int toolId) const;
bool GetToolFits(int toolId) const;
wxRect GetToolRect(int toolId) const;
bool GetToolFitsByIndex(int toolId) const;
bool GetToolBarFits() const;
void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
@ -531,14 +531,14 @@ public:
bool GetGripperVisible() const;
void SetGripperVisible(bool visible);
void ToggleTool(int tool_id, bool state);
bool GetToolToggled(int tool_id) const;
void ToggleTool(int toolId, bool state);
bool GetToolToggled(int toolId) const;
void EnableTool(int tool_id, bool state);
bool GetToolEnabled(int tool_id) const;
void EnableTool(int toolId, bool state);
bool GetToolEnabled(int toolId) const;
void SetToolDropDown(int tool_id, bool dropdown);
bool GetToolDropDown(int tool_id) const;
void SetToolDropDown(int toolId, bool dropdown);
bool GetToolDropDown(int toolId) const;
void SetToolBorderPadding(int padding);
int GetToolBorderPadding() const;
@ -549,34 +549,37 @@ public:
void SetToolPacking(int packing);
int GetToolPacking() const;
void SetToolProportion(int tool_id, int proportion);
int GetToolProportion(int tool_id) const;
void SetToolProportion(int toolId, int proportion);
int GetToolProportion(int toolId) const;
void SetToolSeparation(int separation);
int GetToolSeparation() const;
void SetToolSticky(int tool_id, bool sticky);
bool GetToolSticky(int tool_id) const;
void SetToolSticky(int toolId, bool sticky);
bool GetToolSticky(int toolId) const;
wxString GetToolLabel(int tool_id) const;
void SetToolLabel(int tool_id, const wxString& label);
wxString GetToolLabel(int toolId) const;
void SetToolLabel(int toolId, const wxString& label);
wxBitmap GetToolBitmap(int tool_id) const;
void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
wxBitmap GetToolBitmap(int toolId) const;
void SetToolBitmap(int toolId, const wxBitmap& bitmap);
wxString GetToolShortHelp(int tool_id) const;
void SetToolShortHelp(int tool_id, const wxString& help_string);
wxString GetToolShortHelp(int toolId) const;
void SetToolShortHelp(int toolId, const wxString& helpString);
wxString GetToolLongHelp(int tool_id) const;
void SetToolLongHelp(int tool_id, const wxString& help_string);
wxString GetToolLongHelp(int toolId) const;
void SetToolLongHelp(int toolId, const wxString& helpString);
void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
const wxAuiToolBarItemArray& append);
// get size of hint rectangle for a particular dock location
wxSize GetHintSize(int dock_direction) const;
wxSize GetHintSize(int dockDirection) const;
bool IsPaneValid(const wxAuiPaneInfo& pane) const;
// Override to call DoIdleUpdate().
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
protected:
virtual void OnCustomRender(wxDC& WXUNUSED(dc),
@ -624,30 +627,30 @@ protected:
wxAuiToolBarItemArray m_items; // array of toolbar items
wxAuiToolBarArt* m_art; // art provider
wxBoxSizer* m_sizer; // main sizer for toolbar
wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed)
wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown
wxAuiToolBarItem* m_actionItem; // item that's being acted upon (pressed)
wxAuiToolBarItem* m_tipItem; // item that has its tooltip shown
wxBitmap m_bitmap; // double-buffer bitmap
wxSizerItem* m_gripper_sizer_item;
wxSizerItem* m_overflow_sizer_item;
wxSize m_absolute_min_size;
wxPoint m_action_pos; // position of left-mouse down
wxAuiToolBarItemArray m_custom_overflow_prepend;
wxAuiToolBarItemArray m_custom_overflow_append;
wxSizerItem* m_gripperSizerItem;
wxSizerItem* m_overflowSizerItem;
wxSize m_absoluteMinSize;
wxPoint m_actionPos; // position of left-mouse down
wxAuiToolBarItemArray m_customOverflowPrepend;
wxAuiToolBarItemArray m_customOverflowAppend;
int m_button_width;
int m_button_height;
int m_sizer_element_count;
int m_left_padding;
int m_right_padding;
int m_top_padding;
int m_bottom_padding;
int m_tool_packing;
int m_tool_border_padding;
int m_tool_text_orientation;
int m_overflow_state;
int m_buttonWidth;
int m_buttonHeight;
int m_sizerElementCount;
int m_leftPadding;
int m_rightPadding;
int m_topPadding;
int m_bottomPadding;
int m_toolPacking;
int m_toolBorderPadding;
int m_toolTextOrientation;
int m_overflowState;
bool m_dragging;
bool m_gripper_visible;
bool m_overflow_visible;
bool m_gripperVisible;
bool m_overflowVisible;
long m_style;
bool RealizeHelper(wxClientDC& dc, bool horizontal);

View File

@ -24,7 +24,7 @@
#include "wx/aui/framemanager.h"
#include "wx/aui/dockart.h"
#include "wx/aui/floatpane.h"
#include "wx/control.h"
#include "wx/bookctrl.h"
class wxAuiNotebook;
@ -60,40 +60,28 @@ enum wxAuiNotebookOption
// aui notebook event class
class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxNotifyEvent
class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent
{
public:
wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0)
: wxNotifyEvent(command_type, win_id)
wxAuiNotebookEvent(wxEventType commandType = wxEVT_NULL,
int winId = 0)
: wxBookCtrlEvent(commandType, winId)
{
old_selection = -1;
selection = -1;
drag_source = NULL;
m_dragSource = NULL;
}
#ifndef SWIG
wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxNotifyEvent(c)
wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
{
old_selection = c.old_selection;
selection = c.selection;
drag_source = c.drag_source;
m_dragSource = c.m_dragSource;
}
#endif
wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
void SetSelection(int s) { selection = s; m_commandInt = s; }
int GetSelection() const { return selection; }
void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
wxAuiNotebook* GetDragSource() const { return m_dragSource; }
void SetOldSelection(int s) { old_selection = s; }
int GetOldSelection() const { return old_selection; }
void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
wxAuiNotebook* GetDragSource() const { return drag_source; }
public:
int old_selection;
int selection;
wxAuiNotebook* drag_source;
private:
wxAuiNotebook* m_dragSource;
#ifndef SWIG
private:
@ -117,10 +105,10 @@ class WXDLLIMPEXP_AUI wxAuiTabContainerButton
public:
int id; // button's id
int cur_state; // current state (normal, hover, pressed, etc.)
int curState; // current state (normal, hover, pressed, etc.)
int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
wxBitmap bitmap; // button's hover bitmap
wxBitmap dis_bitmap; // button's disabled bitmap
wxBitmap disBitmap; // button's disabled bitmap
wxRect rect; // button's hit rectangle
};
@ -143,12 +131,14 @@ public:
virtual wxAuiTabArt* Clone() = 0;
virtual void SetFlags(unsigned int flags) = 0;
virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
size_t tab_count) = 0;
virtual void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tabCount) = 0;
virtual void SetNormalFont(const wxFont& font) = 0;
virtual void SetSelectedFont(const wxFont& font) = 0;
virtual void SetMeasuringFont(const wxFont& font) = 0;
virtual void SetColour(const wxColour& colour) = 0;
virtual void SetActiveColour(const wxColour& colour) = 0;
virtual void DrawBackground(
wxDC& dc,
@ -158,20 +148,20 @@ public:
virtual void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxAuiNotebookPage& pane,
const wxRect& in_rect,
int close_button_state,
wxRect* out_tab_rect,
wxRect* out_button_rect,
int* x_extent) = 0;
const wxRect& inRect,
int closeButtonState,
wxRect* outTabRect,
wxRect* outButtonRect,
int* xExtent) = 0;
virtual void DrawButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& in_rect,
int bitmap_id,
int button_state,
const wxRect& inRect,
int bitmapId,
int buttonState,
int orientation,
wxRect* out_rect) = 0;
wxRect* outRect) = 0;
virtual wxSize GetTabSize(
wxDC& dc,
@ -179,20 +169,20 @@ public:
const wxString& caption,
const wxBitmap& bitmap,
bool active,
int close_button_state,
int* x_extent) = 0;
int closeButtonState,
int* xExtent) = 0;
virtual int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int active_idx) = 0;
int activeIdx) = 0;
virtual int GetIndentSize() = 0;
virtual int GetBestTabCtrlSize(
wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size) = 0;
const wxSize& requiredBmpSize) = 0;
};
@ -206,12 +196,14 @@ public:
wxAuiTabArt* Clone();
void SetFlags(unsigned int flags);
void SetSizingInfo(const wxSize& tab_ctrl_size,
size_t tab_count);
void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tabCount);
void SetNormalFont(const wxFont& font);
void SetSelectedFont(const wxFont& font);
void SetMeasuringFont(const wxFont& font);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DrawBackground(
wxDC& dc,
@ -221,20 +213,20 @@ public:
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxAuiNotebookPage& pane,
const wxRect& in_rect,
int close_button_state,
wxRect* out_tab_rect,
wxRect* out_button_rect,
int* x_extent);
const wxRect& inRect,
int closeButtonState,
wxRect* outTabRect,
wxRect* outButtonRect,
int* xExtent);
void DrawButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& in_rect,
int bitmap_id,
int button_state,
const wxRect& inRect,
int bitmapId,
int buttonState,
int orientation,
wxRect* out_rect);
wxRect* outRect);
int GetIndentSize();
@ -244,38 +236,39 @@ public:
const wxString& caption,
const wxBitmap& bitmap,
bool active,
int close_button_state,
int* x_extent);
int closeButtonState,
int* xExtent);
int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int active_idx);
int activeIdx);
int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size);
const wxSize& requiredBmpSize);
protected:
wxFont m_normal_font;
wxFont m_selected_font;
wxFont m_measuring_font;
wxColour m_base_colour;
wxPen m_base_colour_pen;
wxPen m_border_pen;
wxBrush m_base_colour_brush;
wxBitmap m_active_close_bmp;
wxBitmap m_disabled_close_bmp;
wxBitmap m_active_left_bmp;
wxBitmap m_disabled_left_bmp;
wxBitmap m_active_right_bmp;
wxBitmap m_disabled_right_bmp;
wxBitmap m_active_windowlist_bmp;
wxBitmap m_disabled_windowlist_bmp;
wxFont m_normalFont;
wxFont m_selectedFont;
wxFont m_measuringFont;
wxColour m_baseColour;
wxPen m_baseColourPen;
wxPen m_borderPen;
wxBrush m_baseColourBrush;
wxColour m_activeColour;
wxBitmap m_activeCloseBmp;
wxBitmap m_disabledCloseBmp;
wxBitmap m_activeLeftBmp;
wxBitmap m_disabledLeftBmp;
wxBitmap m_activeRightBmp;
wxBitmap m_disabledRightBmp;
wxBitmap m_activeWindowListBmp;
wxBitmap m_disabledWindowListBmp;
int m_fixed_tab_width;
int m_tab_ctrl_height;
int m_fixedTabWidth;
int m_tabCtrlHeight;
unsigned int m_flags;
};
@ -291,12 +284,14 @@ public:
wxAuiTabArt* Clone();
void SetFlags(unsigned int flags);
void SetSizingInfo(const wxSize& tab_ctrl_size,
size_t tab_count);
void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tabCount);
void SetNormalFont(const wxFont& font);
void SetSelectedFont(const wxFont& font);
void SetMeasuringFont(const wxFont& font);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DrawBackground(
wxDC& dc,
@ -306,20 +301,20 @@ public:
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxAuiNotebookPage& pane,
const wxRect& in_rect,
int close_button_state,
wxRect* out_tab_rect,
wxRect* out_button_rect,
int* x_extent);
const wxRect& inRect,
int closeButtonState,
wxRect* outTabRect,
wxRect* outButtonRect,
int* xExtent);
void DrawButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& in_rect,
int bitmap_id,
int button_state,
const wxRect& inRect,
int bitmapId,
int buttonState,
int orientation,
wxRect* out_rect);
wxRect* outRect);
int GetIndentSize();
@ -329,38 +324,38 @@ public:
const wxString& caption,
const wxBitmap& bitmap,
bool active,
int close_button_state,
int* x_extent);
int closeButtonState,
int* xExtent);
int ShowDropDown(
wxWindow* wnd,
const wxAuiNotebookPageArray& items,
int active_idx);
int activeIdx);
int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size);
const wxSize& requiredBmpSize);
protected:
wxFont m_normal_font;
wxFont m_selected_font;
wxFont m_measuring_font;
wxPen m_normal_bkpen;
wxPen m_selected_bkpen;
wxBrush m_normal_bkbrush;
wxBrush m_selected_bkbrush;
wxBrush m_bkbrush;
wxBitmap m_active_close_bmp;
wxBitmap m_disabled_close_bmp;
wxBitmap m_active_left_bmp;
wxBitmap m_disabled_left_bmp;
wxBitmap m_active_right_bmp;
wxBitmap m_disabled_right_bmp;
wxBitmap m_active_windowlist_bmp;
wxBitmap m_disabled_windowlist_bmp;
wxFont m_normalFont;
wxFont m_selectedFont;
wxFont m_measuringFont;
wxPen m_normalBkPen;
wxPen m_selectedBkPen;
wxBrush m_normalBkBrush;
wxBrush m_selectedBkBrush;
wxBrush m_bkBrush;
wxBitmap m_activeCloseBmp;
wxBitmap m_disabledCloseBmp;
wxBitmap m_activeLeftBmp;
wxBitmap m_disabledLeftBmp;
wxBitmap m_activeRightBmp;
wxBitmap m_disabledRightBmp;
wxBitmap m_activeWindowListBmp;
wxBitmap m_disabledWindowListBmp;
int m_fixed_tab_width;
int m_fixedTabWidth;
unsigned int m_flags;
};
@ -387,7 +382,7 @@ public:
bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
bool MovePage(wxWindow* page, size_t new_idx);
bool MovePage(wxWindow* page, size_t newIdx);
bool RemovePage(wxWindow* page);
bool SetActivePage(wxWindow* page);
bool SetActivePage(size_t page);
@ -401,17 +396,19 @@ public:
wxAuiNotebookPage& GetPage(size_t idx);
const wxAuiNotebookPage& GetPage(size_t idx) const;
wxAuiNotebookPageArray& GetPages();
void SetNormalFont(const wxFont& normal_font);
void SetSelectedFont(const wxFont& selected_font);
void SetMeasuringFont(const wxFont& measuring_font);
void SetNormalFont(const wxFont& normalFont);
void SetSelectedFont(const wxFont& selectedFont);
void SetMeasuringFont(const wxFont& measuringFont);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DoShowHide();
void SetRect(const wxRect& rect);
void RemoveButton(int id);
void AddButton(int id,
int location,
const wxBitmap& normal_bitmap = wxNullBitmap,
const wxBitmap& disabled_bitmap = wxNullBitmap);
const wxBitmap& normalBitmap = wxNullBitmap,
const wxBitmap& disabledBitmap = wxNullBitmap);
size_t GetTabOffset() const;
void SetTabOffset(size_t offset);
@ -431,9 +428,9 @@ protected:
wxAuiTabArt* m_art;
wxAuiNotebookPageArray m_pages;
wxAuiTabContainerButtonArray m_buttons;
wxAuiTabContainerButtonArray m_tab_close_buttons;
wxAuiTabContainerButtonArray m_tabCloseButtons;
wxRect m_rect;
size_t m_tab_offset;
size_t m_tabOffset;
unsigned int m_flags;
};
@ -452,7 +449,7 @@ public:
~wxAuiTabCtrl();
bool IsDragging() const { return m_is_dragging; }
bool IsDragging() const { return m_isDragging; }
protected:
// choose the default border for this window
@ -478,11 +475,11 @@ protected:
protected:
wxPoint m_click_pt;
wxWindow* m_click_tab;
bool m_is_dragging;
wxAuiTabContainerButton* m_hover_button;
wxAuiTabContainerButton* m_pressed_button;
wxPoint m_clickPt;
wxWindow* m_clickTab;
bool m_isDragging;
wxAuiTabContainerButton* m_hoverButton;
wxAuiTabContainerButton* m_pressedButton;
#ifndef SWIG
DECLARE_CLASS(wxAuiTabCtrl)
@ -493,18 +490,22 @@ protected:
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
{
public:
wxAuiNotebook();
wxAuiNotebook() { Init(); }
wxAuiNotebook(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAUI_NB_DEFAULT_STYLE);
long style = wxAUI_NB_DEFAULT_STYLE)
{
Init();
Create(parent, id, pos, size, style);
}
virtual ~wxAuiNotebook();
@ -526,7 +527,7 @@ public:
bool select = false,
const wxBitmap& bitmap = wxNullBitmap);
bool InsertPage(size_t page_idx,
bool InsertPage(size_t pageIdx,
wxWindow* page,
const wxString& caption,
bool select = false,
@ -536,16 +537,16 @@ public:
bool RemovePage(size_t page);
size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const;
int GetPageIndex(wxWindow* page_wnd) const;
wxWindow* GetPage(size_t pageIdx) const;
int GetPageIndex(wxWindow* pageWnd) const;
bool SetPageText(size_t page, const wxString& text);
wxString GetPageText(size_t page_idx) const;
wxString GetPageText(size_t pageIdx) const;
bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
wxBitmap GetPageBitmap(size_t page_idx) const;
wxBitmap GetPageBitmap(size_t pageIdx) const;
size_t SetSelection(size_t new_page);
int SetSelection(size_t newPage);
int GetSelection() const;
virtual void Split(size_t page, int direction);
@ -585,7 +586,28 @@ public:
// Redo sizing after thawing
virtual void Thaw();
//wxBookCtrlBase functions
virtual void SetPageSize (const wxSize &size);
virtual int HitTest (const wxPoint &pt, long *flags=NULL) const;
virtual int GetPageImage(size_t n) const;
virtual bool SetPageImage(size_t n, int imageId);
wxWindow* GetCurrentPage () const;
virtual int ChangeSelection(size_t n);
virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
int imageId);
virtual bool DeleteAllPages();
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
bool select, int imageId);
protected:
// Common part of all ctors.
void Init();
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
@ -598,12 +620,18 @@ protected:
virtual int CalculateTabCtrlHeight();
virtual wxSize CalculateNewSplitSize();
// remove the page and return a pointer to it
virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; }
//A general selection function
virtual int DoModifySelection(size_t n, bool events);
protected:
void DoSizing();
void InitNotebook(long style);
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tab_ctrl);
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
wxAuiTabCtrl* GetActiveTabCtrl();
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
void RemoveEmptyTabFrames();
@ -618,6 +646,7 @@ protected:
void OnTabBeginDrag(wxAuiNotebookEvent& evt);
void OnTabDragMotion(wxAuiNotebookEvent& evt);
void OnTabEndDrag(wxAuiNotebookEvent& evt);
void OnTabCancelDrag(wxAuiNotebookEvent& evt);
void OnTabButton(wxAuiNotebookEvent& evt);
void OnTabMiddleDown(wxAuiNotebookEvent& evt);
void OnTabMiddleUp(wxAuiNotebookEvent& evt);
@ -638,26 +667,23 @@ protected:
wxAuiManager m_mgr;
wxAuiTabContainer m_tabs;
int m_curpage;
int m_tab_id_counter;
wxWindow* m_dummy_wnd;
int m_curPage;
int m_tabIdCounter;
wxWindow* m_dummyWnd;
wxSize m_requested_bmp_size;
int m_requested_tabctrl_height;
wxFont m_selected_font;
wxFont m_normal_font;
int m_tab_ctrl_height;
wxSize m_requestedBmpSize;
int m_requestedTabCtrlHeight;
wxFont m_selectedFont;
wxFont m_normalFont;
int m_tabCtrlHeight;
int m_last_drag_x;
int m_lastDragX;
unsigned int m_flags;
#ifndef SWIG
DECLARE_CLASS(wxAuiNotebook)
DECLARE_EVENT_TABLE()
#endif
WX_DECLARE_CONTROL_CONTAINER();
};

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams
// Modified by:
// Created: 2005-05-17
// RCS-ID: $Id: dockart.h 66670 2011-01-12 13:39:36Z VZ $
// RCS-ID: $Id: dockart.h 69590 2011-10-30 14:20:03Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1
///////////////////////////////////////////////////////////////////////////////
@ -37,7 +37,7 @@ public:
virtual ~wxAuiDockArt() { }
virtual int GetMetric(int id) = 0;
virtual void SetMetric(int id, int new_val) = 0;
virtual void SetMetric(int id, int newVal) = 0;
virtual void SetFont(int id, const wxFont& font) = 0;
virtual wxFont GetFont(int id) = 0;
virtual wxColour GetColour(int id) = 0;
@ -74,7 +74,7 @@ public:
virtual void DrawPaneButton(wxDC& dc,
wxWindow* window,
int button,
int button_state,
int buttonState,
const wxRect& rect,
wxAuiPaneInfo& pane) = 0;
};
@ -90,8 +90,8 @@ public:
wxAuiDefaultDockArt();
int GetMetric(int metric_id);
void SetMetric(int metric_id, int new_val);
int GetMetric(int metricId);
void SetMetric(int metricId, int newVal);
wxColour GetColour(int id);
void SetColour(int id, const wxColor& colour);
void SetFont(int id, const wxFont& font);
@ -126,7 +126,7 @@ public:
void DrawPaneButton(wxDC& dc,
wxWindow *window,
int button,
int button_state,
int buttonState,
const wxRect& rect,
wxAuiPaneInfo& pane);
@ -142,35 +142,35 @@ protected:
protected:
wxPen m_border_pen;
wxBrush m_sash_brush;
wxBrush m_background_brush;
wxBrush m_gripper_brush;
wxFont m_caption_font;
wxBitmap m_inactive_close_bitmap;
wxBitmap m_inactive_pin_bitmap;
wxBitmap m_inactive_maximize_bitmap;
wxBitmap m_inactive_restore_bitmap;
wxBitmap m_active_close_bitmap;
wxBitmap m_active_pin_bitmap;
wxBitmap m_active_maximize_bitmap;
wxBitmap m_active_restore_bitmap;
wxPen m_gripper_pen1;
wxPen m_gripper_pen2;
wxPen m_gripper_pen3;
wxColour m_base_colour;
wxColour m_active_caption_colour;
wxColour m_active_caption_gradient_colour;
wxColour m_active_caption_text_colour;
wxColour m_inactive_caption_colour;
wxColour m_inactive_caption_gradient_colour;
wxColour m_inactive_caption_text_colour;
int m_border_size;
int m_caption_size;
int m_sash_size;
int m_button_size;
int m_gripper_size;
int m_gradient_type;
wxPen m_borderPen;
wxBrush m_sashBrush;
wxBrush m_backgroundBrush;
wxBrush m_gripperBrush;
wxFont m_captionFont;
wxBitmap m_inactiveCloseBitmap;
wxBitmap m_inactivePinBitmap;
wxBitmap m_inactiveMaximizeBitmap;
wxBitmap m_inactiveRestoreBitmap;
wxBitmap m_activeCloseBitmap;
wxBitmap m_activePinBitmap;
wxBitmap m_activeMaximizeBitmap;
wxBitmap m_activeRestoreBitmap;
wxPen m_gripperPen1;
wxPen m_gripperPen2;
wxPen m_gripperPen3;
wxColour m_baseColour;
wxColour m_activeCaptionColour;
wxColour m_activeCaptionGradientColour;
wxColour m_activeCaptionTextColour;
wxColour m_inactiveCaptionColour;
wxColour m_inactiveCaptionGradientColour;
wxColour m_inactiveCaptionTextColour;
int m_borderSize;
int m_captionSize;
int m_sashSize;
int m_buttonSize;
int m_gripperSize;
int m_gradientType;
};

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams
// Modified by:
// Created: 2005-05-17
// RCS-ID: $Id: floatpane.h 61724 2009-08-21 10:41:26Z VZ $
// RCS-ID: $Id: floatpane.h 69590 2011-10-30 14:20:03Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1
///////////////////////////////////////////////////////////////////////////////
@ -33,7 +33,7 @@ class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
{
public:
wxAuiFloatingFrame(wxWindow* parent,
wxAuiManager* owner_mgr,
wxAuiManager* ownerMgr,
const wxAuiPaneInfo& pane,
wxWindowID id = wxID_ANY,
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
@ -46,7 +46,7 @@ public:
protected:
virtual void OnMoveStart();
virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
virtual void OnMoveFinished();
private:
@ -58,16 +58,16 @@ private:
static bool isMouseDown();
private:
wxWindow* m_pane_window; // pane window being managed
bool m_solid_drag; // true if system uses solid window drag
wxWindow* m_paneWindow; // pane window being managed
bool m_solidDrag; // true if system uses solid window drag
bool m_moving;
wxRect m_last_rect;
wxRect m_last2_rect;
wxRect m_last3_rect;
wxSize m_last_size;
wxRect m_lastRect;
wxRect m_last2Rect;
wxRect m_last3Rect;
wxSize m_lastSize;
wxDirection m_lastDirection;
wxWeakRef<wxAuiManager> m_owner_mgr;
wxWeakRef<wxAuiManager> m_ownerMgr;
wxAuiManager m_mgr;
#ifndef SWIG

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams
// Modified by:
// Created: 2005-05-17
// RCS-ID: $Id: framemanager.h 66673 2011-01-12 18:04:39Z PC $
// RCS-ID: $Id: framemanager.h 70807 2012-03-04 20:31:34Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1
///////////////////////////////////////////////////////////////////////////////
@ -458,7 +458,7 @@ class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
public:
wxAuiManager(wxWindow* managed_wnd = NULL,
wxAuiManager(wxWindow* managedWnd = NULL,
unsigned int flags = wxAUI_MGR_DEFAULT);
virtual ~wxAuiManager();
void UnInit();
@ -466,12 +466,12 @@ public:
void SetFlags(unsigned int flags);
unsigned int GetFlags() const;
void SetManagedWindow(wxWindow* managed_wnd);
void SetManagedWindow(wxWindow* managedWnd);
wxWindow* GetManagedWindow() const;
static wxAuiManager* GetManager(wxWindow* window);
void SetArtProvider(wxAuiDockArt* art_provider);
void SetArtProvider(wxAuiDockArt* artProvider);
wxAuiDockArt* GetArtProvider() const;
wxAuiPaneInfo& GetPane(wxWindow* window);
@ -479,35 +479,35 @@ public:
wxAuiPaneInfoArray& GetAllPanes();
bool AddPane(wxWindow* window,
const wxAuiPaneInfo& pane_info);
const wxAuiPaneInfo& paneInfo);
bool AddPane(wxWindow* window,
const wxAuiPaneInfo& pane_info,
const wxPoint& drop_pos);
const wxAuiPaneInfo& paneInfo,
const wxPoint& dropPos);
bool AddPane(wxWindow* window,
int direction = wxLEFT,
const wxString& caption = wxEmptyString);
bool InsertPane(wxWindow* window,
const wxAuiPaneInfo& insert_location,
int insert_level = wxAUI_INSERT_PANE);
const wxAuiPaneInfo& insertLocation,
int insertLevel = wxAUI_INSERT_PANE);
bool DetachPane(wxWindow* window);
void Update();
wxString SavePaneInfo(wxAuiPaneInfo& pane);
void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
void LoadPaneInfo(wxString panePart, wxAuiPaneInfo &pane);
wxString SavePerspective();
bool LoadPerspective(const wxString& perspective, bool update = true);
void SetDockSizeConstraint(double width_pct, double height_pct);
void GetDockSizeConstraint(double* width_pct, double* height_pct) const;
void SetDockSizeConstraint(double widthPct, double heightPct);
void GetDockSizeConstraint(double* widthPct, double* heightPct) const;
void ClosePane(wxAuiPaneInfo& pane_info);
void MaximizePane(wxAuiPaneInfo& pane_info);
void RestorePane(wxAuiPaneInfo& pane_info);
void ClosePane(wxAuiPaneInfo& paneInfo);
void MaximizePane(wxAuiPaneInfo& paneInfo);
void RestorePane(wxAuiPaneInfo& paneInfo);
void RestoreMaximizedPane();
public:
@ -516,16 +516,16 @@ public:
virtual bool CanDockPanel(const wxAuiPaneInfo & p);
void StartPaneDrag(
wxWindow* pane_window,
wxWindow* paneWindow,
const wxPoint& offset);
wxRect CalculateHintRect(
wxWindow* pane_window,
wxWindow* paneWindow,
const wxPoint& pt,
const wxPoint& offset);
void DrawHintRect(
wxWindow* pane_window,
wxWindow* paneWindow,
const wxPoint& pt,
const wxPoint& offset);
@ -552,26 +552,26 @@ protected:
wxAuiDockInfo& dock,
wxAuiPaneInfo& pane,
wxAuiDockUIPartArray& uiparts,
bool spacer_only);
bool spacerOnly);
void LayoutAddDock(wxSizer* container,
wxAuiDockInfo& dock,
wxAuiDockUIPartArray& uiparts,
bool spacer_only);
wxAuiDockUIPartArray& uiParts,
bool spacerOnly);
wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
wxAuiDockInfoArray& docks,
wxAuiDockUIPartArray& uiparts,
bool spacer_only = false);
wxAuiDockUIPartArray & uiParts,
bool spacerOnly = false);
virtual bool ProcessDockResult(wxAuiPaneInfo& target,
const wxAuiPaneInfo& new_pos);
const wxAuiPaneInfo& newPos);
bool DoDrop(wxAuiDockInfoArray& docks,
wxAuiPaneInfoArray& panes,
wxAuiPaneInfo& drop,
const wxPoint& pt,
const wxPoint& action_offset = wxPoint(0,0));
const wxPoint& actionOffset = wxPoint(0,0));
wxAuiDockUIPart* HitTest(int x, int y);
wxAuiDockUIPart* GetPanePart(wxWindow* pane);
@ -585,7 +585,7 @@ protected:
void Render(wxDC* dc);
void Repaint(wxDC* dc = NULL);
void ProcessMgrEvent(wxAuiManagerEvent& event);
void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
void UpdateButtonOnScreen(wxAuiDockUIPart* buttonUiPart,
const wxMouseEvent& event);
void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
wxArrayInt& positions,
@ -594,6 +594,8 @@ protected:
/// Ends a resize action, or for live update, resizes the sash
bool DoEndResizeAction(wxMouseEvent& event);
void SetActivePane(wxWindow* active_pane);
public:
// public events (which can be invoked externally)
@ -636,29 +638,29 @@ protected:
wxAuiPaneInfoArray m_panes; // array of panes structures
wxAuiDockInfoArray m_docks; // array of docks structures
wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
wxAuiDockUIPartArray m_uiParts; // array of UI parts (captions, buttons, etc)
int m_action; // current mouse action
wxPoint m_action_start; // position where the action click started
wxPoint m_action_offset; // offset from upper left of the item clicked
wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
wxWindow* m_action_window; // action frame or window (NULL if none)
wxRect m_action_hintrect; // hint rectangle for the action
wxRect m_last_rect;
wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
wxRect m_last_hint; // last hint rectangle
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
wxPoint m_actionStart; // position where the action click started
wxPoint m_actionOffset; // offset from upper left of the item clicked
wxAuiDockUIPart* m_actionPart; // ptr to the part the action happened to
wxWindow* m_actionWindow; // action frame or window (NULL if none)
wxRect m_actionHintRect; // hint rectangle for the action
wxRect m_lastRect;
wxAuiDockUIPart* m_hoverButton;// button uipart being hovered over
wxRect m_lastHint; // last hint rectangle
wxPoint m_lastMouseMove; // last mouse move position (see OnMotion)
int m_currentDragItem;
bool m_skipping;
bool m_has_maximized;
bool m_hasMaximized;
double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume
double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume
double m_dockConstraintX; // 0.0 .. 1.0; max pct of window width a dock can consume
double m_dockConstraintY; // 0.0 .. 1.0; max pct of window height a dock can consume
wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
wxTimer m_hint_fadetimer; // transparent fade timer
wxByte m_hint_fadeamt; // transparent fade amount
wxByte m_hint_fademax; // maximum value of hint fade
wxFrame* m_hintWnd; // transparent hint window, if supported by platform
wxTimer m_hintFadeTimer; // transparent fade timer
wxByte m_hintFadeAmt; // transparent fade amount
wxByte m_hintFadeMax; // maximum value of hint fade
void* m_reserved;
@ -839,6 +841,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, wxAuiManagerEv
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, wxAuiManagerEvent );
@ -855,6 +858,8 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANE_RESTORE(func) \
wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANE_ACTIVATED(func) \
wx__DECLARE_EVT0(wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEventHandler(func))
#define EVT_AUI_RENDER(func) \
wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
#define EVT_AUI_FIND_MANAGER(func) \
@ -866,6 +871,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
%constant wxEventType wxEVT_AUI_PANE_CLOSE;
%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE;
%constant wxEventType wxEVT_AUI_PANE_RESTORE;
%constant wxEventType wxEVT_AUI_PANE_ACTIVATED;
%constant wxEventType wxEVT_AUI_RENDER;
%constant wxEventType wxEVT_AUI_FIND_MANAGER;
@ -874,6 +880,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE )
EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE )
EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE )
EVT_AUI_PANE_ACTIVATED = wx.PyEventBinder( wxEVT_AUI_PANE_ACTIVATED )
EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER )
}

View File

@ -4,7 +4,7 @@
// Author: Hans Van Leemputten
// Modified by: Benjamin I. Williams / Kirix Corporation
// Created: 29/07/2002
// RCS-ID: $Id: tabmdi.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: tabmdi.h 70909 2012-03-15 13:49:54Z VZ $
// Copyright: (c) Hans Van Leemputten
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -101,6 +101,7 @@ protected:
void AddWindowMenu(wxMenuBar *pMenuBar);
void DoHandleMenu(wxCommandEvent &event);
void DoHandleUpdateUI(wxUpdateUIEvent &event);
#endif // wxUSE_MENUS
virtual bool ProcessEvent(wxEvent& event);
@ -138,7 +139,7 @@ public:
const wxString& name = wxFrameNameStr);
#if wxUSE_MENUS
virtual void SetMenuBar(wxMenuBar *menu_bar);
virtual void SetMenuBar(wxMenuBar *menuBar);
virtual wxMenuBar *GetMenuBar() const;
#endif // wxUSE_MENUS
@ -199,7 +200,7 @@ public:
protected:
void Init();
virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int width, int height);
// no size hints
@ -215,12 +216,12 @@ public:
protected:
wxAuiMDIParentFrame* m_pMDIParentFrame;
wxRect m_mdi_newrect;
wxRect m_mdi_currect;
wxRect m_mdiNewRect;
wxRect m_mdiCurRect;
wxString m_title;
wxIcon m_icon;
wxIconBundle m_icon_bundle;
bool m_activate_on_create;
wxIconBundle m_iconBundle;
bool m_activateOnCreate;
#if wxUSE_MENUS
wxMenuBar* m_pMenuBar;
@ -244,7 +245,6 @@ class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
public:
wxAuiMDIClientWindow();
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
~wxAuiMDIClientWindow();
virtual bool CreateClient(wxAuiMDIParentFrame *parent,
long style = wxVSCROLL | wxHSCROLL);
@ -253,7 +253,7 @@ public:
protected:
void PageChanged(int old_selection, int new_selection);
void PageChanged(int oldSelection, int newSelection);
void OnPageClose(wxAuiNotebookEvent& evt);
void OnPageChanged(wxAuiNotebookEvent& evt);
void OnSize(wxSizeEvent& evt);

View File

@ -0,0 +1,145 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/bannerwindow.h
// Purpose: wxBannerWindow class declaration
// Author: Vadim Zeitlin
// Created: 2011-08-16
// RCS-ID: $Id: bannerwindow.h 69859 2011-11-28 18:58:52Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BANNERWINDOW_H_
#define _WX_BANNERWINDOW_H_
#include "wx/defs.h"
#if wxUSE_BANNERWINDOW
#include "wx/bitmap.h"
#include "wx/event.h"
#include "wx/window.h"
class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxColour;
class WXDLLIMPEXP_FWD_CORE wxDC;
extern WXDLLIMPEXP_DATA_ADV(const char) wxBannerWindowNameStr[];
// ----------------------------------------------------------------------------
// A simple banner window showing either a bitmap or text.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxBannerWindow : public wxWindow
{
public:
// Default constructor, use Create() later.
wxBannerWindow() { Init(); }
// Convenient constructor that should be used in the majority of cases.
//
// The banner orientation changes how the text in it is displayed and also
// defines where is the bitmap truncated if it's too big to fit but doesn't
// do anything for the banner position, this is supposed to be taken care
// of in the usual way, e.g. using sizers.
wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT)
{
Init();
Create(parent, wxID_ANY, dir);
}
// Full constructor provided for consistency with the other classes only.
wxBannerWindow(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr)
{
Init();
Create(parent, winid, dir, pos, size, style, name);
}
// Can be only called on objects created with the default constructor.
bool Create(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr);
// Provide an existing bitmap to show. For wxLEFT orientation the bitmap is
// truncated from the top, for wxTOP and wxBOTTOM -- from the right and for
// wxRIGHT -- from the bottom, so put the most important part of the bitmap
// information in the opposite direction.
void SetBitmap(const wxBitmap& bmp);
// Set the text to display. This is mutually exclusive with SetBitmap().
// Title is rendered in bold and should be single line, message can have
// multiple lines but is not wrapped automatically.
void SetText(const wxString& title, const wxString& message);
// Set the colours between which the gradient runs. This can be combined
// with SetText() but not SetBitmap().
void SetGradient(const wxColour& start, const wxColour& end);
protected:
virtual wxSize DoGetBestClientSize() const;
private:
// Common part of all constructors.
void Init();
// Fully invalidates the window.
void OnSize(wxSizeEvent& event);
// Redraws the window using either m_bitmap or m_title/m_message.
void OnPaint(wxPaintEvent& event);
// Helper of OnPaint(): draw the bitmap at the correct position depending
// on our orientation.
void DrawBitmapBackground(wxDC& dc);
// Helper of OnPaint(): draw the text in the appropriate direction.
void DrawBannerTextLine(wxDC& dc, const wxString& str, const wxPoint& pos);
// Return the font to use for the title. Currently this is hardcoded as a
// larger bold version of the standard window font but could be made
// configurable in the future.
wxFont GetTitleFont() const;
// Return the colour to use for extending the bitmap. Non-const as it
// updates m_colBitmapBg if needed.
wxColour GetBitmapBg();
// The window side along which the banner is laid out.
wxDirection m_direction;
// If valid, this bitmap is drawn as is.
wxBitmap m_bitmap;
// If bitmap is valid, this is the colour we use to extend it if the bitmap
// is smaller than this window. It is computed on demand by GetBitmapBg().
wxColour m_colBitmapBg;
// The title and main message to draw, used if m_bitmap is invalid.
wxString m_title,
m_message;
// Start and stop gradient colours, only used when drawing text.
wxColour m_colStart,
m_colEnd;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxBannerWindow);
};
#endif // wxUSE_BANNERWINDOW
#endif // _WX_BANNERWINDOW_H_

View File

@ -4,7 +4,7 @@
// Author: Vaclav Slavik
// Modified by:
// Created: 22.04.01
// RCS-ID: $Id: bitmap.h 66086 2010-11-10 13:51:51Z VZ $
// RCS-ID: $Id: bitmap.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -68,8 +68,7 @@ protected:
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
};
#if defined(__WXMGL__) || \
defined(__WXDFB__) || \
#if defined(__WXDFB__) || \
defined(__WXMAC__) || \
defined(__WXGTK__) || \
defined(__WXCOCOA__) || \
@ -84,9 +83,9 @@ protected:
#define wxBITMAP_SCREEN_DEPTH (-1)
// All ports except wxMSW,wxOS2,wxPalmOS use wxBitmapHandler and wxBitmapBase as base class
// for wxBitmapHandler; wxMSW,wxOS2,wxPalmOS use wxGDIImageHandler as base class
// since it allows some code reuse there.
// All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as
// base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as
// base class since it allows some code reuse there.
#if wxUSE_BITMAP_BASE
// ----------------------------------------------------------------------------
@ -237,10 +236,7 @@ protected:
// the wxBITMAP_DEFAULT_TYPE constant defines the default argument value
// for wxBitmap's ctor and wxBitmap::LoadFile() functions.
#if defined(__WXPALMOS__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/palmos/bitmap.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/msw/bitmap.h"
#elif defined(__WXMOTIF__)
@ -255,11 +251,8 @@ protected:
#elif defined(__WXX11__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/bitmap.h"
#elif defined(__WXMGL__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_RESOURCE
#include "wx/mgl/bitmap.h"
#elif defined(__WXDFB__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_RESOURCE
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/dfb/bitmap.h"
#elif defined(__WXMAC__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_PICT_RESOURCE
@ -287,7 +280,7 @@ ConvertToDisabled(unsigned char brightness) const
#endif // wxUSE_IMAGE
// we must include generic mask.h after wxBitmap definition
#if defined(__WXMGL__) || defined(__WXDFB__)
#if defined(__WXDFB__)
#define wxUSE_GENERIC_MASK 1
#else
#define wxUSE_GENERIC_MASK 0

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 25.08.00
// RCS-ID: $Id: bmpbuttn.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: bmpbuttn.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -130,8 +130,6 @@ protected:
#include "wx/cocoa/bmpbuttn.h"
#elif defined(__WXPM__)
#include "wx/os2/bmpbuttn.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/bmpbuttn.h"
#endif
#endif // wxUSE_BMPBUTTON

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.08.03
// RCS-ID: $Id: bookctrl.h 65967 2010-10-31 13:33:34Z VZ $
// RCS-ID: $Id: bookctrl.h 69082 2011-09-14 08:24:06Z SJL $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -22,6 +22,7 @@
#include "wx/control.h"
#include "wx/dynarray.h"
#include "wx/withimages.h"
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
@ -54,7 +55,8 @@ enum
// wxBookCtrlBase
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl
class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl,
public wxWithImages
{
public:
// construction
@ -85,9 +87,6 @@ public:
long style = 0,
const wxString& name = wxEmptyString);
// dtor
virtual ~wxBookCtrlBase();
// accessors
// ---------
@ -106,7 +105,7 @@ public:
}
// get the currently selected page or wxNOT_FOUND if none
int GetSelection() const { return m_selection; }
virtual int GetSelection() const { return m_selection; }
// set/get the title of a page
virtual bool SetPageText(size_t n, const wxString& strText) = 0;
@ -117,15 +116,6 @@ public:
// images belong to the same image list)
// ---------------------------------------------------------------------
// sets the image list to use, it is *not* deleted by the control
virtual void SetImageList(wxImageList *imageList);
// as SetImageList() but we will delete the image list ourselves
void AssignImageList(wxImageList *imageList);
// get pointer (may be NULL) to the associated image list
wxImageList* GetImageList() const { return m_imageList; }
// sets/returns item's image index in the current image list
virtual int GetPageImage(size_t n) const = 0;
virtual bool SetPageImage(size_t n, int imageId) = 0;
@ -191,7 +181,7 @@ public:
virtual bool AddPage(wxWindow *page,
const wxString& text,
bool bSelect = false,
int imageId = -1)
int imageId = NO_IMAGE)
{
DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
@ -202,7 +192,7 @@ public:
wxWindow *page,
const wxString& text,
bool bSelect = false,
int imageId = -1) = 0;
int imageId = NO_IMAGE) = 0;
// set the currently selected page, return the index of the previously
// selected one (or wxNOT_FOUND on error)
@ -320,12 +310,6 @@ protected:
// the array of all pages of this control
wxArrayPages m_pages;
// the associated image list or NULL
wxImageList *m_imageList;
// true if we must delete m_imageList
bool m_ownsImageList;
// get the page area
virtual wxRect GetPageRect() const;

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created:
// RCS-ID: $Id: brush.h 66054 2010-11-07 13:16:20Z VZ $
// RCS-ID: $Id: brush.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: Julian Smart
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -70,9 +70,7 @@ public:
}
};
#if defined(__WXPALMOS__)
#include "wx/palmos/brush.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/brush.h"
#elif defined(__WXMOTIF__) || defined(__WXX11__)
#include "wx/x11/brush.h"
@ -80,8 +78,6 @@ public:
#include "wx/gtk/brush.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/brush.h"
#elif defined(__WXMGL__)
#include "wx/mgl/brush.h"
#elif defined(__WXDFB__)
#include "wx/dfb/brush.h"
#elif defined(__WXMAC__)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 12.04.99
// RCS-ID: $Id: buffer.h 66780 2011-01-27 11:00:26Z SC $
// RCS-ID: $Id: buffer.h 70417 2012-01-20 22:11:51Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -15,9 +15,7 @@
#include "wx/chartype.h"
#include "wx/wxcrtbase.h"
#ifndef __WXPALMOS5__
#include <stdlib.h> // malloc() and free()
#endif // ! __WXPALMOS5__
class WXDLLIMPEXP_FWD_BASE wxCStrData;
@ -314,6 +312,10 @@ public:
if ( !str )
return false;
// For consistency with the ctor taking just the length, NUL-terminate
// the buffer.
str[len] = (CharType)0;
if ( this->m_data == this->GetNullData() )
{
this->m_data = new Data(str, len);
@ -537,6 +539,8 @@ public:
size_t GetBufSize() const { return m_bufdata->m_size; }
size_t GetDataLen() const { return m_bufdata->m_len; }
bool IsEmpty() const { return GetDataLen() == 0; }
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
void SetDataLen(size_t len)
{
@ -544,6 +548,8 @@ public:
m_bufdata->m_len = len;
}
void Clear() { SetDataLen(0); }
// Ensure the buffer is big enough and return a pointer to it
void *GetWriteBuf(size_t sizeNeeded)
{

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin, Vaclav Slavik
// Modified by:
// Created: 07.05.02
// RCS-ID: $Id: build.h 64531 2010-06-09 13:23:13Z FM $
// RCS-ID: $Id: build.h 67343 2011-03-30 14:16:04Z VZ $
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -85,7 +85,7 @@
#endif
// deriving wxWin containers from STL ones changes them completely:
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
#define __WX_BO_STL ",STL containers"
#else
#define __WX_BO_STL ",wx containers"

View File

@ -4,7 +4,7 @@
// Author: Vadim Zetlin
// Modified by:
// Created: 15.08.00
// RCS-ID: $Id: button.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: button.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zetlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -14,44 +14,9 @@
#include "wx/defs.h"
// ----------------------------------------------------------------------------
// wxButton flags shared with other classes
// ----------------------------------------------------------------------------
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
// These flags affect label alignment
#define wxBU_LEFT 0x0040
#define wxBU_TOP 0x0080
#define wxBU_RIGHT 0x0100
#define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
#endif
#if wxUSE_BUTTON
// ----------------------------------------------------------------------------
// wxButton specific flags
// ----------------------------------------------------------------------------
// These two flags are obsolete
#define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004
// by default, the buttons will be created with some (system dependent)
// minimal size to make them look nicer, giving this style will make them as
// small as possible
#define wxBU_EXACTFIT 0x0001
// this flag can be used to disable using the text label in the button: it is
// mostly useful when creating buttons showing bitmap and having stock id as
// without it both the standard label corresponding to the stock id and the
// bitmap would be shown
#define wxBU_NOTEXT 0x0002
#include "wx/bitmap.h"
#include "wx/control.h"
#include "wx/anybutton.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
@ -59,7 +24,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
// wxButton: a push button
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxButtonBase : public wxControl
class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
{
public:
wxButtonBase() { }
@ -70,132 +35,15 @@ public:
void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
// show the image in the button in addition to the label: this method is
// supported on all (major) platforms
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
{
SetBitmapLabel(bitmap);
SetBitmapPosition(dir);
}
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
// Methods for setting individual images for different states: normal,
// selected (meaning pushed or pressed), focused (meaning normal state for
// a focused button), disabled or hover (a.k.a. hot or current).
//
// Remember that SetBitmap() itself must be called before any other
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
// for it anyhow) and that all bitmaps passed to these functions should be
// of the same size.
void SetBitmapLabel(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Normal); }
void SetBitmapPressed(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Pressed); }
void SetBitmapDisabled(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Disabled); }
void SetBitmapCurrent(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Current); }
void SetBitmapFocus(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Focused); }
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
// set the margins around the image
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
// set the image position relative to the text, i.e. wxLEFT means that the
// image is to the left of the text (this is the default)
void SetBitmapPosition(wxDirection dir);
// make this button the default button in its top level window
//
// returns the old default item (possibly NULL)
virtual wxWindow *SetDefault();
// Buttons on MSW can look bad if they are not native colours, because
// then they become owner-drawn and not theme-drawn. Disable it here
// in wxButtonBase to make it consistent.
virtual bool ShouldInheritColours() const { return false; }
// returns the default button size for this platform
static wxSize GetDefaultSize();
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
#if WXWIN_COMPATIBILITY_2_8
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
#endif // WXWIN_COMPATIBILITY_2_8
// backwards compatible names for pressed/current bitmaps: they're not
// deprecated as there is nothing really wrong with using them and no real
// advantage to using the new names but the new names are still preferred
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
// this enum is not part of wx public API, it is public because it is used
// in non wxButton-derived classes internally
//
// also notice that MSW code relies on the values of the enum elements, do
// not change them without revising src/msw/button.cpp
enum State
{
State_Normal,
State_Current, // a.k.a. hot or "hovering"
State_Pressed, // a.k.a. "selected" in public API for some reason
State_Disabled,
State_Focused,
State_Max
};
// return true if this button shouldn't show the text label, either because
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
bool DontShowLabel() const
{
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
}
// return true if we do show the label
bool ShowsLabel() const
{
return !DontShowLabel();
}
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual bool DoGetAuthNeeded() const { return false; }
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
{ return wxBitmap(); }
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
State WXUNUSED(which))
{ }
virtual wxSize DoGetBitmapMargins() const
{ return wxSize(0, 0); }
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
{ }
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
{ }
wxDECLARE_NO_COPY_CLASS(wxButtonBase);
};
@ -215,11 +63,8 @@ protected:
#include "wx/cocoa/button.h"
#elif defined(__WXPM__)
#include "wx/os2/button.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/button.h"
#endif
#endif // wxUSE_BUTTON
#endif
// _WX_BUTTON_H_BASE_
#endif // _WX_BUTTON_H_BASE_

View File

@ -3,7 +3,7 @@
// Purpose: Cairo library
// Author: Anthony Bretaudeau
// Created: 2007-08-25
// RCS-ID: $Id: cairo.h 67232 2011-03-18 15:10:15Z DS $
// RCS-ID: $Id: cairo.h 68935 2011-08-27 23:26:53Z RD $
// Copyright: (c) Anthony Bretaudeau
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -16,129 +16,13 @@
#include "wx/dynlib.h"
#include <cairo.h>
class wxCairoLibrary
extern "C"
{
public:
// return the pointer to the global instance of this class or NULL if we
// failed to load/initialize it
static wxCairoLibrary *Get();
bool wxCairoInit();
void wxCairoCleanUp();
// for internal use only
static void CleanUp();
private:
// the single wxCairoLibrary instance or NULL
static wxCairoLibrary *ms_lib;
wxCairoLibrary();
~wxCairoLibrary();
bool IsOk();
bool InitializeMethods();
wxDynamicLibrary m_libCairo;
wxDynamicLibrary m_libPangoCairo;
// true if we successfully loaded the libraries and can use them
//
// note that this field must have this name as it's used by wxDL_XXX macros
bool m_ok;
public:
wxDL_VOIDMETHOD_DEFINE( cairo_arc,
(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) )
wxDL_VOIDMETHOD_DEFINE( cairo_arc_negative,
(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) )
wxDL_VOIDMETHOD_DEFINE( cairo_clip,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_close_path,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_t*, cairo_create,
(cairo_surface_t *target), (target), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_curve_to,
(cairo_t *cr, double x1, double y1, double x2, double y2, double x3, double y3), (cr, x1, y1, x2, y2, x3, y3) )
wxDL_VOIDMETHOD_DEFINE( cairo_destroy,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_fill,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_fill_preserve,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_get_target,
(cairo_t *cr), (cr), NULL)
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_image_surface_create_for_data,
(unsigned char *data, cairo_format_t format, int width, int height, int stride), (data, format, width, height, stride), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_line_to,
(cairo_t *cr, double x, double y), (cr, x, y) )
wxDL_VOIDMETHOD_DEFINE( cairo_move_to,
(cairo_t *cr, double x, double y), (cr, x, y) )
wxDL_VOIDMETHOD_DEFINE( cairo_new_path,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_paint,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_add_color_stop_rgba,
(cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha), (pattern, offset, red, green, blue, alpha) )
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_for_surface,
(cairo_surface_t *surface), (surface), NULL)
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_linear,
(double x0, double y0, double x1, double y1), (x0, y0, x1, y1), NULL)
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_radial,
(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1), (cx0, cy0, radius0, cx1, cy1, radius1), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_destroy,
(cairo_pattern_t *pattern), (pattern) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_set_extend,
(cairo_pattern_t *pattern, cairo_extend_t extend), (pattern, extend) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_set_filter,
(cairo_pattern_t *pattern, cairo_filter_t filter), (pattern, filter) )
wxDL_VOIDMETHOD_DEFINE( cairo_rectangle,
(cairo_t *cr, double x, double y, double width, double height), (cr, x, y, width, height) )
wxDL_METHOD_DEFINE( cairo_t*, cairo_reference,
(cairo_t *cr), (cr), NULL )
wxDL_VOIDMETHOD_DEFINE( cairo_reset_clip,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_restore,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_rotate,
(cairo_t *cr, double angle), (cr, angle) )
wxDL_VOIDMETHOD_DEFINE( cairo_save,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_scale,
(cairo_t *cr, double sx, double sy), (cr, sx, sy) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_dash,
(cairo_t *cr, const double *dashes, int num_dashes, double offset), (cr, dashes, num_dashes, offset) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_fill_rule,
(cairo_t *cr, cairo_fill_rule_t fill_rule), (cr, fill_rule) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_cap,
(cairo_t *cr, cairo_line_cap_t line_cap), (cr, line_cap) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_join,
(cairo_t *cr, cairo_line_join_t line_join), (cr, line_join) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_width,
(cairo_t *cr, double width), (cr, width) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_operator,
(cairo_t *cr, cairo_operator_t op), (cr, op) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_source,
(cairo_t *cr, cairo_pattern_t *source), (cr, source) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_source_rgba,
(cairo_t *cr, double red, double green, double blue, double alpha), (cr, red, green, blue, alpha) )
wxDL_VOIDMETHOD_DEFINE( cairo_stroke,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_stroke_preserve,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_surface_create_similar,
(cairo_surface_t *other, cairo_content_t content, int width, int height), (other, content, width, height), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_surface_destroy,
(cairo_surface_t *surface), (surface) )
wxDL_VOIDMETHOD_DEFINE( cairo_translate,
(cairo_t *cr, double tx, double ty), (cr, tx, ty) )
wxDL_VOIDMETHOD_DEFINE( pango_cairo_update_layout,
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
wxDL_VOIDMETHOD_DEFINE( pango_cairo_show_layout,
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
wxDECLARE_NO_COPY_CLASS(wxCairoLibrary);
};
}
#endif // wxUSE_CAIRO

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 29.12.99
// RCS-ID: $Id: calctrl.h 58718 2009-02-07 18:59:25Z VZ $
// RCS-ID: $Id: calctrl.h 67681 2011-05-03 16:29:04Z DS $
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -112,10 +112,10 @@ public:
void SetHoliday(bool holiday) { m_holiday = holiday; }
// accessors
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasBorderColour() const { return m_colBorder.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasBorderColour() const { return m_colBorder.IsOk(); }
bool HasFont() const { return m_font.IsOk(); }
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
bool IsHoliday() const { return m_holiday; }

View File

@ -4,7 +4,7 @@
* Author: Joel Farley, Ove Kåven
* Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
* Created: 1998/06/12
* RCS-ID: $Id: chartype.h 66968 2011-02-19 13:44:19Z VZ $
* RCS-ID: $Id: chartype.h 70345 2012-01-15 01:05:28Z VZ $
* Copyright: (c) 1998-2006 wxWidgets dev team
* Licence: wxWindows licence
*/
@ -105,8 +105,6 @@
#define wxHAVE_TCHAR_SUPPORT
#elif defined(__DMC__)
#define wxHAVE_TCHAR_SUPPORT
#elif defined(__WXPALMOS__)
#include <stddef.h>
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
#define wxHAVE_TCHAR_SUPPORT
#include <stddef.h>

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 07.09.00
// RCS-ID: $Id: checkbox.h 65942 2010-10-28 14:23:09Z VZ $
// RCS-ID: $Id: checkbox.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -41,18 +41,6 @@
*/
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
/*
* The possible states of a 3-state checkbox (Compatible
* with the 2-state checkbox).
*/
enum wxCheckBoxState
{
wxCHK_UNCHECKED,
wxCHK_CHECKED,
wxCHK_UNDETERMINED /* 3-state checkbox only */
};
extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
// ----------------------------------------------------------------------------
@ -196,8 +184,6 @@ private:
#elif defined(__WXPM__)
#undef wxHAS_3STATE_CHECKBOX
#include "wx/os2/checkbox.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/checkbox.h"
#endif
#endif // wxUSE_CHECKBOX

View File

@ -4,7 +4,7 @@
* Author: Vadim Zeitlin
* Modified by:
* Created: 09.08.00
* RCS-ID: $Id: chkconf.h 67280 2011-03-22 14:17:38Z DS $
* RCS-ID: $Id: chkconf.h 70703 2012-02-26 20:24:25Z VZ $
* Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
@ -57,11 +57,6 @@
global features
*/
/* GUI build by default */
#if !defined(wxUSE_GUI)
# define wxUSE_GUI 1
#endif /* !defined(wxUSE_GUI) */
/*
If we're compiling without support for threads/exceptions we have to
disable the corresponding features.
@ -299,6 +294,22 @@
# endif
#endif /* !defined(wxUSE_SOCKETS) */
#ifndef wxUSE_STD_CONTAINERS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_CONTAINERS 0
# endif
#endif /* !defined(wxUSE_STD_CONTAINERS) */
#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_STRING_CONV_IN_WXSTRING 0
# endif
#endif /* !defined(wxUSE_STD_STRING_CONV_IN_WXSTRING) */
#ifndef wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
@ -599,6 +610,14 @@
# endif
#endif /* !defined(wxUSE_DATEPICKCTRL) */
#ifndef wxUSE_DC_TRANSFORM_MATRIX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX must be defined, please read comment near the top of this file."
# else
# define wxUSE_DC_TRANSFORM_MATRIX 1
# endif
#endif /* wxUSE_DC_TRANSFORM_MATRIX */
#ifndef wxUSE_DIRPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file."
@ -729,7 +748,7 @@
#endif /* !defined(wxUSE_HTML) */
#ifndef wxUSE_LIBMSPACK
# if !defined(__UNIX__) || defined(__WXPALMOS__)
# if !defined(__UNIX__)
/* set to 0 on platforms that don't have libmspack */
# define wxUSE_LIBMSPACK 0
# else
@ -955,7 +974,15 @@
# else
# define wxUSE_RICHMSGDLG 0
# endif
#endif /* !defined(wxUSE_RIBBON) */
#endif /* !defined(wxUSE_RICHMSGDLG) */
#ifndef wxUSE_RICHTOOLTIP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RICHTOOLTIP must be defined, please read comment near the top of this file."
# else
# define wxUSE_RICHTOOLTIP 0
# endif
#endif /* !defined(wxUSE_RICHTOOLTIP) */
#ifndef wxUSE_SASH
# ifdef wxABORT_ON_CONFIG_ERROR
@ -1077,6 +1104,14 @@
# endif
#endif /* !defined(wxUSE_TEXTCTRL) */
#ifndef wxUSE_TIMEPICKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TIMEPICKCTRL 0
# endif
#endif /* !defined(wxUSE_TIMEPICKCTRL) */
#ifndef wxUSE_TIPWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file."
@ -1109,6 +1144,14 @@
# endif
#endif /* !defined(wxUSE_TREECTRL) */
#ifndef wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* !defined(wxUSE_TREELISTCTRL) */
#ifndef wxUSE_UIACTIONSIMULATOR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file."
@ -1125,6 +1168,14 @@
# endif
#endif /* !defined(wxUSE_VALIDATORS) */
#ifndef wxUSE_WEBVIEW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW must be defined, please read comment near the top of this file."
# else
# define wxUSE_WEBVIEW 0
# endif
#endif /* !defined(wxUSE_WEBVIEW) */
#ifndef wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file."
@ -1150,9 +1201,7 @@
checks use wxUSE_XXX symbols in #if tests.
*/
#if defined(__WXPALMOS__)
# include "wx/palmos/chkconf.h"
#elif defined(__WXWINCE__)
#if defined(__WXWINCE__)
# include "wx/msw/wince/chkconf.h"
#elif defined(__WXMSW__)
# include "wx/msw/chkconf.h"
@ -1164,14 +1213,14 @@
# include "wx/osx/chkconf.h"
#elif defined(__OS2__)
# include "wx/os2/chkconf.h"
#elif defined(__WXMGL__)
# include "wx/mgl/chkconf.h"
#elif defined(__WXDFB__)
# include "wx/dfb/chkconf.h"
#elif defined(__WXMOTIF__)
# include "wx/motif/chkconf.h"
#elif defined(__WXX11__)
# include "wx/x11/chkconf.h"
#elif defined(__WXANDROID__)
# include "wx/android/chkconf.h"
#endif
/*
@ -1439,7 +1488,8 @@
wxUSE_STATUSBAR || \
wxUSE_TEXTCTRL || \
wxUSE_TOOLBAR || \
wxUSE_TREECTRL
wxUSE_TREECTRL || \
wxUSE_TREELISTCTRL
# if !wxUSE_CONTROLS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CONTROLS unset but some controls used"
@ -1582,9 +1632,7 @@
#ifndef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0
#elif wxUSE_NATIVE_STATUSBAR
# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
defined(__WXMAC__) || \
defined(__WXPALMOS__) )
# if defined(__WXUNIVERSAL__) || !(defined(__WXMSW__) || defined(__WXMAC__))
# undef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0
# endif
@ -1672,16 +1720,16 @@
# endif
#endif /* wxUSE_CALENDARCTRL */
#if wxUSE_DATEPICKCTRL
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDatePickerCtrl requires wxUSE_DATETIME"
# error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_DATEPICKCTRL */
#endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */
#if wxUSE_CHECKLISTBOX
# if !wxUSE_LISTBOX
@ -1705,6 +1753,17 @@
# endif
#endif /* wxUSE_CHOICEDLG */
#if wxUSE_FILECTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxFileCtrl requires wxDateTime"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_FILECTRL */
#if wxUSE_HELP
# if !wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
@ -1935,7 +1994,7 @@
#endif /* wxUSE_FILEDLG */
#if !wxUSE_GAUGE || !wxUSE_BUTTON
# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
# if wxUSE_PROGRESSDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
# else
@ -1977,7 +2036,7 @@
#endif
#if !wxUSE_IMAGLIST
# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL || wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxImageList must be compiled as well"
# else
@ -1996,7 +2055,7 @@
# define wxUSE_RADIOBTN 1
# endif
# endif
# if !wxUSE_STATBOX && !defined(__WXPALMOS__)
# if !wxUSE_STATBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
# else
@ -2104,6 +2163,24 @@
# endif
#endif /* wxUSE_VARIANT */
#if wxUSE_TREELISTCTRL && !wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL requires wxDataViewCtrl"
# else
# undef wxUSE_TREELISTCTRL
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* wxUSE_TREELISTCTRL */
#if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW requires at least one backend"
# else
# undef wxUSE_WEBVIEW
# define wxUSE_WEBVIEW 0
# endif
#endif /* wxUSE_WEBVIEW && !any web view backend */
#endif /* wxUSE_GUI */
#endif /* _WX_CHKCONF_H_ */

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 26.07.99
// RCS-ID: $Id: choice.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: choice.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -84,8 +84,6 @@ private:
#include "wx/cocoa/choice.h"
#elif defined(__WXPM__)
#include "wx/os2/choice.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/choice.h"
#endif
#endif // wxUSE_CHOICE

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
// Created: 15.09.04
// RCS-ID: $Id: choicebk.h 66233 2010-11-22 01:23:21Z VZ $
// RCS-ID: $Id: choicebk.h 68810 2011-08-21 14:08:49Z VZ $
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -68,7 +68,7 @@ public:
wxWindow *page,
const wxString& text,
bool bSelect = false,
int imageId = -1);
int imageId = NO_IMAGE);
virtual int SetSelection(size_t n)
{ return DoSetSelection(n, SetSelection_SendEvent); }
virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.10.99
// RCS-ID: $Id: clipbrd.h 61485 2009-07-20 23:54:08Z VZ $
// RCS-ID: $Id: clipbrd.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) wxWidgets Team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -160,8 +160,6 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
#include "wx/gtk1/clipbrd.h"
#elif defined(__WXX11__)
#include "wx/x11/clipbrd.h"
#elif defined(__WXMGL__)
#include "wx/mgl/clipbrd.h"
#elif defined(__WXMAC__)
#include "wx/osx/clipbrd.h"
#elif defined(__WXCOCOA__)

View File

@ -5,7 +5,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 04.01.00
// RCS-ID: $Id: cmdline.h 66253 2010-11-24 00:42:53Z VZ $
// RCS-ID: $Id: cmdline.h 69797 2011-11-22 13:18:58Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -183,12 +183,25 @@ public:
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString,
int flags = 0);
void AddLongSwitch(const wxString& lng,
const wxString& desc = wxEmptyString,
int flags = 0)
{
AddSwitch(wxString(), lng, desc, flags);
}
// an option taking a value of the given type
void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0);
void AddLongOption(const wxString& lng,
const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0)
{
AddOption(wxString(), lng, desc, type, flags);
}
// a parameter
void AddParam(const wxString& desc = wxEmptyString,

View File

@ -4,7 +4,7 @@
// Author: Julian Smart (extracted from docview.h by VZ)
// Modified by:
// Created: 05.11.00
// RCS-ID: $Id: cmdproc.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: cmdproc.h 70459 2012-01-25 00:05:09Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -97,10 +97,7 @@ public:
virtual void ClearCommands();
// Has the current project been changed?
virtual bool IsDirty() const
{
return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
}
virtual bool IsDirty() const;
// Mark the current command as the one where the last save took place
void MarkAsSaved()

View File

@ -4,7 +4,7 @@
// Author: Julian Smart and others
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: cmndata.h 66615 2011-01-07 05:26:57Z PC $
// RCS-ID: $Id: cmndata.h 70636 2012-02-20 21:55:55Z VZ $
// Copyright: (c)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -189,7 +189,7 @@ public:
// Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
bool IsOk() const { return m_printData.IsOk() ; }
wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@ -249,7 +249,7 @@ public:
// Is this data OK for showing the page setup dialog?
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
bool IsOk() const { return m_printData.IsOk() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well.
@ -280,7 +280,7 @@ public:
// Use paper id in wxPrintData to set this object's paper size
void CalculatePaperSizeFromId();
wxPageSetupDialogData& operator=(const wxPageSetupData& data);
wxPageSetupDialogData& operator=(const wxPageSetupDialogData& data);
wxPageSetupDialogData& operator=(const wxPrintData& data);
wxPrintData& GetPrintData() { return m_printData; }

View File

@ -3,7 +3,7 @@
* Purpose: wxCocoa-specific config settings checks
* Author: Vadim Zeitlin
* Created: 2008-09-11
* RCS-ID: $Id: chkconf.h 55546 2008-09-11 11:20:33Z VZ $
* RCS-ID: $Id: chkconf.h 67497 2011-04-15 19:18:34Z DS $
* Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
@ -19,4 +19,4 @@
#undef wxUSE_LOG_DIALOG
#define wxUSE_LOG_DIALOG 0
#endif // _WX_COCOA_CHKCONF_H_
#endif /* _WX_COCOA_CHKCONF_H_ */

View File

@ -4,7 +4,7 @@
// Author: David Elliott
// Modified by:
// Created: 2003/04/01
// RCS-ID: $Id: dc.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: dc.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) 2003 David Elliott
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -80,10 +80,10 @@ public:
virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc(void) {};
virtual void EndDoc(void) {}
virtual void StartPage(void) {};
virtual void EndPage(void) {};
virtual void StartPage(void) {}
virtual void EndPage(void) {}
virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen);

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: font.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: font.h 70445 2012-01-23 11:28:21Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -75,6 +75,19 @@ public:
SetPixelSize(pixelSize);
}
wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Create(pointSize, family,
GetStyleFromFlags(flags),
GetWeightFromFlags(flags),
GetUnderlinedFromFlags(flags),
face, encoding);
}
/*! @abstract Construction with opaque wxNativeFontInfo
*/
wxFont(const wxNativeFontInfo& info)

View File

@ -4,7 +4,7 @@
// Author: David Elliott
// Modified by:
// Created: 2004/04/08
// RCS-ID: $Id: notebook.h 65930 2010-10-27 16:54:24Z VZ $
// RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $
// Copyright: (c) 2004 David Elliott
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -97,7 +97,7 @@ public:
wxNotebookPage *win,
const wxString& strText,
bool bSelect = false,
int imageId = -1 );
int imageId = NO_IMAGE );
protected:
};

View File

@ -5,7 +5,7 @@
// Authors: David Elliott, Ryan Norton
// Modified by:
// Created: 2004-10-02
// RCS-ID: $Id: sound.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $
// Copyright: (c) 2004 David Elliott, Ryan Norton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -25,7 +25,7 @@ public:
wxSound(const wxString& fileName, bool isResource = false)
: m_cocoaNSSound(NULL)
{ Create(fileName, isResource); }
wxSound(int size, const wxByte* data)
wxSound(size_t size, const void* data)
: m_cocoaNSSound(NULL)
{ LoadWAV(data,size,true); }
wxSound(const wxSound& sound); // why not?
@ -43,7 +43,7 @@ public:
{ return m_cocoaNSSound; }
protected:
bool DoPlay(unsigned flags) const;
bool LoadWAV(const wxUint8 *data, size_t length, bool copyData);
bool LoadWAV(const void* data, size_t length, bool copyData);
private:
WX_NSSound m_cocoaNSSound;
static const wxObjcAutoRefFromAlloc<struct objc_object *> sm_cocoaDelegate;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitiln
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $
// RCS-ID: $Id: colordlg.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -24,8 +24,6 @@
#include "wx/osx/colordlg.h"
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/colordlg.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/colordlg.h"
#else
#include "wx/generic/colrdlgg.h"

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by: Francesco Montorsi
// Created:
// RCS-ID: $Id: colour.h 66966 2011-02-19 12:32:59Z VZ $
// RCS-ID: $Id: colour.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -213,9 +213,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#if defined(__WXPALMOS__)
#include "wx/generic/colour.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/colour.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/colour.h"
@ -223,8 +221,6 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#include "wx/gtk/colour.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/colour.h"
#elif defined(__WXMGL__)
#include "wx/generic/colour.h"
#elif defined(__WXDFB__)
#include "wx/generic/colour.h"
#elif defined(__WXX11__)

View File

@ -4,7 +4,7 @@
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// RCS-ID: $Id: combo.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: combo.h 69942 2011-12-07 14:05:11Z VZ $
// Copyright: (c) Jaakko Salli
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -560,7 +560,8 @@ protected:
// Standard textctrl positioning routine. Just give it platform-dependant
// textctrl coordinate adjustment.
virtual void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust );
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
int textCtrlYAdjust = 0);
// event handlers
void OnSizeEvent( wxSizeEvent& event );
@ -641,7 +642,7 @@ protected:
// main (ie. topmost) window of a composite control (default = this)
wxWindow* m_mainCtrlWnd;
// used to prevent immediate re-popupping incase closed popup
// used to prevent immediate re-popupping in case closed popup
// by clicking on the combo control (needed because of inconsistent
// transient implementation across platforms).
wxLongLong m_timeCanAcceptClick;
@ -767,6 +768,13 @@ public:
// Return true for success.
virtual bool Create(wxWindow* parent) = 0;
// Calls Destroy() for the popup control (i.e. one returned by
// GetControl()) and makes sure that 'this' is deleted at the end.
// Default implementation works for both cases where popup control
// class is multiple inherited or created on heap as a separate
// object.
virtual void DestroyPopup();
// We must have an associated control which is subclassed by the combobox.
virtual wxWindow *GetControl() = 0;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 24.12.00
// RCS-ID: $Id: combobox.h 63242 2010-01-24 01:00:45Z VZ $
// RCS-ID: $Id: combobox.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) 1996-2000 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -36,7 +36,13 @@ public:
wxItemContainer::Clear();
}
bool IsEmpty() const { return wxItemContainer::IsEmpty(); }
// IsEmpty() is ambiguous because we inherit it from both wxItemContainer
// and wxTextEntry, and even if defined it here to help the compiler with
// choosing one of them, it would still be confusing for the human users of
// this class. So instead define the clearly named methods below and leave
// IsEmpty() ambiguous to trigger a compilation error if it's used.
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
// also bring in GetSelection() versions of both base classes in scope
//
@ -47,8 +53,8 @@ public:
virtual int GetSelection() const = 0;
virtual void GetSelection(long *from, long *to) const = 0;
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); };
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); };
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }
// may return value different from GetSelection() when the combobox
// dropdown is shown and the user selected, but not yet accepted, a value

View File

@ -3,7 +3,7 @@
// Purpose: wxCompositeWindow<> declaration
// Author: Vadim Zeitlin
// Created: 2011-01-02
// RCS-ID: $Id: compositewin.h 66931 2011-02-16 23:45:04Z VZ $
// RCS-ID: $Id: compositewin.h 69470 2011-10-19 16:20:01Z VS $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -12,22 +12,15 @@
#define _WX_COMPOSITEWIN_H_
#include "wx/window.h"
#include "wx/containr.h"
class WXDLLIMPEXP_FWD_CORE wxToolTip;
// NB: This is an experimental and, as for now, undocumented class used only by
// wxWidgets itself internally. Don't use it in your code until its API is
// officially stabilized unless you are ready to change it with the next
// wxWidgets release.
// FIXME-VC6: This compiler can't compile DoSetForAllParts() template function,
// it can't determine whether the deduced type should be "T" or "const T&". And
// without this function wxCompositeWindow is pretty useless so simply disable
// this code for it, this does mean that setting colours/fonts/... for
// composite controls won't work in the library compiled with it but so far
// this only affects the generic wxDatePickerCtrl which is not used by default
// under MSW anyhow so it doesn't seem to be worth it to spend time and uglify
// the code to fix it.
#ifndef __VISUALC6__
// ----------------------------------------------------------------------------
// wxCompositeWindow is a helper for implementing composite windows: to define
// a class using subwindows, simply inherit from it specialized with the real
@ -42,7 +35,25 @@ public:
typedef W BaseWindowClass;
// Default ctor doesn't do anything.
wxCompositeWindow() { }
wxCompositeWindow()
{
this->Connect
(
wxEVT_CREATE,
wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate)
);
}
#ifndef __VISUALC6__
// FIXME-VC6: This compiler can't compile DoSetForAllParts() template function,
// it can't determine whether the deduced type should be "T" or "const T&". And
// without this function wxCompositeWindow is pretty useless so simply disable
// this code for it, this does mean that setting colours/fonts/... for
// composite controls won't work in the library compiled with it but so far
// this only affects the generic wxDatePickerCtrl which is not used by default
// under MSW anyhow so it doesn't seem to be worth it to spend time and uglify
// the code to fix it.
// Override all wxWindow methods which must be forwarded to the composite
// window parts.
@ -59,7 +70,7 @@ public:
if ( !BaseWindowClass::SetForegroundColour(colour) )
return false;
DoSetForAllParts(&wxWindowBase::SetForegroundColour, colour);
SetForAllParts(&wxWindowBase::SetForegroundColour, colour);
return true;
}
@ -69,7 +80,7 @@ public:
if ( !BaseWindowClass::SetBackgroundColour(colour) )
return false;
DoSetForAllParts(&wxWindowBase::SetBackgroundColour, colour);
SetForAllParts(&wxWindowBase::SetBackgroundColour, colour);
return true;
}
@ -79,7 +90,7 @@ public:
if ( !BaseWindowClass::SetFont(font) )
return false;
DoSetForAllParts(&wxWindowBase::SetFont, font);
SetForAllParts(&wxWindowBase::SetFont, font);
return true;
}
@ -89,18 +100,112 @@ public:
if ( !BaseWindowClass::SetCursor(cursor) )
return false;
DoSetForAllParts(&wxWindowBase::SetCursor, cursor);
SetForAllParts(&wxWindowBase::SetCursor, cursor);
return true;
}
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip(wxToolTip *tip)
{
BaseWindowClass::DoSetToolTip(tip);
SetForAllParts(&wxWindowBase::CopyToolTip, tip);
}
#endif // wxUSE_TOOLTIPS
#endif // !__VISUALC6__
virtual void SetFocus()
{
wxSetFocusToChild(this, NULL);
}
private:
// Must be implemented by the derived class to return all children to which
// the public methods we override should forward to.
virtual wxWindowList GetCompositeWindowParts() const = 0;
void OnWindowCreate(wxWindowCreateEvent& event)
{
event.Skip();
// Attach a few event handlers to all parts of the composite window.
// This makes the composite window behave more like a simple control
// and allows other code (such as wxDataViewCtrl's inline editing
// support) to hook into its event processing.
wxWindow *child = event.GetWindow();
if ( child == this )
return; // not a child, we don't want to Connect() to ourselves
// Always capture wxEVT_KILL_FOCUS:
child->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(wxCompositeWindow::OnKillFocus),
NULL, this);
// Some events should be only handled for non-toplevel children. For
// example, we want to close the control in wxDataViewCtrl when Enter
// is pressed in the inline editor, but not when it's pressed in a
// popup dialog it opens.
wxWindow *win = child;
while ( win && win != this )
{
if ( win->IsTopLevel() )
return;
win = win->GetParent();
}
child->Connect(wxEVT_CHAR,
wxKeyEventHandler(wxCompositeWindow::OnChar),
NULL, this);
}
void OnChar(wxKeyEvent& event)
{
if ( !this->ProcessWindowEvent(event) )
event.Skip();
}
void OnKillFocus(wxFocusEvent& event)
{
// Ignore focus changes within the composite control:
wxWindow *win = event.GetWindow();
while ( win )
{
if ( win == this )
{
event.Skip();
return;
}
// Note that we don't use IsTopLevel() check here, because we do
// want to ignore focus changes going to toplevel window that have
// the composite control as its parent; these would typically be
// some kind of control's popup window.
win = win->GetParent();
}
// The event shouldn't be ignored, forward it to the main control:
if ( !this->ProcessWindowEvent(event) )
event.Skip();
}
#ifndef __VISUALC6__
template <class T>
void DoSetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg)
void SetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg)
{
DoSetForAllParts<const T&>(func, arg);
}
template <class T>
void SetForAllParts(bool (wxWindowBase::*func)(T*), T* arg)
{
DoSetForAllParts<T*>(func, arg);
}
template <class T>
void DoSetForAllParts(bool (wxWindowBase::*func)(T), T arg)
{
// Simply call the setters for all parts of this composite window.
const wxWindowList parts = GetCompositeWindowParts();
@ -110,20 +215,16 @@ private:
{
wxWindow * const child = *i;
(child->*func)(arg);
// Allow NULL elements in the list, this makes the code of derived
// composite controls which may have optionally shown children
// simpler and it doesn't cost us much here.
if ( child )
(child->*func)(arg);
}
}
#endif // !__VISUALC6__
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W);
};
#else // __VISUALC6__
template <class W>
class wxCompositeWindow : public W
{
};
#endif // !__VISUALC6__/__VISUALC6__
#endif // _WX_COMPOSITEWIN_H_

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// RCS-ID: $Id: config.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: config.h 70808 2012-03-04 20:31:42Z VZ $
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -22,15 +22,12 @@
// under Windows we prefer to use the native implementation but can be forced
// to use the file-based one
#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
#include "wx/msw/regconf.h"
#define wxConfig wxRegConfig
#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE
#include "wx/os2/iniconf.h"
#define wxConfig wxIniConfig
#elif defined(__WXPALMOS__) && wxUSE_CONFIG_NATIVE
#include "wx/palmos/prefconf.h"
#define wxConfig wxPrefConfig
#else // either we're under Unix or wish to always use config files
#include "wx/fileconf.h"
#define wxConfig wxFileConfig

View File

@ -1,12 +1,11 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/containr.h
// Purpose: wxControlContainer class declration: a "mix-in" class which
// implements the TAB navigation between the controls
// Purpose: wxControlContainer and wxNavigationEnabled declarations
// Author: Vadim Zeitlin
// Modified by:
// Created: 06.08.01
// RCS-ID: $Id: containr.h 61508 2009-07-23 20:30:22Z VZ $
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// RCS-ID: $Id: containr.h 70805 2012-03-04 09:42:51Z SC $
// Copyright: (c) 2001, 2011 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -15,16 +14,20 @@
#include "wx/defs.h"
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
// We need wxEVT_XXX declarations in this case.
#include "wx/event.h"
#endif
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
/*
Implementation note: wxControlContainer is not a real mix-in but rather
a class meant to be aggregated with (and not inherited from). Although
logically it should be a mix-in, doing it like this has no advantage from
the point of view of the existing code but does have some problems (we'd
need to play tricks with event handlers which may be difficult to do
safely). The price we pay for this simplicity is the ugly macros below.
This header declares wxControlContainer class however it's not a real
container of controls but rather just a helper used to implement TAB
navigation among the window children. You should rarely need to use it
directly, derive from the documented public wxNavigationEnabled<> class to
implement TAB navigation in a custom composite window.
*/
// ----------------------------------------------------------------------------
@ -102,6 +105,161 @@ private:
bool m_inSetFocus;
};
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for native TAB navigation
// ----------------------------------------------------------------------------
// this must be a real class as we forward-declare it elsewhere
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
protected:
// set the focus to the child which had it the last time
virtual bool SetFocusToChild();
};
#else // !wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for TAB navigation implemented in wx itself
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
public:
// default ctor, SetContainerWindow() must be called later
wxControlContainer();
// the methods to be called from the window event handlers
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
// called from OnChildFocus() handler, i.e. when one of our (grand)
// children gets the focus
void SetLastFocus(wxWindow *win);
protected:
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
};
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
// this function is for wxWidgets internal use only
extern WXDLLIMPEXP_CORE bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
// ----------------------------------------------------------------------------
// wxNavigationEnabled: Derive from this class to support keyboard navigation
// among window children in a wxWindow-derived class. The details of this class
// don't matter, you just need to derive from it to make navigation work.
// ----------------------------------------------------------------------------
// The template parameter W must be a wxWindow-derived class.
template <class W>
class wxNavigationEnabled : public W
{
public:
typedef W BaseWindowClass;
wxNavigationEnabled()
{
m_container.SetContainerWindow(this);
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY,
wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
BaseWindowClass::Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(wxNavigationEnabled::OnFocus));
BaseWindowClass::Connect(wxEVT_CHILD_FOCUS,
wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocus() const
{
return m_container.AcceptsFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusRecursively() const
{
return m_container.AcceptsFocusRecursively();
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusFromKeyboard() const
{
return m_container.AcceptsFocusFromKeyboard();
}
WXDLLIMPEXP_INLINE_CORE virtual void AddChild(wxWindowBase *child)
{
BaseWindowClass::AddChild(child);
m_container.UpdateCanFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child)
{
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
m_container.HandleOnWindowDestroy(child);
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
BaseWindowClass::RemoveChild(child);
m_container.UpdateCanFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual void SetFocus()
{
if ( !m_container.DoSetFocus() )
BaseWindowClass::SetFocus();
}
void SetFocusIgnoringChildren()
{
BaseWindowClass::SetFocus();
}
void AcceptFocus(bool acceptFocus)
{
m_container.SetCanFocus(acceptFocus);
}
protected:
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
void OnNavigationKey(wxNavigationKeyEvent& event)
{
m_container.HandleOnNavigationKey(event);
}
void OnFocus(wxFocusEvent& event)
{
m_container.HandleOnFocus(event);
}
void OnChildFocus(wxChildFocusEvent& event)
{
m_container.SetLastFocus(event.GetWindow());
event.Skip();
}
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
wxControlContainer m_container;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxNavigationEnabled, W);
};
// ----------------------------------------------------------------------------
// Compatibility macros from now on, do NOT use them and preferably do not even
// look at them.
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_8
// common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases,
// it should be used in the wxWindow-derived class declaration
#define WX_DECLARE_CONTROL_CONTAINER_BASE() \
@ -156,20 +314,9 @@ protected: \
return m_container.AcceptsFocusFromKeyboard(); \
}
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for native TAB navigation
// ----------------------------------------------------------------------------
// this must be a real class as we forward-declare it elsewhere
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
protected:
// set the focus to the child which had it the last time
virtual bool SetFocusToChild();
};
#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname)
#define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE
@ -191,38 +338,6 @@ protected:
#else // !wxHAS_NATIVE_TAB_TRAVERSAL
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
// ----------------------------------------------------------------------------
// wxControlContainer for TAB navigation implemented in wx itself
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
public:
// default ctor, SetContainerWindow() must be called later
wxControlContainer();
// the methods to be called from the window event handlers
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
// called from OnChildFocus() handler, i.e. when one of our (grand)
// children gets the focus
void SetLastFocus(wxWindow *win);
protected:
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
};
// ----------------------------------------------------------------------------
// macros which may be used by the classes wishing to implement TAB navigation
// among their children
// ----------------------------------------------------------------------------
// declare the methods to be forwarded
#define WX_DECLARE_CONTROL_CONTAINER() \
WX_DECLARE_CONTROL_CONTAINER_BASE(); \
@ -274,7 +389,6 @@ public: \
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
// this function is for wxWidgets internal use only
extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
#endif // WXWIN_COMPATIBILITY_2_8
#endif // _WX_CONTAINR_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 26.07.99
// RCS-ID: $Id: control.h 67062 2011-02-27 12:48:07Z VZ $
// RCS-ID: $Id: control.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -221,8 +221,6 @@ protected:
#if defined(__WXUNIVERSAL__)
#include "wx/univ/control.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/control.h"
#elif defined(__WXMSW__)
#include "wx/msw/control.h"
#elif defined(__WXMOTIF__)

View File

@ -3,7 +3,7 @@
// Purpose: wxConvAuto class declaration
// Author: Vadim Zeitlin
// Created: 2006-04-03
// RCS-ID: $Id: convauto.h 63991 2010-04-16 10:43:18Z VS $
// RCS-ID: $Id: convauto.h 69675 2011-11-05 11:23:41Z VZ $
// Copyright: (c) 2006 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -18,6 +18,18 @@
// wxConvAuto: uses BOM to automatically detect input encoding
// ----------------------------------------------------------------------------
// All currently recognized BOM values.
enum wxBOM
{
wxBOM_Unknown = -1,
wxBOM_None,
wxBOM_UTF32BE,
wxBOM_UTF32LE,
wxBOM_UTF16BE,
wxBOM_UTF16LE,
wxBOM_UTF8
};
class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv
{
public:
@ -69,29 +81,27 @@ public:
virtual wxMBConv *Clone() const { return new wxConvAuto(*this); }
private:
// all currently recognized BOM values
enum BOMType
{
BOM_Unknown = -1,
BOM_None,
BOM_UTF32BE,
BOM_UTF32LE,
BOM_UTF16BE,
BOM_UTF16LE,
BOM_UTF8
};
// return the BOM type of this buffer
static BOMType DetectBOM(const char *src, size_t srcLen);
static wxBOM DetectBOM(const char *src, size_t srcLen);
// return the characters composing the given BOM.
static const char* GetBOMChars(wxBOM bomType, size_t* count);
wxBOM GetBOM() const
{
return m_bomType;
}
private:
// common part of all ctors
void Init()
{
// no need to initialize m_bomType and m_consumedBOM here, this will be
// done when m_conv is created
// We don't initialize m_encDefault here as different ctors do it
// differently.
m_conv = NULL;
m_bomType = wxBOM_Unknown;
m_ownsConv = false;
m_consumedBOM = false;
}
// initialize m_conv with the UTF-8 conversion
@ -102,7 +112,7 @@ private:
}
// create the correct conversion object for the given BOM type
void InitFromBOM(BOMType bomType);
void InitFromBOM(wxBOM bomType);
// create the correct conversion object for the BOM present in the
// beginning of the buffer
@ -128,7 +138,7 @@ private:
wxFontEncoding m_encDefault;
// our BOM type
BOMType m_bomType;
wxBOM m_bomType;
// true if we allocated m_conv ourselves, false if we just use an existing
// global conversion

View File

@ -3,7 +3,7 @@
// Purpose: wrapper header for CppUnit headers
// Author: Vadim Zeitlin
// Created: 15.02.04
// RCS-ID: $Id: cppunit.h 66711 2011-01-19 10:47:49Z VZ $
// RCS-ID: $Id: cppunit.h 69241 2011-09-30 14:00:52Z JJ $
// Copyright: (c) 2004 Vadim Zeitlin
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -200,6 +200,10 @@ WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long)
#if defined( __VMS ) && defined( __ia64 )
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::basic_streambuf<char>::pos_type);
#endif
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 22.10.99
// RCS-ID: $Id: ctrlsub.h 65040 2010-07-22 12:09:15Z VZ $
// RCS-ID: $Id: ctrlsub.h 68460 2011-07-30 11:30:08Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -395,41 +395,48 @@ private:
wxClientDataType m_clientDataItemsType;
};
// this macro must (unfortunately) be used in any class deriving from both
// wxItemContainer and wxControl because otherwise there is ambiguity when
// calling GetClientXXX() functions -- the compiler can't choose between the
// two versions
#define wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST \
void SetClientData(void *data) \
{ wxEvtHandler::SetClientData(data); } \
void *GetClientData() const \
{ return wxEvtHandler::GetClientData(); } \
void SetClientObject(wxClientData *data) \
{ wxEvtHandler::SetClientObject(data); } \
wxClientData *GetClientObject() const \
{ return wxEvtHandler::GetClientObject(); } \
void SetClientData(unsigned int n, void* clientData) \
{ wxItemContainer::SetClientData(n, clientData); } \
void* GetClientData(unsigned int n) const \
{ return wxItemContainer::GetClientData(n); } \
void SetClientObject(unsigned int n, wxClientData* clientData) \
{ wxItemContainer::SetClientObject(n, clientData); } \
wxClientData* GetClientObject(unsigned int n) const \
{ return wxItemContainer::GetClientObject(n); }
// Inheriting directly from a wxWindow-derived class and wxItemContainer
// unfortunately introduces an ambiguity for all GetClientXXX() methods as they
// are inherited twice: the "global" versions from wxWindow and the per-item
// versions taking the index from wxItemContainer.
//
// So we need to explicitly resolve them and this helper template class is
// provided to do it. To use it, simply inherit from wxWindowWithItems<Window,
// Container> instead of Window and Container interface directly.
template <class W, class C>
class wxWindowWithItems : public W, public C
{
public:
typedef W BaseWindowClass;
typedef C BaseContainerInterface;
class WXDLLIMPEXP_CORE wxControlWithItemsBase : public wxControl,
public wxItemContainer
wxWindowWithItems() { }
void SetClientData(void *data)
{ BaseWindowClass::SetClientData(data); }
void *GetClientData() const
{ return BaseWindowClass::GetClientData(); }
void SetClientObject(wxClientData *data)
{ BaseWindowClass::SetClientObject(data); }
wxClientData *GetClientObject() const
{ return BaseWindowClass::GetClientObject(); }
void SetClientData(unsigned int n, void* clientData)
{ wxItemContainer::SetClientData(n, clientData); }
void* GetClientData(unsigned int n) const
{ return wxItemContainer::GetClientData(n); }
void SetClientObject(unsigned int n, wxClientData* clientData)
{ wxItemContainer::SetClientObject(n, clientData); }
wxClientData* GetClientObject(unsigned int n) const
{ return wxItemContainer::GetClientObject(n); }
};
class WXDLLIMPEXP_CORE wxControlWithItemsBase :
public wxWindowWithItems<wxControl, wxItemContainer>
{
public:
wxControlWithItemsBase() { }
// we have to redefine these functions here to avoid ambiguities in classes
// deriving from us which would arise otherwise because both base classses
// have the methods with the same names - hopefully, a smart compiler can
// optimize away these simple inline wrappers so we don't suffer much from
// this
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// usually the controls like list/combo boxes have their own background
// colour
virtual bool ShouldInheritColours() const { return false; }

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// RCS-ID: $Id: cursor.h 60648 2009-05-16 10:42:48Z FM $
// RCS-ID: $Id: cursor.h 70353 2012-01-15 14:46:41Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -34,10 +34,7 @@ public:
*/
#if defined(__WXPALMOS__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/palmos/cursor.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/msw/cursor.h"
#elif defined(__WXMOTIF__)
@ -52,9 +49,6 @@ public:
#elif defined(__WXX11__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/cursor.h"
#elif defined(__WXMGL__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/mgl/cursor.h"
#elif defined(__WXDFB__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/dfb/cursor.h"
@ -62,7 +56,7 @@ public:
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
#include "wx/osx/cursor.h"
#elif defined(__WXCOCOA__)
#define wxCURSOR_DEFAULT_TYPE 0
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
#include "wx/cocoa/cursor.h"
#elif defined(__WXPM__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE

View File

@ -0,0 +1,53 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/custombgwin.h
// Purpose: Class adding support for custom window backgrounds.
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69930 2011-12-04 23:57:36Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CUSTOMBGWIN_H_
#define _WX_CUSTOMBGWIN_H_
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow: Adds support for custom backgrounds to any
// wxWindow-derived class.
// ----------------------------------------------------------------------------
class wxCustomBackgroundWindowBase
{
public:
// Trivial default ctor.
wxCustomBackgroundWindowBase() { }
// Also a trivial but virtual -- to suppress g++ warnings -- dtor.
virtual ~wxCustomBackgroundWindowBase() { }
// Use the given bitmap to tile the background of this window. This bitmap
// will show through any transparent children.
//
// Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
// handler from running (i.e. not to handle this event yourself) for this
// to work.
void SetBackgroundBitmap(const wxBitmap& bmp)
{
DoSetBackgroundBitmap(bmp);
}
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0;
wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/custombgwin.h"
#elif defined(__WXMSW__)
#include "wx/msw/custombgwin.h"
#else
#include "wx/generic/custombgwin.h"
#endif
#endif // _WX_CUSTOMBGWIN_H_

View File

@ -4,7 +4,7 @@
// Author: Robert Roebling
// Modified by: Bo Yang
// Created: 08.01.06
// RCS-ID: $Id: dataview.h 66783 2011-01-27 11:53:51Z SC $
// RCS-ID: $Id: dataview.h 70377 2012-01-17 14:05:17Z VS $
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -21,9 +21,11 @@
#include "wx/variant.h"
#include "wx/dynarray.h"
#include "wx/icon.h"
#include "wx/itemid.h"
#include "wx/weakref.h"
#include "wx/vector.h"
#include "wx/dataobj.h"
#include "wx/withimages.h"
class WXDLLIMPEXP_FWD_CORE wxImageList;
@ -44,7 +46,6 @@ class WXDLLIMPEXP_FWD_CORE wxImageList;
// wxDataViewCtrl globals
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_ADV wxDataViewItem;
class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
@ -78,33 +79,14 @@ extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
// wxDataViewItem
// ---------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewItem
// Make it a class and not a typedef to allow forward declaring it.
class wxDataViewItem : public wxItemId<void*>
{
public:
wxDataViewItem( void* id = NULL )
{ m_id = id; }
wxDataViewItem( const wxDataViewItem &item )
{ m_id = item.m_id; }
bool IsOk() const { return m_id != NULL; }
void* GetID() const { return m_id; }
operator const void* () const { return m_id; }
private:
void* m_id;
wxDataViewItem() : wxItemId<void*>() { }
wxEXPLICIT wxDataViewItem(void* pItem) : wxItemId<void*>(pItem) { }
};
inline
bool operator==(const wxDataViewItem& left, const wxDataViewItem& right)
{
return left.GetID() == right.GetID();
}
inline
bool operator!=(const wxDataViewItem& left, const wxDataViewItem& right)
{
return !(left == right);
}
WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
// ---------------------------------------------------------
@ -161,16 +143,20 @@ public:
void SetColour(const wxColour& colour) { m_colour = colour; }
void SetBold( bool set ) { m_bold = set; }
void SetItalic( bool set ) { m_italic = set; }
void SetBackgroundColour(const wxColour& colour) { m_bgColour = colour; }
// accessors
bool HasColour() const { return m_colour.Ok(); }
bool HasColour() const { return m_colour.IsOk(); }
const wxColour& GetColour() const { return m_colour; }
bool HasFont() const { return m_bold || m_italic; }
bool GetBold() const { return m_bold; }
bool GetItalic() const { return m_italic; }
bool IsDefault() const { return !(HasColour() || HasFont()); }
bool HasBackgroundColour() const { return m_bgColour.IsOk(); }
const wxColour& GetBackgroundColour() const { return m_bgColour; }
bool IsDefault() const { return !(HasColour() || HasFont() || HasBackgroundColour()); }
// Return the font based on the given one with this attribute applied to it.
wxFont GetEffectiveFont(const wxFont& font) const;
@ -179,6 +165,7 @@ private:
wxColour m_colour;
bool m_bold;
bool m_italic;
wxColour m_bgColour;
};
@ -681,7 +668,18 @@ public:
wxDataViewItem GetCurrentItem() const;
void SetCurrentItem(const wxDataViewItem& item);
virtual wxDataViewItem GetSelection() const = 0;
// Currently focused column of the current item or NULL if no column has focus
virtual wxDataViewColumn *GetCurrentColumn() const = 0;
// Selection: both GetSelection() and GetSelections() can be used for the
// controls both with and without wxDV_MULTIPLE style. For single selection
// controls GetSelections() is not very useful however. And for multi
// selection controls GetSelection() returns an invalid item if more than
// one item is selected. Use GetSelectedItemsCount() or HasSelection() to
// check if any items are selected at all.
virtual int GetSelectedItemsCount() const = 0;
bool HasSelection() const { return GetSelectedItemsCount() != 0; }
wxDataViewItem GetSelection() const;
virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
virtual void Select( const wxDataViewItem & item ) = 0;
@ -701,6 +699,13 @@ public:
virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; }
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) = 0;
// Use EditItem() instead
wxDEPRECATED( void StartEditor(const wxDataViewItem& item, unsigned int column) );
#if wxUSE_DRAG_AND_DROP
virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format))
{ return false; }
@ -757,7 +762,8 @@ public:
m_column(NULL),
m_pos(-1,-1),
m_cacheFrom(0),
m_cacheTo(0)
m_cacheTo(0),
m_editCancelled(false)
#if wxUSE_DRAG_AND_DROP
, m_dataObject(NULL),
m_dataBuffer(NULL),
@ -774,7 +780,8 @@ public:
m_column(event.m_column),
m_pos(event.m_pos),
m_cacheFrom(event.m_cacheFrom),
m_cacheTo(event.m_cacheTo)
m_cacheTo(event.m_cacheTo),
m_editCancelled(event.m_editCancelled)
#if wxUSE_DRAG_AND_DROP
, m_dataObject(event.m_dataObject),
m_dataFormat(event.m_dataFormat),
@ -795,6 +802,10 @@ public:
const wxVariant &GetValue() const { return m_value; }
void SetValue( const wxVariant &value ) { m_value = value; }
// for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only
bool IsEditCancelled() const { return m_editCancelled; }
void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
// for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
wxDataViewColumn *GetDataViewColumn() const { return m_column; }
@ -834,6 +845,7 @@ protected:
wxPoint m_pos;
int m_cacheFrom;
int m_cacheTo;
bool m_editCancelled;
#if wxUSE_DRAG_AND_DROP
wxDataObject *m_dataObject;
@ -1202,7 +1214,7 @@ public:
virtual bool HasDefaultCompare() const
{ return true; }
virtual unsigned int GetColumnCount() const
{ return 1; };
{ return 1; }
virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const
{ return wxT("wxDataViewIconText"); }
@ -1216,10 +1228,11 @@ public:
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl
class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl,
public wxWithImages
{
public:
wxDataViewTreeCtrl() { Init(); }
wxDataViewTreeCtrl() { }
wxDataViewTreeCtrl(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
@ -1227,13 +1240,9 @@ public:
long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
const wxValidator& validator = wxDefaultValidator)
{
Init();
Create(parent, id, pos, size, style, validator);
}
virtual ~wxDataViewTreeCtrl();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
@ -1249,24 +1258,21 @@ public:
bool IsContainer( const wxDataViewItem& item ) const
{ return GetStore()->IsContainer(item); }
void SetImageList( wxImageList *imagelist );
wxImageList* GetImageList() { return m_imageList; }
wxDataViewItem AppendItem( const wxDataViewItem& parent,
const wxString &text, int icon = -1, wxClientData *data = NULL );
const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem PrependItem( const wxDataViewItem& parent,
const wxString &text, int icon = -1, wxClientData *data = NULL );
const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
const wxString &text, int icon = -1, wxClientData *data = NULL );
const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem PrependContainer( const wxDataViewItem& parent,
const wxString &text, int icon = -1, int expanded = -1,
const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL );
wxDataViewItem AppendContainer( const wxDataViewItem& parent,
const wxString &text, int icon = -1, int expanded = -1,
const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL );
wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
const wxString &text, int icon = -1, int expanded = -1,
const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL );
wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
@ -1296,14 +1302,6 @@ public:
void OnCollapsed( wxDataViewEvent &event );
void OnSize( wxSizeEvent &event );
private:
void Init()
{
m_imageList = NULL;
}
wxImageList *m_imageList;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2005-01-09
// RCS-ID: $Id: datectrl.h 61508 2009-07-23 20:30:22Z VZ $
// RCS-ID: $Id: datectrl.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -16,8 +16,7 @@
#if wxUSE_DATEPICKCTRL
#include "wx/control.h" // the base class
#include "wx/datetime.h"
#include "wx/datetimectrl.h" // the base class
#define wxDatePickerCtrlNameStr wxT("datectrl")
@ -46,7 +45,7 @@ enum
// wxDatePickerCtrl: allow the user to enter the date
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl
class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxDateTimePickerCtrl
{
public:
/*
@ -63,23 +62,26 @@ public:
const wxString& name = wxDatePickerCtrlNameStr);
*/
// set/get the date
virtual void SetValue(const wxDateTime& dt) = 0;
virtual wxDateTime GetValue() const = 0;
/*
We inherit the methods to set/get the date from the base class.
// set/get the allowed valid range for the dates, if either/both of them
// are invalid, there is no corresponding limit and if neither is set
// GetRange() returns false
virtual void SetValue(const wxDateTime& dt) = 0;
virtual wxDateTime GetValue() const = 0;
*/
// And add methods to set/get the allowed valid range for the dates. If
// either/both of them are invalid, there is no corresponding limit and if
// neither is set, GetRange() returns false.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
};
#if defined(__WXPALMOS__)
#include "wx/palmos/datectrl.h"
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/datectrl.h"
#define wxHAS_NATIVE_DATEPICKCTRL
#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/datectrl.h"
#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
#include "wx/osx/datectrl.h"
#define wxHAS_NATIVE_DATEPICKCTRL
#else

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2005-01-10
// RCS-ID: $Id: dateevt.h 58718 2009-02-07 18:59:25Z VZ $
// RCS-ID: $Id: dateevt.h 69224 2011-09-29 13:43:15Z VZ $
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -17,7 +17,7 @@
#include "wx/window.h"
// ----------------------------------------------------------------------------
// wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl
// wxDateEvent: used by wxCalendarCtrl, wxDatePickerCtrl and wxTimePickerCtrl.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
@ -48,6 +48,7 @@ private:
// ----------------------------------------------------------------------------
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent);
typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
@ -57,5 +58,8 @@ typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
#define EVT_DATE_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
#define EVT_TIME_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn))
#endif // _WX_DATEEVT_H_

View File

@ -5,7 +5,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 10.02.99
// RCS-ID: $Id: datetime.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: datetime.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -19,7 +19,7 @@
#ifdef __WXWINCE__
#include "wx/msw/wince/time.h"
#elif !defined(__WXPALMOS5__)
#else
#include <time.h>
#endif // OS
@ -31,7 +31,7 @@
class WXDLLIMPEXP_FWD_BASE wxDateTime;
class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
class WXDLLIMPEXP_FWD_BASE wxDateSpan;
#ifdef __WXMSW__
#ifdef __WINDOWS__
struct _SYSTEMTIME;
#endif
@ -53,27 +53,6 @@ struct _SYSTEMTIME;
* 5. wxDateTimeHolidayAuthority for Easter and other christian feasts
*/
/* Two wrapper functions for thread safety */
#ifdef HAVE_LOCALTIME_R
#define wxLocaltime_r localtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
// On Windows, localtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
#endif
#endif
#ifdef HAVE_GMTIME_R
#define wxGmtime_r gmtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
// On Windows, gmtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
#endif
#endif
/*
The three (main) classes declared in this header represent:
@ -627,7 +606,7 @@ public:
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
#ifdef __WXMSW__
#ifdef __WINDOWS__
wxDateTime(const struct _SYSTEMTIME& st)
{
SetFromMSWSysTime(st);
@ -949,7 +928,7 @@ public:
// SYSTEMTIME format
// ------------------------------------------------------------------------
#ifdef __WXMSW__
#ifdef __WINDOWS__
// convert SYSTEMTIME to wxDateTime
wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st);
@ -959,7 +938,7 @@ public:
// same as above but only take date part into account, time is always zero
wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st);
void GetAsMSWSysDate(struct _SYSTEMTIME* st) const;
#endif // __WXMSW__
#endif // __WINDOWS__
// comparison (see also functions below for operator versions)
// ------------------------------------------------------------------------

View File

@ -0,0 +1,48 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/timectrl.h
// Purpose: Declaration of wxDateTimePickerCtrl class.
// Author: Vadim Zeitlin
// Created: 2011-09-22
// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DATETIME_CTRL_H_
#define _WX_DATETIME_CTRL_H_
#include "wx/defs.h"
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
#define wxNEEDS_DATETIMEPICKCTRL
#include "wx/control.h" // the base class
#include "wx/datetime.h"
// ----------------------------------------------------------------------------
// wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl.
// ----------------------------------------------------------------------------
// This class is an implementation detail and should not be used directly, only
// use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl.
class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl
{
public:
// Set/get the date or time (in the latter case, time part is ignored).
virtual void SetValue(const wxDateTime& dt) = 0;
virtual wxDateTime GetValue() const = 0;
};
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/datetimectrl.h"
#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
#include "wx/osx/datetimectrl.h"
#else
typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
#endif
#endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
#endif // _WX_DATETIME_CTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 05/25/99
// RCS-ID: $Id: dc.h 67063 2011-02-27 12:48:13Z VZ $
// RCS-ID: $Id: dc.h 68935 2011-08-27 23:26:53Z RD $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -30,6 +30,7 @@
#include "wx/math.h"
#include "wx/image.h"
#include "wx/region.h"
#include "wx/affinematrix2d.h"
#define wxUSE_NEW_DC 1
@ -42,6 +43,10 @@ class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
class WXDLLIMPEXP_FWD_CORE wxPrintData;
#if wxUSE_GRAPHICS_CONTEXT
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
#endif
// Logical ops
enum wxRasterOperationMode
{
@ -470,7 +475,7 @@ public:
}
virtual void SetLogicalScale(double x, double y);
virtual void GetLogicalScale(double *x, double *y)
virtual void GetLogicalScale(double *x, double *y) const
{
if ( x ) *x = m_logicalScaleX;
if ( y ) *y = m_logicalScaleY;
@ -490,6 +495,20 @@ public:
if ( y ) *y = m_deviceOriginY;
}
#if wxUSE_DC_TRANSFORM_MATRIX
// Transform matrix support is not available in most ports right now
// (currently only wxMSW provides it) so do nothing in these methods by
// default.
virtual bool CanUseTransformMatrix() const
{ return false; }
virtual bool SetTransformMatrix(const wxAffineMatrix2D& WXUNUSED(matrix))
{ return false; }
virtual wxAffineMatrix2D GetTransformMatrix() const
{ return wxAffineMatrix2D(); }
virtual void ResetTransformMatrix()
{ }
#endif // wxUSE_DC_TRANSFORM_MATRIX
virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y );
virtual void ComputeScaleAndOrigin();
@ -497,6 +516,19 @@ public:
// this needs to overidden if the axis is inverted
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
#ifdef __WXMSW__
// Native Windows functions using the underlying HDC don't honour GDI+
// transformations which may be applied to it. Using this function we can
// transform the coordinates manually before passing them to such functions
// (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a
// wxGCDC.
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const
{
return r;
}
#endif // __WXMSW__
// ---------------------------------------------------------
// the actual drawing API
@ -612,6 +644,13 @@ public:
virtual int GetResolution() const
{ return -1; }
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* GetGraphicsContext() const
{ return NULL; }
virtual void SetGraphicsContext( wxGraphicsContext* WXUNUSED(ctx) )
{}
#endif
private:
wxDC *m_owner;
@ -981,7 +1020,7 @@ public:
void SetLogicalScale(double x, double y)
{ m_pimpl->SetLogicalScale( x, y ); }
void GetLogicalScale(double *x, double *y)
void GetLogicalScale(double *x, double *y) const
{ m_pimpl->GetLogicalScale( x, y ); }
void SetLogicalOrigin(wxCoord x, wxCoord y)
@ -1001,6 +1040,20 @@ public:
void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
{ m_pimpl->SetAxisOrientation(xLeftRight, yBottomUp); }
#if wxUSE_DC_TRANSFORM_MATRIX
bool CanUseTransformMatrix() const
{ return m_pimpl->CanUseTransformMatrix(); }
bool SetTransformMatrix(const wxAffineMatrix2D &matrix)
{ return m_pimpl->SetTransformMatrix(matrix); }
wxAffineMatrix2D GetTransformMatrix() const
{ return m_pimpl->GetTransformMatrix(); }
void ResetTransformMatrix()
{ m_pimpl->ResetTransformMatrix(); }
#endif // wxUSE_DC_TRANSFORM_MATRIX
// mostly internal
void SetDeviceLocalOrigin( wxCoord x, wxCoord y )
{ m_pimpl->SetDeviceLocalOrigin( x, y ); }
@ -1287,6 +1340,17 @@ public:
TempHDC GetTempHDC() { return TempHDC(*this); }
#endif // __WXMSW__
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* GetGraphicsContext() const
{
return m_pimpl->GetGraphicsContext();
}
virtual void SetGraphicsContext( wxGraphicsContext* ctx )
{
m_pimpl->SetGraphicsContext(ctx);
}
#endif
protected:
// ctor takes ownership of the pointer
wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { }
@ -1315,13 +1379,13 @@ public:
~wxDCTextColourChanger()
{
if ( m_colFgOld.Ok() )
if ( m_colFgOld.IsOk() )
m_dc.SetTextForeground(m_colFgOld);
}
void Set(const wxColour& col)
{
if ( !m_colFgOld.Ok() )
if ( !m_colFgOld.IsOk() )
m_colFgOld = m_dc.GetTextForeground();
m_dc.SetTextForeground(col);
}
@ -1349,7 +1413,7 @@ public:
~wxDCPenChanger()
{
if ( m_penOld.Ok() )
if ( m_penOld.IsOk() )
m_dc.SetPen(m_penOld);
}
@ -1376,7 +1440,7 @@ public:
~wxDCBrushChanger()
{
if ( m_brushOld.Ok() )
if ( m_brushOld.IsOk() )
m_dc.SetBrush(m_brushOld);
}
@ -1432,14 +1496,14 @@ public:
void Set(const wxFont& font)
{
if ( !m_fontOld.Ok() )
if ( !m_fontOld.IsOk() )
m_fontOld = m_dc.GetFont();
m_dc.SetFont(font);
}
~wxDCFontChanger()
{
if ( m_fontOld.Ok() )
if ( m_fontOld.IsOk() )
m_dc.SetFont(m_fontOld);
}

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Stefan Csomor
// RCS-ID: $Id: dcgraph.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: dcgraph.h 68935 2011-08-27 23:26:53Z RD $
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -29,10 +29,15 @@ public:
#if wxUSE_PRINTING_ARCHITECTURE
wxGCDC( const wxPrinterDC& dc );
#endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDC( const wxEnhMetaFileDC& dc );
#endif
wxGCDC(wxGraphicsContext* context);
wxGCDC();
virtual ~wxGCDC();
wxGraphicsContext* GetGraphicsContext();
wxGraphicsContext* GetGraphicsContext() const;
void SetGraphicsContext( wxGraphicsContext* ctx );
#ifdef __WXMSW__
@ -55,6 +60,9 @@ public:
wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc );
#if wxUSE_PRINTING_ARCHITECTURE
wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc );
#endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc );
#endif
wxGCDCImpl( wxDC *owner );
@ -103,7 +111,7 @@ public:
virtual void ComputeScaleAndOrigin();
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; }
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
// the true implementations
@ -193,6 +201,10 @@ public:
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
#ifdef __WXMSW__
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const;
#endif // __WXMSW__
protected:
// scaling variables
bool m_logicalFunctionSupported;

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// RCS-ID: $Id: dde.h 47254 2007-07-09 10:09:52Z VS $
// RCS-ID: $Id: dde.h 70808 2012-03-04 20:31:42Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -22,10 +22,10 @@ WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE);
WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE);
WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE);
#if defined(__WXMSW__)
#if defined(__WINDOWS__)
#include "wx/msw/dde.h"
#else
#error DDE is only supported on MSW
#error DDE is only supported under Windows
#endif
#endif

View File

@ -3,7 +3,7 @@
// Purpose: Misc debug functions and macros
// Author: Vadim Zeitlin
// Created: 29/01/98
// RCS-ID: $Id: debug.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: debug.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 1998-2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -11,7 +11,7 @@
#ifndef _WX_DEBUG_H_
#define _WX_DEBUG_H_
#if !defined(__WXPALMOS5__) && !defined(__WXWINCE__)
#if !defined(__WXWINCE__)
#include <assert.h>
#endif // systems without assert.h
@ -162,7 +162,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); }
/*
wxOnAssert() is used by the debugging macros defined below. Different
overloads are needed because these macros can be used with or without _T().
overloads are needed because these macros can be used with or without wxT().
All of them are implemented in src/common/appcmn.cpp and unconditionally
call wxTheAssertHandler so the caller must check that it is non-NULL
@ -172,7 +172,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); }
#if wxUSE_UNICODE
// these overloads are the ones typically used by debugging macros: we have to
// provide wxChar* msg version because it's common to use _T() in the macros
// provide wxChar* msg version because it's common to use wxT() in the macros
// and finally, we can't use const wx(char)* msg = NULL, because that would
// be ambiguous
//
@ -299,6 +299,13 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file,
#define wxASSERT_LEVEL_2(cond)
#endif
// This is simply a wrapper for the standard abort() which is not available
// under all platforms.
//
// It isn't really debug-related but there doesn't seem to be any better place
// for it, so declare it here and define it in appbase.cpp, together with
// wxTrap().
extern void WXDLLIMPEXP_BASE wxAbort();
/*
wxCHECK macros always check their conditions, setting debug level to 0 only

View File

@ -4,7 +4,7 @@
* Author: Julian Smart and others
* Modified by: Ryan Norton (Converted to C)
* Created: 01/02/97
* RCS-ID: $Id: defs.h 66711 2011-01-19 10:47:49Z VZ $
* RCS-ID: $Id: defs.h 70353 2012-01-15 14:46:41Z VZ $
* Copyright: (c) Julian Smart
* Licence: wxWindows licence
*/
@ -14,8 +14,10 @@
#ifndef _WX_DEFS_H_
#define _WX_DEFS_H_
// NOTE: this symbol will be replaced with "WXWIN_COMPATIBILITY_3_0" as soon
// as the development branch for 3.1 is created
/*
NOTE: this symbol will be replaced with "WXWIN_COMPATIBILITY_3_0" as soon
as the development branch for 3.1 is created
*/
#define FUTURE_WXWIN_COMPATIBILITY_3_0 1
#define wxDEPRECATED_FUTURE( x ) x
@ -29,11 +31,8 @@
/* Make sure the environment is set correctly */
# if defined(__WXMSW__) && defined(__X__)
# error "Target can't be both X and Windows"
# elif defined(__WXMSW__) && defined(__PALMOS__)
# error "Target can't be both PalmOS and Windows"
# elif !defined(__WXMOTIF__) && \
!defined(__WXMSW__) && \
!defined(__WXPALMOS__)&& \
!defined(__WXGTK__) && \
!defined(__WXPM__) && \
!defined(__WXOSX_CARBON__) && \
@ -41,7 +40,6 @@
!defined(__WXOSX_IPHONE__) && \
!defined(__WXCOCOA__) && \
!defined(__X__) && \
!defined(__WXMGL__) && \
!defined(__WXDFB__) && \
!defined(__WXX11__) && \
wxUSE_GUI
@ -79,8 +77,10 @@
# pragma warning(disable:4514) /* unreferenced inline func has been removed */
# pragma warning(disable:4710) /* function not inlined */
// TODO: this warning should really be enabled as it can be genuinely
// useful, check where does it occur in wxWidgets
/*
TODO: this warning should really be enabled as it can be genuinely
useful, check where does it occur in wxWidgets
*/
#pragma warning(disable: 4127) /* conditional expression is constant */
/* There are too many false positivies for this one, particularly when
@ -89,6 +89,16 @@
class 'bar'" */
# pragma warning(disable:4251)
/*
This is a similar warning which occurs when deriving from standard
containers. MSDN even mentions that it can be ignored in this case
(albeit only in debug build while the warning is the same in release
too and seems equally harmless).
*/
#if wxUSE_STD_CONTAINERS
# pragma warning(disable:4275)
#endif /* wxUSE_STD_CONTAINERS */
# ifdef __VISUALC5__
/* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
/* is buggy, and occurs for code that does actually get executed */
@ -115,7 +125,7 @@
*/
#ifdef __VISUALC6__
#pragma warning(disable: 4284)
#endif // VC6
#endif /* VC6 */
/*
When compiling with VC++ 7 /Wp64 option we get thousands of warnings for
@ -388,15 +398,15 @@ typedef short int WXTYPE;
#ifndef HAVE_WOSTREAM
// Mingw <= 3.4 and all versions of Cygwin as well as any gcc version (so
// far) targeting PalmOS don't have std::wostream
#if defined(__PALMOS__) || \
(defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
/*
Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
*/
#if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
defined(__CYGWIN__)
#define wxNO_WOSTREAM
#endif
// VC++ doesn't have it in the old iostream library
/* VC++ doesn't have it in the old iostream library */
#if defined(__VISUALC__) && wxUSE_IOSTREAMH
#define wxNO_WOSTREAM
#endif
@ -408,12 +418,12 @@ typedef short int WXTYPE;
#undef wxNO_WOSTREAM
#endif /* HAVE_WOSTREAM */
// ----------------------------------------------------------------------------
// other C++ features
// ----------------------------------------------------------------------------
/* ---------------------------------------------------------------------------- */
/* other C++ features */
/* ---------------------------------------------------------------------------- */
#ifndef HAVE_PARTIAL_SPECIALIZATION
// be optimistic by default
/* be optimistic by default */
#define HAVE_PARTIAL_SPECIALIZATION
#endif
@ -421,17 +431,17 @@ typedef short int WXTYPE;
#if __VISUALC__ < 1310
#undef HAVE_PARTIAL_SPECIALIZATION
#endif
#endif // __VISUALC__
#endif /* __VISUALC__ */
#ifndef HAVE_TEMPLATE_OVERLOAD_RESOLUTION
// assume the compiler can use type or const expressions as template
// arguments if it supports partial specialization -- except if it's a
// Borland one which can't
/* assume the compiler can use type or const expressions as template
arguments if it supports partial specialization -- except if it's a
Borland one which can't */
#if defined(HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
#define HAVE_TEMPLATE_OVERLOAD_RESOLUTION
#endif // __BORLANDC__
#endif // !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION)
#endif /* (HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__) */
#endif /* !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) */
/* ---------------------------------------------------------------------------- */
/* portable calling conventions macros */
@ -513,15 +523,14 @@ typedef short int WXTYPE;
#define wxDEPRECATED(x) x
#endif
/*
explicitly specifying inline allows gcc < 3.4 to
handle the deprecation attribute even in the constructor.
doesn't seem to work on Apple's gcc 4.0.1 unless using -O0
*/
#if wxCHECK_GCC_VERSION(3, 4) || defined( __DARWIN__ )
#define wxDEPRECATED_CONSTRUCTOR(x) x
#else
#if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4)
/*
We need to add dummy "inline" to allow gcc < 3.4 to handle the
deprecation attribute on the constructors.
*/
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
#else
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x)
#endif
/*
@ -564,7 +573,7 @@ typedef short int WXTYPE;
/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
/* it must not be defined as "(void *)0" which is standard for C but completely */
/* breaks C++ code) */
#if !defined(__HANDHELDPC__) && !defined(__PALMOS__)
#if !defined(__HANDHELDPC__)
#include <stddef.h>
#endif
@ -767,7 +776,7 @@ enum { wxDefaultCoord = -1 };
/* define fixed length types */
/* ---------------------------------------------------------------------------- */
#if defined(__WXPALMOS__) || defined(__MINGW32__)
#if defined(__MINGW32__)
#if !defined(__MWERKS__)
#include <sys/types.h>
#endif
@ -819,19 +828,7 @@ typedef wxUint16 wxWord;
*/
/* 32bit */
#ifdef __PALMOS__
typedef int wxInt32;
typedef unsigned int wxUint32;
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_WCHAR_T 2
#define SIZEOF_SIZE_T 4
#ifdef __WXPALMOS6__
#define wxSIZE_T_IS_UINT
#endif
#define SIZEOF_VOID_P 4
#define SIZEOF_SIZE_T 4
#elif defined(__WINDOWS__)
#if defined(__WINDOWS__)
#if defined(__WIN32__)
typedef int wxInt32;
typedef unsigned int wxUint32;
@ -1018,14 +1015,6 @@ typedef wxUint32 wxDword;
#error "The 64 bit integer support in CodeWarrior has been disabled."
#error "See the documentation on the 'longlong' pragma."
#endif
#elif defined(__WXPALMOS__)
#if defined(__WXPALMOS6__)
#define wxLongLong_t int64_t
#else
#define wxLongLong_t long long
#endif /* __WXPALMOS6__ */
#define wxLongLongSuffix ll
#define wxLongLongFmtSpec "ll"
#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
#define wxLongLong_t long long
#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
@ -1045,16 +1034,7 @@ typedef wxUint32 wxDword;
#ifdef wxLongLong_t
#ifdef __WXPALMOS__
#if defined(__WXPALMOS6__)
#define wxULongLong_t uint64_t
#else
#define wxULongLong_t unsigned long long
#endif /* __WXPALMOS6__ */
#else
#define wxULongLong_t unsigned wxLongLong_t
#endif
#define wxULongLong_t unsigned wxLongLong_t
/*
wxLL() and wxULL() macros allow to define 64 bit constants in a
@ -1064,8 +1044,10 @@ typedef wxUint32 wxDword;
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
#else
// Currently only Borland compiler has broken concatenation operator
// and this compiler is known to use [u]i64 suffix.
/*
Currently only Borland compiler has broken concatenation operator
and this compiler is known to use [u]i64 suffix.
*/
#define wxLL(x) wxAPPEND_i64(x)
#define wxULL(x) wxAPPEND_ui64(x)
#endif
@ -1102,8 +1084,6 @@ typedef wxUint32 wxDword;
#if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED)
#define HAVE_SSIZE_T
#endif
#elif defined(__PALMOS__)
#define HAVE_SSIZE_T
#elif wxCHECK_WATCOM_VERSION(1,4)
#define HAVE_SSIZE_T
#endif
@ -1114,7 +1094,7 @@ typedef wxUint32 wxDword;
#ifdef __UNIX__
#include <sys/types.h>
#endif
#else // !HAVE_SSIZE_T
#else /* !HAVE_SSIZE_T */
#if SIZEOF_SIZE_T == 4
typedef wxInt32 ssize_t;
#elif SIZEOF_SIZE_T == 8
@ -1127,11 +1107,13 @@ typedef wxUint32 wxDword;
#define HAVE_SSIZE_T
#endif
// we can't rely on Windows _W64 being defined as windows.h may not be included
// so define our own equivalent: this should be used with types like WXLPARAM
// or WXWPARAM which are 64 bit under Win64 to avoid warnings each time we cast
// it to a pointer or a handle (which results in hundreds of warnings as Win32
// API often passes pointers in them)
/*
We can't rely on Windows _W64 being defined as windows.h may not be
included so define our own equivalent: this should be used with types
like WXLPARAM or WXWPARAM which are 64 bit under Win64 to avoid warnings
each time we cast it to a pointer or a handle (which results in hundreds
of warnings as Win32 API often passes pointers in them)
*/
#if wxCHECK_VISUALC_VERSION(7)
#define wxW64 __w64
#else
@ -1142,7 +1124,13 @@ typedef wxUint32 wxDword;
Define signed and unsigned integral types big enough to contain all of long,
size_t and void *.
*/
#if SIZEOF_SIZE_T >= SIZEOF_VOID_P
#if SIZEOF_LONG >= SIZEOF_VOID_P
/*
Normal case when long is the largest integral type.
*/
typedef long wxIntPtr;
typedef unsigned long wxUIntPtr;
#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
/*
Win64 case: size_t is the only integral type big enough for "void *".
@ -1152,12 +1140,6 @@ typedef wxUint32 wxDword;
*/
typedef wxW64 ssize_t wxIntPtr;
typedef size_t wxUIntPtr;
#elif SIZEOF_LONG >= SIZEOF_VOID_P
/*
Normal case when long is the largest integral type.
*/
typedef long wxIntPtr;
typedef unsigned long wxUIntPtr;
#else
/*
This should never happen for the current architectures but if you're
@ -1447,12 +1429,12 @@ typedef double wxDouble;
/* ---------------------------------------------------------------------------- */
#if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3, 4 )
// GCC <= 3.4 has buggy template support
/* GCC <= 3.4 has buggy template support */
# define wxUSE_MEMBER_TEMPLATES 0
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1200
// MSVC <= 6.0 has buggy template support
/* MSVC <= 6.0 has buggy template support */
# define wxUSE_MEMBER_TEMPLATES 0
# define wxUSE_FUNC_TEMPLATE_POINTER 0
#endif
@ -1532,9 +1514,11 @@ enum wxDirection
enum wxAlignment
{
// 0 is a valid wxAlignment value (both wxALIGN_LEFT and wxALIGN_TOP use
// it) so define a symbolic name for an invalid alignment value which can
// be assumed to be different from anything else
/*
0 is a valid wxAlignment value (both wxALIGN_LEFT and wxALIGN_TOP
use it) so define a symbolic name for an invalid alignment value
which can be assumed to be different from anything else
*/
wxALIGN_INVALID = -1,
wxALIGN_NOT = 0x0000,
@ -1557,10 +1541,12 @@ enum wxAlignment
/* misc. flags for wxSizer items */
enum wxSizerFlagBits
{
// wxADJUST_MINSIZE doesn't do anything any more but we still define it for
// compatibility. Notice that it may be also predefined (as 0, hopefully)
// in the user code in order to use it even in !WXWIN_COMPATIBILITY_2_8
// builds so don't redefine it in such case.
/*
wxADJUST_MINSIZE doesn't do anything any more but we still define
it for compatibility. Notice that it may be also predefined (as 0,
hopefully) in the user code in order to use it even in
!WXWIN_COMPATIBILITY_2_8 builds so don't redefine it in such case.
*/
#if WXWIN_COMPATIBILITY_2_8 && !defined(wxADJUST_MINSIZE)
wxADJUST_MINSIZE = 0,
#endif
@ -1848,14 +1834,12 @@ enum wxBorder
/* Old names for compatibility */
#define wxRA_HORIZONTAL wxHORIZONTAL
#define wxRA_VERTICAL wxVERTICAL
#define wxRA_USE_CHECKBOX 0x0010 /* alternative native subcontrols (wxPalmOS) */
/*
* wxRadioButton style flag
*/
#define wxRB_GROUP 0x0004
#define wxRB_SINGLE 0x0008
#define wxRB_USE_CHECKBOX 0x0010 /* alternative native control (wxPalmOS) */
/*
* wxScrollBar flags
@ -1929,12 +1913,12 @@ enum wxBorder
#define wxICON_STOP wxICON_HAND
#define wxICON_ASTERISK wxICON_INFORMATION
#define wxFORWARD 0x00001000
#define wxBACKWARD 0x00002000
#define wxRESET 0x00004000
#define wxHELP 0x00008000
#define wxMORE 0x00010000
#define wxSETUP 0x00020000
#define wxHELP 0x00001000
#define wxFORWARD 0x00002000
#define wxBACKWARD 0x00004000
#define wxRESET 0x00008000
#define wxMORE 0x00010000
#define wxSETUP 0x00020000
#define wxICON_NONE 0x00040000
#define wxICON_MASK \
@ -1945,29 +1929,37 @@ enum wxBorder
*/
enum wxBackgroundStyle
{
// background is erased in the EVT_ERASE_BACKGROUND handler or using the
// system default background if no such handler is defined (this is the
// default style)
/*
background is erased in the EVT_ERASE_BACKGROUND handler or using
the system default background if no such handler is defined (this
is the default style)
*/
wxBG_STYLE_ERASE,
// background is erased by the system, no EVT_ERASE_BACKGROUND event is
// generated at all
/*
background is erased by the system, no EVT_ERASE_BACKGROUND event
is generated at all
*/
wxBG_STYLE_SYSTEM,
// background is erased in EVT_PAINT handler and not erased at all before
// it, this should be used if the paint handler paints over the entire
// window to avoid flicker
/*
background is erased in EVT_PAINT handler and not erased at all
before it, this should be used if the paint handler paints over
the entire window to avoid flicker
*/
wxBG_STYLE_PAINT,
// this is a Mac-only style, don't use in portable code
/* this is a Mac-only style, don't use in portable code */
wxBG_STYLE_TRANSPARENT,
// this style is deprecated and doesn't do anything, don't use
/* this style is deprecated and doesn't do anything, don't use */
wxBG_STYLE_COLOUR,
// this style is deprecated and is synonymous with wxBG_STYLE_PAINT, use
// the new name
/*
this style is deprecated and is synonymous with
wxBG_STYLE_PAINT, use the new name
*/
wxBG_STYLE_CUSTOM = wxBG_STYLE_PAINT
};
@ -2203,6 +2195,18 @@ enum wxItemKind
wxITEM_MAX
};
/*
* The possible states of a 3-state checkbox (Compatible
* with the 2-state checkbox).
*/
enum wxCheckBoxState
{
wxCHK_UNCHECKED,
wxCHK_CHECKED,
wxCHK_UNDETERMINED /* 3-state checkbox only */
};
/* hit test results */
enum wxHitTest
{
@ -2297,7 +2301,7 @@ enum wxDeprecatedGUIConstants
wxTRANSPARENT,
/* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */
/* Note also that stippling a Pen IS meaningfull, because a Line is */
/* Note also that stippling a Pen IS meaningful, because a Line is */
wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */
wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */
/* drawn with a Pen, and without any Brush -- and it can be stippled. */
@ -2354,7 +2358,34 @@ enum wxKeyCode
{
WXK_NONE = 0,
WXK_BACK = 8, // backspace
WXK_CONTROL_A = 1,
WXK_CONTROL_B,
WXK_CONTROL_C,
WXK_CONTROL_D,
WXK_CONTROL_E,
WXK_CONTROL_F,
WXK_CONTROL_G,
WXK_CONTROL_H,
WXK_CONTROL_I,
WXK_CONTROL_J,
WXK_CONTROL_K,
WXK_CONTROL_L,
WXK_CONTROL_M,
WXK_CONTROL_N,
WXK_CONTROL_O,
WXK_CONTROL_P,
WXK_CONTROL_Q,
WXK_CONTROL_R,
WXK_CONTROL_S,
WXK_CONTROL_T,
WXK_CONTROL_U,
WXK_CONTROL_V,
WXK_CONTROL_W,
WXK_CONTROL_X,
WXK_CONTROL_Y,
WXK_CONTROL_Z,
WXK_BACK = 8, /* backspace */
WXK_TAB = 9,
WXK_RETURN = 13,
WXK_ESCAPE = 27,
@ -2477,7 +2508,12 @@ enum wxKeyCode
WXK_WINDOWS_LEFT,
WXK_WINDOWS_RIGHT,
WXK_WINDOWS_MENU ,
WXK_COMMAND,
#ifdef __WXOSX__
WXK_RAW_CONTROL,
#else
WXK_RAW_CONTROL = WXK_CONTROL,
#endif
WXK_COMMAND = WXK_CONTROL,
/* Hardware-specific buttons */
WXK_SPECIAL1 = 193,
@ -2513,10 +2549,11 @@ enum wxKeyModifier
wxMOD_META = 0x0008,
wxMOD_WIN = wxMOD_META,
#if defined(__WXMAC__) || defined(__WXCOCOA__)
wxMOD_CMD = wxMOD_META,
wxMOD_RAW_CONTROL = 0x0010,
#else
wxMOD_CMD = wxMOD_CONTROL,
wxMOD_RAW_CONTROL = wxMOD_CONTROL,
#endif
wxMOD_CMD = wxMOD_CONTROL,
wxMOD_ALL = 0xffff
};
@ -2733,7 +2770,7 @@ typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
#endif
#if defined(__CYGWIN__) && defined(__WXMSW__)
# if wxUSE_STL || defined(wxUSE_STD_STRING)
# if wxUSE_STD_CONTAINERS || defined(wxUSE_STD_STRING)
/*
NASTY HACK because the gethostname in sys/unistd.h which the gnu
stl includes and wx builds with by default clash with each other
@ -2786,7 +2823,7 @@ typedef void* WXDisplay;
typedef const void * CFTypeRef;
// typedef const struct __CFString * CFStringRef;
/* typedef const struct __CFString * CFStringRef; */
#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref;
#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref;
@ -2964,42 +3001,7 @@ typedef WX_NSString* WXGLPixelFormat;
#endif
#endif // __WXMAC__
#if defined(__WXPALMOS__)
typedef void * WXHWND;
typedef void * WXHANDLE;
typedef void * WXHICON;
typedef void * WXHFONT;
typedef void * WXHMENU;
typedef void * WXHPEN;
typedef void * WXHBRUSH;
typedef void * WXHPALETTE;
typedef void * WXHCURSOR;
typedef void * WXHRGN;
typedef void * WXHACCEL;
typedef void * WXHINSTANCE;
typedef void * WXHBITMAP;
typedef void * WXHIMAGELIST;
typedef void * WXHGLOBAL;
typedef void * WXHDC;
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
typedef unsigned long WXCOLORREF;
typedef struct tagMSG WXMSG;
typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
typedef WXWINHANDLE WXWidget;
typedef void * WXFORMPTR;
typedef void * WXEVENTPTR;
typedef void * WXRECTANGLEPTR;
#endif /* __WXPALMOS__ */
#endif /* __WXMAC__ */
/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
#if defined(__WIN32__)
@ -3208,53 +3210,45 @@ typedef long WXPixel; /* safety catch in src/motif/colour.cpp */
#ifdef __WXGTK__
/* Stand-ins for GLIB types */
typedef char gchar;
typedef signed char gint8;
typedef int gint;
typedef unsigned guint;
typedef unsigned long gulong;
typedef void* gpointer;
typedef struct _GSList GSList;
/* Stand-ins for GDK types */
typedef struct _GdkColor GdkColor;
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkVisual GdkVisual;
#ifdef __WXGTK20__
typedef struct _GdkAtom *GdkAtom;
typedef struct _GdkDrawable GdkWindow;
typedef struct _GdkDrawable GdkBitmap;
typedef struct _GdkDrawable GdkPixmap;
#else /* GTK+ 1.2 */
typedef gulong GdkAtom;
typedef struct _GdkWindow GdkWindow;
typedef struct _GdkWindow GdkBitmap;
typedef struct _GdkWindow GdkPixmap;
#endif /* GTK+ 1.2/2.0 */
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkRegion GdkRegion;
typedef struct _GdkDragContext GdkDragContext;
#ifdef HAVE_XIM
typedef struct _GdkIC GdkIC;
typedef struct _GdkICAttr GdkICAttr;
#if defined(__WXGTK20__)
typedef struct _GdkAtom* GdkAtom;
#else
typedef unsigned long GdkAtom;
#endif
#if !defined(__WXGTK30__)
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkRegion GdkRegion;
#endif
#if defined(__WXGTK30__)
typedef struct _GdkWindow GdkWindow;
#elif defined(__WXGTK20__)
typedef struct _GdkDrawable GdkWindow;
typedef struct _GdkDrawable GdkPixmap;
#else
typedef struct _GdkWindow GdkWindow;
typedef struct _GdkWindow GdkBitmap;
typedef struct _GdkWindow GdkPixmap;
#endif
/* Stand-ins for GTK types */
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkRcStyle GtkRcStyle;
typedef struct _GtkAdjustment GtkAdjustment;
typedef struct _GtkList GtkList;
typedef struct _GtkToolbar GtkToolbar;
typedef struct _GtkTooltips GtkTooltips;
typedef struct _GtkNotebook GtkNotebook;
typedef struct _GtkNotebookPage GtkNotebookPage;
typedef struct _GtkAccelGroup GtkAccelGroup;
typedef struct _GtkItemFactory GtkItemFactory;
typedef struct _GtkSelectionData GtkSelectionData;
typedef struct _GtkTextBuffer GtkTextBuffer;
typedef struct _GtkRange GtkRange;
@ -3282,10 +3276,6 @@ typedef struct _PangoLayout PangoLayout;
typedef struct _PangoFontDescription PangoFontDescription;
#endif
#ifdef __WXMGL__
typedef struct window_t *WXWidget;
#endif /* MGL */
#ifdef __WXDFB__
/* DirectFB doesn't have the concept of non-TLW window, so use
something arbitrary */
@ -3328,7 +3318,7 @@ typedef const void* WXWidget;
private: \
classname& operator=(const classname&)
// deprecated variants _not_ requiring a semicolon after them
/* deprecated variants _not_ requiring a semicolon after them */
#define DECLARE_NO_COPY_CLASS(classname) \
wxDECLARE_NO_COPY_CLASS(classname);
#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 29.06.99
// RCS-ID: $Id: dialog.h 66087 2010-11-10 13:51:57Z VZ $
// RCS-ID: $Id: dialog.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -26,7 +26,7 @@ class wxTextSizerWrapper;
// Also see the bit summary table in wx/toplevel.h.
#define wxDIALOG_NO_PARENT 0x0100 // Don't make owned by apps top window
#define wxDIALOG_NO_PARENT 0x00000020 // Don't make owned by apps top window
#ifdef __WXWINCE__
#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)
@ -350,9 +350,7 @@ public:
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
#include "wx/univ/dialog.h"
#else
#if defined(__WXPALMOS__)
#include "wx/palmos/dialog.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/dialog.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/dialog.h"
@ -394,5 +392,8 @@ typedef void (wxEvtHandler::*wxWindowModalDialogEventFunction)(wxWindowModalDial
#define wxWindowModalDialogEventHandler(func) \
wxEVENT_HANDLER_CAST(wxWindowModalDialogEventFunction, func)
#define EVT_WINDOW_MODAL_DIALOG_CLOSED(winid, func) \
wx__DECLARE_EVT1(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, winid, wxWindowModalDialogEventHandler(func))
#endif
// _WX_DIALOG_H_BASE_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 07.07.99
// RCS-ID: $Id: dialup.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: dialup.h 67384 2011-04-03 20:31:32Z DS $
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -171,7 +171,7 @@ public:
bool IsConnectedEvent() const
{ return GetEventType() == wxEVT_DIALUP_CONNECTED; }
// does this event come from wxDialUpManager::Dial() or from some extrenal
// does this event come from wxDialUpManager::Dial() or from some external
// process (i.e. does it result from our own attempt to establish the
// connection)?
bool IsOwnEvent() const { return m_id != 0; }

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Robert Roebling
// RCS-ID: $Id: dirdlg.h 54125 2008-06-11 19:17:41Z SC $
// RCS-ID: $Id: dirdlg.h 70353 2012-01-15 14:46:41Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -116,9 +116,7 @@ protected:
#include "wx/cocoa/dirdlg.h" // Native Cocoa
#elif defined(__WXMOTIF__) || \
defined(__WXX11__) || \
defined(__WXMGL__) || \
defined(__WXCOCOA__) || \
defined(__WXPALMOS__) || \
defined(__WXPM__)
#include "wx/generic/dirdlgg.h" // Other ports use generic implementation
#define wxDirDialog wxGenericDirDialog

View File

@ -4,7 +4,7 @@
* Author: Vadim Zeitlin
* Modified by:
* Created: 16.10.2003 (extracted from wx/defs.h)
* RCS-ID: $Id: dlimpexp.h 61944 2009-09-16 12:06:02Z PJC $
* RCS-ID: $Id: dlimpexp.h 69049 2011-09-10 18:09:12Z SJL $
* Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
@ -22,14 +22,25 @@
#elif defined(__WINDOWS__)
/*
__declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
as VC++ and gcc
as VC++.
*/
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
# define WXEXPORT __declspec(dllexport)
# define WXIMPORT __declspec(dllimport)
# else /* compiler doesn't support __declspec() */
# define WXEXPORT
# define WXIMPORT
/*
While gcc also supports __declspec(dllexport), it creates unusably huge
DLL files since gcc 4.5 (while taking horribly long amounts of time),
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601. Because of this
we rely on binutils auto export/import support which seems to work
quite well for 4.5+.
*/
# elif defined(__GNUC__) && !wxCHECK_GCC_VERSION(4, 5)
/*
__declspec could be used here too but let's use the native
__attribute__ instead for clarity.
*/
# define WXEXPORT __attribute__((dllexport))
# define WXIMPORT __attribute__((dllimport))
# endif
#elif defined(__WXPM__)
# if defined (__WATCOMC__)
@ -91,6 +102,7 @@
# define WXMAKINGDLL_RICHTEXT
# define WXMAKINGDLL_MEDIA
# define WXMAKINGDLL_STC
# define WXMAKINGDLL_WEBVIEW
#endif /* WXMAKINGDLL */
/*
@ -263,6 +275,17 @@
# define WXDLLIMPEXP_DATA_STC(type) type
#endif
#ifdef WXMAKINGDLL_WEBVIEW
# define WXDLLIMPEXP_WEBVIEW WXEXPORT
# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXEXPORT type
#elif defined(WXUSINGDLL)
# define WXDLLIMPEXP_WEBVIEW WXIMPORT
# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXIMPORT type
#else /* not making nor using DLL */
# define WXDLLIMPEXP_WEBVIEW
# define WXDLLIMPEXP_DATA_WEBVIEW(type) type
#endif
/*
GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
forward declarations while MSVC complains about forward declarations without
@ -284,6 +307,7 @@
#define WXDLLIMPEXP_FWD_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA
#define WXDLLIMPEXP_FWD_STC
#define WXDLLIMPEXP_FWD_WEBVIEW
#else
#define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
#define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
@ -299,6 +323,7 @@
#define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
#define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
#define WXDLLIMPEXP_FWD_WEBVIEW WXDLLIMPEXP_WEBVIEW
#endif
/* for backwards compatibility, define suffix-less versions too */

View File

@ -13,7 +13,7 @@
#include "wx/defs.h"
#include "wx/utils.h"
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
#include "wx/beforestd.h"
#include <algorithm>
@ -199,7 +199,7 @@ public:
}
};
#else // STL
#else // !wxUSE_STD_CONTAINERS
template <typename T>
class wxDList
@ -845,6 +845,6 @@ public:
} */
};
#endif // wxUSE_STL/!wxUSE_STL
#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
#endif // _WX_DLIST_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: docview.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: docview.h 70098 2011-12-23 05:59:59Z PC $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -17,6 +17,7 @@
#if wxUSE_DOC_VIEW_ARCHITECTURE
#include "wx/list.h"
#include "wx/dlist.h"
#include "wx/string.h"
#include "wx/frame.h"
#include "wx/filehistory.h"
@ -172,6 +173,10 @@ public:
// dialogs. Override if necessary.
virtual wxWindow *GetDocumentWindow() const;
// Returns true if this document is a child document corresponding to a
// part of the parent document and not a disk file as usual.
bool IsChildDocument() const { return m_documentParent != NULL; }
protected:
wxList m_documentViews;
wxString m_documentFile;
@ -179,7 +184,12 @@ protected:
wxString m_documentTypeName;
wxDocTemplate* m_documentTemplate;
bool m_documentModified;
// if the document parent is non-NULL, it's a pseudo-document corresponding
// to a part of the parent document which can't be saved or loaded
// independently of its parent and is always closed when its parent is
wxDocument* m_documentParent;
wxCommandProcessor* m_commandProcessor;
bool m_savedYet;
@ -193,6 +203,10 @@ protected:
wxString DoGetUserReadableName() const;
private:
// list of all documents whose m_documentParent is this one
typedef wxDList<wxDocument> DocsList;
DocsList m_childDocuments;
DECLARE_ABSTRACT_CLASS(wxDocument)
wxDECLARE_NO_COPY_CLASS(wxDocument);
};
@ -386,6 +400,7 @@ public:
void OnUpdateFileRevert(wxUpdateUIEvent& event);
void OnUpdateFileNew(wxUpdateUIEvent& event);
void OnUpdateFileSave(wxUpdateUIEvent& event);
void OnUpdateFileSaveAs(wxUpdateUIEvent& event);
void OnUpdateUndo(wxUpdateUIEvent& event);
void OnUpdateRedo(wxUpdateUIEvent& event);
@ -474,6 +489,13 @@ public:
// Get the current document manager
static wxDocManager* GetDocumentManager() { return sm_docManager; }
#if wxUSE_PRINTING_ARCHITECTURE
wxPageSetupDialogData& GetPageSetupDialogData()
{ return m_pageSetupDialogData; }
const wxPageSetupDialogData& GetPageSetupDialogData() const
{ return m_pageSetupDialogData; }
#endif // wxUSE_PRINTING_ARCHITECTURE
#if WXWIN_COMPATIBILITY_2_8
// deprecated, override GetDefaultName() instead
wxDEPRECATED_BUT_USED_INTERNALLY(
@ -488,6 +510,11 @@ public:
protected:
// Called when a file selected from the MRU list doesn't exist any more.
// The default behaviour is to remove the file from the MRU and notify the
// user about it but this method can be overridden to customize it.
virtual void OnMRUFileNotExist(unsigned n, const wxString& filename);
// Open the MRU file with the given index in our associated file history.
void DoOpenMRUFile(unsigned n);
#if wxUSE_PRINTING_ARCHITECTURE
@ -959,7 +986,7 @@ wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
// these flags are not used anywhere by wxWidgets and kept only for an unlikely
// case of existing user code using them for its own purposes
#ifdef WXWIN_COMPATIBILITY_2_8
#if WXWIN_COMPATIBILITY_2_8
enum
{
wxDOC_SDI = 1,

View File

@ -3,7 +3,7 @@
// Purpose: Declare all wxDataViewCtrl classes
// Author: Robert Roebling, Vadim Zeitlin
// Created: 2009-11-08 (extracted from wx/dataview.h)
// RCS-ID: $Id: dvrenderers.h 67099 2011-03-01 12:16:49Z VS $
// RCS-ID: $Id: dvrenderers.h 70050 2011-12-19 12:54:38Z VZ $
// Copyright: (c) 2006 Robert Roebling
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
@ -54,6 +54,21 @@ public:
void SetIcon( const wxIcon &icon ) { m_icon = icon; }
const wxIcon &GetIcon() const { return m_icon; }
bool IsSameAs(const wxDataViewIconText& other) const
{
return m_text == other.m_text && m_icon.IsSameAs(other.m_icon);
}
bool operator==(const wxDataViewIconText& other) const
{
return IsSameAs(other);
}
bool operator!=(const wxDataViewIconText& other) const
{
return !IsSameAs(other);
}
private:
wxString m_text;
wxIcon m_icon;
@ -61,19 +76,6 @@ private:
DECLARE_DYNAMIC_CLASS(wxDataViewIconText)
};
inline
bool operator==(const wxDataViewIconText& left, const wxDataViewIconText& right)
{
return left.GetText() == right.GetText() &&
left.GetIcon().IsSameAs(right.GetIcon());
}
inline
bool operator!=(const wxDataViewIconText& left, const wxDataViewIconText& right)
{
return !(left == right);
}
DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV)
// ----------------------------------------------------------------------------
@ -145,11 +147,11 @@ public:
// in-place editing
virtual bool HasEditorCtrl() const
{ return false; }
virtual wxControl* CreateEditorCtrl(wxWindow * WXUNUSED(parent),
wxRect WXUNUSED(labelRect),
const wxVariant& WXUNUSED(value))
virtual wxWindow* CreateEditorCtrl(wxWindow * WXUNUSED(parent),
wxRect WXUNUSED(labelRect),
const wxVariant& WXUNUSED(value))
{ return NULL; }
virtual bool GetValueFromEditorCtrl(wxControl * WXUNUSED(editor),
virtual bool GetValueFromEditorCtrl(wxWindow * WXUNUSED(editor),
wxVariant& WXUNUSED(value))
{ return false; }
@ -157,7 +159,7 @@ public:
virtual void CancelEditing();
virtual bool FinishEditing();
wxControl *GetEditorCtrl() { return m_editorCtrl; }
wxWindow *GetEditorCtrl() { return m_editorCtrl; }
virtual bool IsCustomRenderer() const { return false; }
@ -168,11 +170,12 @@ protected:
wxString m_variantType;
wxDataViewColumn *m_owner;
wxWeakRef<wxControl> m_editorCtrl;
wxWeakRef<wxWindow> m_editorCtrl;
wxDataViewItem m_item; // for m_editorCtrl
// internal utility:
const wxDataViewCtrl* GetView() const;
// internal utility, may be used anywhere the window associated with the
// renderer is required
wxDataViewCtrl* GetView() const;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
@ -225,23 +228,32 @@ public:
// Return the size of the item appropriate to its current value.
virtual wxSize GetSize() const = 0;
// Define virtual function which are called when the item is activated
// (double-clicked or Enter is pressed on it), clicked or the user starts
// to drag it: by default they all simply return false indicating that the
// events are not handled
// Define virtual function which are called when a key is pressed on the
// item, clicked or the user starts to drag it: by default they all simply
// return false indicating that the events are not handled
virtual bool Activate(const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col))
{ return false; }
virtual bool ActivateCell(const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem & item,
unsigned int col,
const wxMouseEvent* mouseEvent);
virtual bool LeftClick(const wxPoint& WXUNUSED(cursor),
const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
{ return false; }
// Deprecated, use (and override) ActivateCell() instead
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
virtual bool Activate(wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col)),
return false; )
// Deprecated, use (and override) ActivateCell() instead
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
virtual bool LeftClick(wxPoint WXUNUSED(cursor),
wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col)),
return false; )
virtual bool StartDrag(const wxPoint& WXUNUSED(cursor),
const wxRect& WXUNUSED(cell),
@ -278,6 +290,9 @@ public:
// platform-specific classes.
virtual wxDC *GetDC() = 0;
// To draw background use the background colour in wxDataViewItemAttr
virtual void RenderBackground(wxDC* dc, const wxRect& rect);
// Prepare DC to use attributes and call Render().
void WXCallRender(wxRect rect, wxDC *dc, int state);
@ -322,8 +337,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual bool HasEditorCtrl() const { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool Render( wxRect rect, wxDC *dc, int state );
virtual wxSize GetSize() const;
virtual bool SetValue( const wxVariant &value );
@ -347,8 +362,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual bool HasEditorCtrl() const { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool Render( wxRect rect, wxDC *dc, int state );
virtual wxSize GetSize() const;
virtual bool SetValue( const wxVariant &value );
@ -373,8 +388,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool SetValue( const wxVariant &value );
virtual bool GetValue( wxVariant &value ) const;
@ -383,6 +398,37 @@ public:
#endif // generic or Carbon versions
#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXGTK__)
// ----------------------------------------------------------------------------
// wxDataViewDateRenderer
// ----------------------------------------------------------------------------
#if wxUSE_DATEPICKCTRL
class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer
{
public:
wxDataViewDateRenderer(const wxString &varianttype = wxT("datetime"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int align = wxDVR_DEFAULT_ALIGNMENT);
virtual bool HasEditorCtrl() const { return true; }
virtual wxWindow *CreateEditorCtrl(wxWindow *parent, wxRect labelRect, const wxVariant &value);
virtual bool GetValueFromEditorCtrl(wxWindow* editor, wxVariant &value);
virtual bool SetValue(const wxVariant &value);
virtual bool GetValue(wxVariant& value) const;
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
private:
wxDateTime m_date;
};
#else // !wxUSE_DATEPICKCTRL
typedef wxDataViewTextRenderer wxDataViewDateRenderer;
#endif
#endif // generic or GTK+ versions
// this class is obsolete, its functionality was merged in
// wxDataViewTextRenderer itself now, don't use it any more
#define wxDataViewTextRendererAttr wxDataViewTextRenderer

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 12.09.97
// RCS-ID: $Id: dynarray.h 56600 2008-10-30 15:57:18Z VZ $
// RCS-ID: $Id: dynarray.h 69688 2011-11-05 15:20:32Z VS $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -14,7 +14,7 @@
#include "wx/defs.h"
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
#include "wx/beforestd.h"
#include <vector>
#include <algorithm>
@ -81,7 +81,7 @@ typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
// you cast "SomeArray *" as "BaseArray *" and then delete it)
// ----------------------------------------------------------------------------
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
template<class T>
class wxArray_SortFunction
@ -151,7 +151,7 @@ public: \
e = rend(); \
for ( const_reverse_iterator i = b; i != e; ++i ) \
if ( *i == item ) \
return (int)(i - b); \
return (int)(e - i - 1); \
} \
else \
{ \
@ -203,12 +203,12 @@ public: \
} \
}
#else // if !wxUSE_STL
#else // if !wxUSE_STD_CONTAINERS
#define _WX_DECLARE_BASEARRAY(T, name, classexp) \
classexp name \
{ \
typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STL */ \
typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STD_CONTAINERS */ \
public: \
name(); \
name(const name& array); \
@ -307,7 +307,7 @@ private: \
T *m_pItems; \
}
#endif // !wxUSE_STL
#endif // !wxUSE_STD_CONTAINERS
// ============================================================================
// The private helper macros containing the core of the array classes
@ -325,7 +325,7 @@ private: \
// _WX_DEFINE_TYPEARRAY: array for simple types
// ----------------------------------------------------------------------------
#if wxUSE_STL
#if wxUSE_STD_CONTAINERS
// in STL case we don't need the entire base arrays hack as standard container
// don't suffer from alignment/storage problems as our home-grown do
@ -335,7 +335,7 @@ private: \
#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
_WX_DEFINE_TYPEARRAY(T, name, base, classexp)
#else // if !wxUSE_STL
#else // if !wxUSE_STD_CONTAINERS
// common declaration used by both _WX_DEFINE_TYPEARRAY and
// _WX_DEFINE_TYPEARRAY_PTR
@ -505,7 +505,7 @@ public: \
#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
_WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE)
#endif // !wxUSE_STL
#endif // !wxUSE_STD_CONTAINERS
// ----------------------------------------------------------------------------
// _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types
@ -546,6 +546,8 @@ public: \
\
size_t Add(T lItem) \
{ return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
void push_back(T lItem) \
{ Add(lItem); } \
\
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
{ base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
@ -636,7 +638,7 @@ private: \
// that wants to export a wxArray daubed with your own import/export goo.
//
// Finally, you can define the macro below as something special to modify the
// arrays defined by a simple WX_FOO_ARRAY as well. By default is is empty.
// arrays defined by a simple WX_FOO_ARRAY as well. By default is empty.
#define wxARRAY_DEFAULT_EXPORT
// ----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
// Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik
// Modified by:
// Created: 20/07/98
// RCS-ID: $Id: dynlib.h 64139 2010-04-25 12:07:37Z VS $
// RCS-ID: $Id: dynlib.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -123,14 +123,14 @@ enum wxPluginCategory
#define wxDL_INIT_FUNC(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name)
#ifdef __WXMSW__
#ifdef __WINDOWS__
// same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see
// wxDynamicLibrary::GetSymbolAorW()
#define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name)
#endif // __WXMSW__
#endif // __WINDOWS__
// the following macros can be used to redirect a whole library to a class and
// check at run-time if the library is present and contains all required
@ -304,7 +304,7 @@ public:
#endif
}
#ifdef __WXMSW__
#ifdef __WINDOWS__
// this function is useful for loading functions from the standard Windows
// DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
// wide character build) suffix if they take string parameters
@ -326,7 +326,7 @@ public:
{
return RawGetSymbolAorW(m_handle, name);
}
#endif // __WXMSW__
#endif // __WINDOWS__
// return all modules/shared libraries in the address space of this process
//
@ -349,7 +349,7 @@ public:
static wxString GetPluginsDirectory();
#ifdef __WXMSW__
#ifdef __WINDOWS__
// return the handle (HMODULE/HINSTANCE) of the DLL with the given name
// and/or containing the specified address: for XP and later systems only
// the address is used and the name is ignored but for the previous systems
@ -360,7 +360,7 @@ public:
// need to be freed using FreeLibrary() but it also means that it can
// become invalid if the DLL is unloaded
static WXHMODULE MSWGetModuleHandle(const char *name, void *addr);
#endif // __WXMSW__
#endif // __WINDOWS__
protected:
// common part of GetSymbol() and HasSymbol()
@ -383,7 +383,7 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary);
};
#ifdef __WXMSW__
#ifdef __WINDOWS__
// ----------------------------------------------------------------------------
// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind
@ -404,7 +404,7 @@ public:
}
};
#endif // __WXMSW__
#endif // __WINDOWS__
// ----------------------------------------------------------------------------
// Interesting defines

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.09.2003 (extracted from wx/fontenc.h)
// RCS-ID: $Id: encinfo.h 52834 2008-03-26 15:06:00Z FM $
// RCS-ID: $Id: encinfo.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -35,7 +35,6 @@
struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
{
wxString facename; // may be empty meaning "any"
#ifndef __WXPALMOS__
wxFontEncoding encoding; // so that we know what this struct represents
#if defined(__WXMSW__) || \
@ -55,12 +54,9 @@ struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
xencoding;
#elif defined(wxHAS_UTF8_FONTS)
// ports using UTF-8 for text don't need encoding information for fonts
#elif defined(__WXMGL__)
int mglEncoding;
#else
#error "Unsupported toolkit"
#endif
#endif // !__WXPALMOS__
// this struct is saved in config by wxFontMapper, so it should know to
// serialise itself (implemented in platform-specific code)
bool FromString(const wxString& s);

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: event.h 66209 2010-11-19 07:51:15Z RD $
// RCS-ID: $Id: event.h 70703 2012-02-26 20:24:25Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -39,6 +39,7 @@
class WXDLLIMPEXP_FWD_BASE wxList;
class WXDLLIMPEXP_FWD_BASE wxEvent;
class WXDLLIMPEXP_FWD_BASE wxEventFilter;
#if wxUSE_GUI
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxMenu;
@ -224,10 +225,13 @@ public:
const wxObjectEventFunctor &other =
static_cast< const wxObjectEventFunctor & >( functor );
// FIXME-VC6: amazing but true: replacing "method == NULL" here
// with "!method" makes VC6 crash with an ICE in DLL build (only!)
// FIXME-VC6: amazing but true: replacing "m_method == 0" here
// with "!m_method" makes VC6 crash with an ICE in DLL build (only!)
// Also notice that using "NULL" instead of "0" results in warnings
// about "using NULL in arithmetics" from arm-linux-androideabi-g++
// 4.4.3 used for wxAndroid build.
return ( m_method == other.m_method || other.m_method == NULL ) &&
return ( m_method == other.m_method || other.m_method == 0 ) &&
( m_handler == other.m_handler || other.m_handler == NULL );
}
else
@ -615,8 +619,9 @@ extern WXDLLIMPEXP_BASE const wxEventType wxEVT_FIRST;
extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST;
// Need events declared to do this
class WXDLLIMPEXP_FWD_BASE wxIdleEvent;
class WXDLLIMPEXP_FWD_BASE wxThreadEvent;
class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
class WXDLLIMPEXP_FWD_CORE wxThreadEvent;
class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent;
@ -649,7 +654,6 @@ class WXDLLIMPEXP_FWD_CORE wxPaletteChangedEvent;
class WXDLLIMPEXP_FWD_CORE wxJoystickEvent;
class WXDLLIMPEXP_FWD_CORE wxDropFilesEvent;
class WXDLLIMPEXP_FWD_CORE wxInitDialogEvent;
class WXDLLIMPEXP_FWD_CORE wxIdleEvent;
class WXDLLIMPEXP_FWD_CORE wxUpdateUIEvent;
class WXDLLIMPEXP_FWD_CORE wxClipboardTextEvent;
class WXDLLIMPEXP_FWD_CORE wxHelpEvent;
@ -678,7 +682,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCo
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEvent);
// Thread events
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_THREAD, wxThreadEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent);
// Mouse event types
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent);
@ -713,6 +717,10 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_UP, wxKeyEvent);
#if wxUSE_HOTKEY
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HOTKEY, wxKeyEvent);
#endif
// This is a private event used by wxMSW code only and subject to change or
// disappear in the future. Don't use.
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AFTER_CHAR, wxKeyEvent);
// Set cursor event
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_CURSOR, wxSetCursorEvent);
@ -1112,6 +1120,148 @@ private:
wxDECLARE_NO_COPY_CLASS(wxEventProcessInHandlerOnly);
};
class WXDLLIMPEXP_BASE wxEventBasicPayloadMixin
{
public:
wxEventBasicPayloadMixin()
: m_commandInt(0),
m_extraLong(0)
{
}
void SetString(const wxString& s) { m_cmdString = s; }
const wxString& GetString() const { return m_cmdString; }
void SetInt(int i) { m_commandInt = i; }
int GetInt() const { return m_commandInt; }
void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
long GetExtraLong() const { return m_extraLong; }
protected:
// Note: these variables have "cmd" or "command" in their name for backward compatibility:
// they used to be part of wxCommandEvent, not this mixin.
wxString m_cmdString; // String event argument
int m_commandInt;
long m_extraLong; // Additional information (e.g. select/deselect)
wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin);
};
class WXDLLIMPEXP_BASE wxEventAnyPayloadMixin : public wxEventBasicPayloadMixin
{
public:
wxEventAnyPayloadMixin() : wxEventBasicPayloadMixin() {}
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
template<typename T>
void SetPayload(const T& payload)
{
m_payload = payload;
}
template<typename T>
T GetPayload() const
{
return m_payload.As<T>();
}
protected:
wxAny m_payload;
#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin);
};
// Idle event
/*
wxEVT_IDLE
*/
// Whether to always send idle events to windows, or
// to only send update events to those with the
// wxWS_EX_PROCESS_IDLE style.
enum wxIdleMode
{
// Send idle events to all windows
wxIDLE_PROCESS_ALL,
// Send idle events to windows that have
// the wxWS_EX_PROCESS_IDLE flag specified
wxIDLE_PROCESS_SPECIFIED
};
class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent
{
public:
wxIdleEvent()
: wxEvent(0, wxEVT_IDLE),
m_requestMore(false)
{ }
wxIdleEvent(const wxIdleEvent& event)
: wxEvent(event),
m_requestMore(event.m_requestMore)
{ }
void RequestMore(bool needMore = true) { m_requestMore = needMore; }
bool MoreRequested() const { return m_requestMore; }
virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
// Specify how wxWidgets will send idle events: to
// all windows, or only to those which specify that they
// will process the events.
static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
// Returns the idle event mode
static wxIdleMode GetMode() { return sm_idleMode; }
protected:
bool m_requestMore;
static wxIdleMode sm_idleMode;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
};
// Thread event
class WXDLLIMPEXP_BASE wxThreadEvent : public wxEvent,
public wxEventAnyPayloadMixin
{
public:
wxThreadEvent(wxEventType eventType = wxEVT_THREAD, int id = wxID_ANY)
: wxEvent(id, eventType)
{ }
wxThreadEvent(const wxThreadEvent& event)
: wxEvent(event),
wxEventAnyPayloadMixin(event)
{
// make sure our string member (which uses COW, aka refcounting) is not
// shared by other wxString instances:
SetString(GetString().c_str());
}
virtual wxEvent *Clone() const
{
return new wxThreadEvent(*this);
}
// this is important to avoid that calling wxEventLoopBase::YieldFor thread events
// gets processed when this is unwanted:
virtual wxEventCategory GetEventCategory() const
{ return wxEVT_CATEGORY_THREAD; }
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent)
};
#if wxUSE_GUI
@ -1134,16 +1284,15 @@ private:
wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
*/
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent,
public wxEventBasicPayloadMixin
{
public:
wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
wxCommandEvent(const wxCommandEvent& event)
: wxEvent(event),
m_cmdString(event.m_cmdString),
m_commandInt(event.m_commandInt),
m_extraLong(event.m_extraLong),
wxEventBasicPayloadMixin(event),
m_clientData(event.m_clientData),
m_clientObject(event.m_clientObject)
{ }
@ -1156,32 +1305,23 @@ public:
void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; }
wxClientData *GetClientObject() const { return m_clientObject; }
// Note: this shadows wxEventBasicPayloadMixin::GetString(), because it does some
// GUI-specific hacks
wxString GetString() const;
// Get listbox selection if single-choice
int GetSelection() const { return m_commandInt; }
// Set/Get listbox/choice selection string
void SetString(const wxString& s) { m_cmdString = s; }
wxString GetString() const;
// Get checkbox value
bool IsChecked() const { return m_commandInt != 0; }
// true if the listbox event was a selection.
bool IsSelection() const { return (m_extraLong != 0); }
void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
long GetExtraLong() const { return m_extraLong; }
void SetInt(int i) { m_commandInt = i; }
int GetInt() const { return m_commandInt; }
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; }
protected:
wxString m_cmdString; // String event argument
int m_commandInt;
long m_extraLong; // Additional information (e.g. select/deselect)
void* m_clientData; // Arbitrary client data
wxClientData* m_clientObject; // Arbitrary client object
@ -1221,60 +1361,6 @@ private:
};
// Thread event
class WXDLLIMPEXP_CORE wxThreadEvent : public wxCommandEvent
{
public:
wxThreadEvent(wxEventType eventType = wxEVT_COMMAND_THREAD, int id = wxID_ANY)
: wxCommandEvent(eventType, id)
{ }
wxThreadEvent(const wxThreadEvent& event)
: wxCommandEvent(event)
{
// make sure our string member (which uses COW, aka refcounting) is not
// shared by other wxString instances:
SetString(GetString().c_str());
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
m_payload = event.m_payload;
#endif
}
virtual wxEvent *Clone() const
{
return new wxThreadEvent(*this);
}
// this is important to avoid that calling wxEventLoopBase::YieldFor thread events
// gets processed when this is unwanted:
virtual wxEventCategory GetEventCategory() const
{ return wxEVT_CATEGORY_THREAD; }
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
template<typename T>
void SetPayload(const T& payload)
{
m_payload = payload;
}
template<typename T>
T GetPayload() const
{
return m_payload.As<T>();
}
protected:
wxAny m_payload;
#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent)
};
// Scroll event class, derived form wxCommandEvent. wxScrollEvents are
// sent by wxSlider and wxScrollBar.
/*
@ -1360,18 +1446,6 @@ private:
wxEVT_LEFT_DCLICK
wxEVT_MIDDLE_DCLICK
wxEVT_RIGHT_DCLICK
wxEVT_NC_LEFT_DOWN
wxEVT_NC_LEFT_UP,
wxEVT_NC_MIDDLE_DOWN,
wxEVT_NC_MIDDLE_UP,
wxEVT_NC_RIGHT_DOWN,
wxEVT_NC_RIGHT_UP,
wxEVT_NC_MOTION,
wxEVT_NC_ENTER_WINDOW,
wxEVT_NC_LEAVE_WINDOW,
wxEVT_NC_LEFT_DCLICK,
wxEVT_NC_MIDDLE_DCLICK,
wxEVT_NC_RIGHT_DCLICK,
*/
class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent,
@ -1420,8 +1494,8 @@ public:
bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); }
bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); }
bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); }
bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_UP); }
bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_UP); }
bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_DCLICK); }
bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_DCLICK); }
// True if a button is down and the mouse is moving
bool Dragging() const
@ -1524,7 +1598,7 @@ public:
void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
const wxCursor& GetCursor() const { return m_cursor; }
bool HasCursor() const { return m_cursor.Ok(); }
bool HasCursor() const { return m_cursor.IsOk(); }
virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); }
@ -1578,7 +1652,12 @@ class WXDLLIMPEXP_CORE wxKeyEvent : public wxEvent,
{
public:
wxKeyEvent(wxEventType keyType = wxEVT_NULL);
// Normal copy ctor and a ctor creating a new event for the same key as the
// given one but a different event type (this is used in implementation
// code only, do not use outside of the library).
wxKeyEvent(const wxKeyEvent& evt);
wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt);
// get the key code: an ASCII7 char or an element of wxKeyCode enum
int GetKeyCode() const { return (int)m_keyCode; }
@ -1619,6 +1698,15 @@ public:
// Get Y position
wxCoord GetY() const { return m_y; }
// Can be called from wxEVT_CHAR_HOOK handler to allow generation of normal
// key events even though the event had been handled (by default they would
// not be generated in this case).
void DoAllowNextEvent() { m_allowNext = true; }
// Return the value of the "allow next" flag, for internal use only.
bool IsNextEventAllowed() const { return m_allowNext; }
virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; }
@ -1634,16 +1722,7 @@ public:
// implicitly defined operator=() so need to do it this way:
*static_cast<wxKeyboardState *>(this) = evt;
m_x = evt.m_x;
m_y = evt.m_y;
m_keyCode = evt.m_keyCode;
m_rawCode = evt.m_rawCode;
m_rawFlags = evt.m_rawFlags;
#if wxUSE_UNICODE
m_uniChar = evt.m_uniChar;
#endif
DoAssignMembers(evt);
}
return *this;
}
@ -1665,6 +1744,37 @@ public:
wxUint32 m_rawFlags;
private:
// Set the event to propagate if necessary, i.e. if it's of wxEVT_CHAR_HOOK
// type. This is used by all ctors.
void InitPropagation()
{
if ( m_eventType == wxEVT_CHAR_HOOK )
m_propagationLevel = wxEVENT_PROPAGATE_MAX;
m_allowNext = false;
}
// Copy only the event data present in this class, this is used by
// AssignKeyData() and copy ctor.
void DoAssignMembers(const wxKeyEvent& evt)
{
m_x = evt.m_x;
m_y = evt.m_y;
m_keyCode = evt.m_keyCode;
m_rawCode = evt.m_rawCode;
m_rawFlags = evt.m_rawFlags;
#if wxUSE_UNICODE
m_uniChar = evt.m_uniChar;
#endif
}
// If this flag is true, the normal key events should still be generated
// even if wxEVT_CHAR_HOOK had been handled. By default it is false as
// handling wxEVT_CHAR_HOOK suppresses all the subsequent events.
bool m_allowNext;
DECLARE_DYNAMIC_CLASS(wxKeyEvent)
};
@ -1749,7 +1859,6 @@ private:
/*
wxEVT_PAINT
wxEVT_NC_PAINT
wxEVT_PAINT_ICON
*/
#if wxDEBUG_LEVEL && (defined(__WXMSW__) || defined(__WXPM__))
@ -2722,59 +2831,6 @@ private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent)
};
#endif // wxUSE_GUI
// Idle event
/*
wxEVT_IDLE
*/
// Whether to always send idle events to windows, or
// to only send update events to those with the
// wxWS_EX_PROCESS_IDLE style.
enum wxIdleMode
{
// Send idle events to all windows
wxIDLE_PROCESS_ALL,
// Send idle events to windows that have
// the wxWS_EX_PROCESS_IDLE flag specified
wxIDLE_PROCESS_SPECIFIED
};
class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent
{
public:
wxIdleEvent()
: wxEvent(0, wxEVT_IDLE),
m_requestMore(false)
{ }
wxIdleEvent(const wxIdleEvent& event)
: wxEvent(event),
m_requestMore(event.m_requestMore)
{ }
void RequestMore(bool needMore = true) { m_requestMore = needMore; }
bool MoreRequested() const { return m_requestMore; }
virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
// Specify how wxWidgets will send idle events: to
// all windows, or only to those which specify that they
// will process the events.
static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
// Returns the idle event mode
static wxIdleMode GetMode() { return sm_idleMode; }
protected:
bool m_requestMore;
static wxIdleMode sm_idleMode;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
};
/* TODO
wxEVT_MOUSE_CAPTURE_CHANGED,
@ -2786,6 +2842,7 @@ private:
wxEVT_COMPARE_ITEM
*/
#endif // wxUSE_GUI
// ============================================================================
@ -2983,6 +3040,19 @@ public:
bool IsUnlinked() const;
// Global event filters
// --------------------
// Add an event filter whose FilterEvent() method will be called for each
// and every event processed by wxWidgets. The filters are called in LIFO
// order and wxApp is registered as an event filter by default. The pointer
// must remain valid until it's removed with RemoveFilter() and is not
// deleted by wxEvtHandler.
static void AddFilter(wxEventFilter* filter);
// Remove a filter previously installed with AddFilter().
static void RemoveFilter(wxEventFilter* filter);
// Event queuing and processing
// ----------------------------
@ -3269,7 +3339,7 @@ protected:
// base class implementation passes the event to wxTheApp
virtual bool TryAfter(wxEvent& event);
#ifdef WXWIN_COMPATIBILITY_2_8
#if WXWIN_COMPATIBILITY_2_8
// deprecated method: override TryBefore() instead of this one
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
virtual bool TryValidator(wxEvent& WXUNUSED(event)), return false; )
@ -3330,6 +3400,9 @@ private:
// try to process events in all handlers chained to this one
bool DoTryChain(wxEvent& event);
// Head of the event filter linked list.
static wxEventFilter* ms_filterList;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler)
};
@ -3418,11 +3491,14 @@ inline void wxQueueEvent(wxEvtHandler *dest, wxEvent *event)
typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&);
#define wxEventHandler(func) \
wxEVENT_HANDLER_CAST(wxEventFunction, func)
#define wxIdleEventHandler(func) \
wxEVENT_HANDLER_CAST(wxIdleEventFunction, func)
#define wxThreadEventHandler(func) \
wxEVENT_HANDLER_CAST(wxThreadEventFunction, func)
#if wxUSE_GUI
@ -3451,7 +3527,6 @@ protected:
};
typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&);
typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&);
typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&);
typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&);
typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&);
@ -3491,8 +3566,6 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
#define wxCommandEventHandler(func) \
wxEVENT_HANDLER_CAST(wxCommandEventFunction, func)
#define wxThreadEventHandler(func) \
wxEVENT_HANDLER_CAST(wxThreadEventFunction, func)
#define wxScrollEventHandler(func) \
wxEVENT_HANDLER_CAST(wxScrollEventFunction, func)
#define wxScrollWinEventHandler(func) \
@ -3976,7 +4049,9 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func))
// Thread events
#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_COMMAND_THREAD, id, wxThreadEventHandler(func))
#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func))
// alias for backward compatibility with 2.9.0:
#define wxEVT_COMMAND_THREAD wxEVT_THREAD
// ----------------------------------------------------------------------------
// Helper functions

View File

@ -0,0 +1,72 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/eventfilter.h
// Purpose: wxEventFilter class declaration.
// Author: Vadim Zeitlin
// Created: 2011-11-21
// RCS-ID: $Id: eventfilter.h 70302 2012-01-09 14:04:25Z DS $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_EVENTFILTER_H_
#define _WX_EVENTFILTER_H_
#include "wx/defs.h"
class WXDLLIMPEXP_FWD_BASE wxEvent;
class WXDLLIMPEXP_FWD_BASE wxEvtHandler;
// ----------------------------------------------------------------------------
// wxEventFilter is used with wxEvtHandler::AddFilter() and ProcessEvent().
// ----------------------------------------------------------------------------
class wxEventFilter
{
public:
// Possible return values for FilterEvent().
//
// Notice that the values of these enum elements are fixed due to backwards
// compatibility constraints.
enum
{
// Process event as usual.
Event_Skip = -1,
// Don't process the event normally at all.
Event_Ignore = 0,
// Event was already handled, don't process it normally.
Event_Processed = 1
};
wxEventFilter()
{
m_next = NULL;
}
virtual ~wxEventFilter()
{
wxASSERT_MSG( !m_next, "Forgot to call wxEvtHandler::RemoveFilter()?" );
}
// This method allows to filter all the events processed by the program, so
// you should try to return quickly from it to avoid slowing down the
// program to a crawl.
//
// Return value should be -1 to continue with the normal event processing,
// or true or false to stop further processing and pretend that the event
// had been already processed or won't be processed at all, respectively.
virtual int FilterEvent(wxEvent& event) = 0;
private:
// Objects of this class are made to be stored in a linked list in
// wxEvtHandler so put the next node ponter directly in the class itself.
wxEventFilter* m_next;
// And provide access to it for wxEvtHandler [only].
friend class wxEvtHandler;
wxDECLARE_NO_COPY_CLASS(wxEventFilter);
};
#endif // _WX_EVENTFILTER_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 01.06.01
// RCS-ID: $Id: evtloop.h 65057 2010-07-23 23:32:46Z VZ $
// RCS-ID: $Id: evtloop.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -233,9 +233,7 @@ private:
// integration with MFC) but currently this is not done for all ports yet (e.g.
// wxX11) so fall back to the old wxGUIEventLoop definition below for them
#if defined(__WXPALMOS__)
#include "wx/palmos/evtloop.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
// this header defines both console and GUI loops for MSW
#include "wx/msw/evtloop.h"
#elif defined(__WXOSX__)

View File

@ -3,7 +3,7 @@
// Purpose: declaration of wxEventLoopSource class
// Author: Vadim Zeitlin
// Created: 2009-10-21
// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $
// RCS-ID: $Id: evtloopsrc.h 69559 2011-10-27 21:10:30Z VZ $
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -49,7 +49,7 @@ enum
wxEVENT_SOURCE_EXCEPTION = 0x04,
wxEVENT_SOURCE_ALL = wxEVENT_SOURCE_INPUT |
wxEVENT_SOURCE_OUTPUT |
wxEVENT_SOURCE_EXCEPTION,
wxEVENT_SOURCE_EXCEPTION
};
// wxEventLoopSource itself is an ABC and can't be created directly, currently

View File

@ -5,7 +5,7 @@
* Author: Vadim Zeitlin
* Modified by: Ryan Norton (Converted to C)
* Created: 18.03.02
* RCS-ID: $Id: features.h 60526 2009-05-06 11:42:16Z VZ $
* RCS-ID: $Id: features.h 69961 2011-12-08 15:58:45Z VZ $
* Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
@ -108,8 +108,16 @@
If this is defined, wxEvtHandler::Bind<>() is available (not all compilers
have the required template support for this and in particular under Windows
where only g++ and MSVC >= 7 currently support it.
Recent Sun CC versions support this but perhaps older ones can compile this
code too, adjust the version check if this is the case (unfortunately we
can't easily test for the things used in wx/event.h in configure so we have
to maintain these checks manually). The same applies to xlC 7: perhaps
earlier versions can compile this code too but they were not tested.
*/
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7)
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
|| (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
|| (defined(__xlC__) && __xlC__ >= 0x700)
#define wxHAS_EVENT_BIND
#endif

View File

@ -5,7 +5,7 @@
// Modified by:
// Created: 8/17/99
// Copyright: (c) Robert Roebling
// RCS-ID: $Id: filedlg.h 62722 2009-11-26 16:17:00Z VZ $
// RCS-ID: $Id: filedlg.h 70345 2012-01-15 01:05:28Z VZ $
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -232,9 +232,6 @@ wxSaveFileSelector(const wxString& what,
#include "wx/cocoa/filedlg.h"
#elif defined(__WXPM__)
#include "wx/os2/filedlg.h"
#elif defined(__WXPALMOS__)
#define wxHAS_GENERIC_FILEDIALOG
#include "wx/generic/filedlgg.h"
#endif
#endif // wxUSE_FILEDLG

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 29/01/98
// RCS-ID: $Id: filefn.h 65057 2010-07-23 23:32:46Z VZ $
// RCS-ID: $Id: filefn.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -15,7 +15,6 @@
#include "wx/list.h"
#include "wx/arrstr.h"
#ifndef __WXPALMOS5__
#ifdef __WXWINCE__
#include "wx/msw/wince/time.h"
#include "wx/msw/private.h"
@ -40,7 +39,6 @@
#include <unix.h>
#endif
#endif
#endif // !__WXPALMOS5__
#ifdef __OS2__
// need to check for __OS2__ first since currently both
@ -85,11 +83,10 @@
#include <dir.h>
#endif
#ifndef __WXPALMOS5__
#ifndef __WXWINCE__
#include <fcntl.h> // O_RDONLY &c
#endif
#endif // !__WXPALMOS5__
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
@ -115,8 +112,6 @@
typedef long off_t;
#elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
typedef long off_t;
#elif defined(__WXPALMOS5__)
typedef long off_t;
#endif
enum wxSeekMode
@ -205,7 +200,7 @@ enum wxPosixPermissions
#define wxCRT_RmDir _wrmdir
#define wxCRT_Stat _wstat
#define wxStructStat struct _stat
#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
#elif (defined(__WINDOWS__) || defined(__OS2__)) && \
( \
defined(__VISUALC__) || \
defined(__MINGW64__) || \
@ -368,7 +363,13 @@ enum wxPosixPermissions
#define wxCRT_MkDirA wxPOSIX_IDENT(mkdir)
#define wxCRT_RmDirA wxPOSIX_IDENT(rmdir)
#ifdef wxHAS_HUGE_FILES
#define wxCRT_StatA wxPOSIX_IDENT(stati64)
// MinGW-64 provides underscore-less versions of all file functions
// except for this one.
#ifdef __MINGW64__
#define wxCRT_StatA _stati64
#else
#define wxCRT_StatA wxPOSIX_IDENT(stati64)
#endif
#else
// Unfortunately Watcom is not consistent
#if defined(__OS2__) && defined(__WATCOMC__)
@ -468,43 +469,6 @@ enum wxPosixPermissions
// private defines, undefine so that nobody gets tempted to use
#undef wxHAS_HUGE_FILES
#undef wxHAS_HUGE_STDIO_FILES
#elif defined (__WXPALMOS__)
typedef off_t wxFileOffset;
#ifdef _LARGE_FILES
#define wxFileOffsetFmtSpec wxLongLongFmtSpec
wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), BadFileSizeType );
// wxFile is present and supports large files
#ifdef wxUSE_FILE
#define wxHAS_LARGE_FILES
#endif
// wxFFile is present and supports large files
#if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
#define wxHAS_LARGE_FFILES
#endif
#else
#define wxFileOffsetFmtSpec wxT("")
#endif
#define wxClose close
#define wxRead ::read
#define wxWrite ::write
#define wxLseek lseek
#define wxSeek lseek
#define wxFsync fsync
#define wxEof eof
#define wxCRT_MkDir mkdir
#define wxCRT_RmDir rmdir
#define wxTell(fd) lseek(fd, 0, SEEK_CUR)
#define wxStructStat struct stat
#define wxCRT_Open open
#define wxCRT_Stat svfs_stat
#define wxCRT_Lstat lstat
#define wxCRT_Access access
#define wxHAS_NATIVE_LSTAT
#else // Unix or Windows using unknown compiler, assume POSIX supported
typedef off_t wxFileOffset;
#ifdef HAVE_LARGEFILE_SUPPORT
@ -764,9 +728,6 @@ WXDLLIMPEXP_BASE bool wxIsExecutable(const wxString &path);
// CYGWIN also uses UNIX settings
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
#define wxPATH_SEP wxPATH_SEP_UNIX
#elif defined(__WXPALMOS__)
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
#define wxPATH_SEP wxPATH_SEP_UNIX
#elif defined(__MAC__)
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
#define wxPATH_SEP wxPATH_SEP_MAC

View File

@ -3,7 +3,7 @@
// Purpose: wxFileHistory class
// Author: Julian Smart, Vaclav Slavik
// Created: 2010-05-03
// RCS-ID: $Id: filehistory.h 64240 2010-05-07 06:45:48Z VS $
// RCS-ID: $Id: filehistory.h 70503 2012-02-03 17:27:13Z VZ $
// Copyright: (c) Julian Smart, Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -23,6 +23,7 @@
class WXDLLIMPEXP_FWD_CORE wxMenu;
class WXDLLIMPEXP_FWD_BASE wxConfigBase;
class WXDLLIMPEXP_FWD_BASE wxFileName;
// ----------------------------------------------------------------------------
// File history management
@ -79,6 +80,10 @@ private:
// The ID of the first history menu item (Doesn't have to be wxID_FILE1)
wxWindowID m_idBase;
// Normalize a file name to canonical form. We have a special function for
// this to ensure the same normalization is used everywhere.
static wxString NormalizeFileName(const wxFileName& filename);
wxDECLARE_NO_COPY_CLASS(wxFileHistoryBase);
};

View File

@ -4,7 +4,7 @@
// Author: Robert Roebling, Vadim Zeitlin
// Modified by:
// Created: 28.12.00
// RCS-ID: $Id: filename.h 63886 2010-04-06 22:51:11Z FM $
// RCS-ID: $Id: filename.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 2000 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ class WXDLLIMPEXP_FWD_BASE wxFFile;
// this symbol is defined for the platforms where file systems use volumes in
// paths
#if defined(__WXMSW__) || defined(__DOS__) || defined(__OS2__)
#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__)
#define wxHAS_FILESYSTEM_VOLUMES
#endif
@ -214,14 +214,20 @@ public:
!m_ext.empty() || m_hasExt;
}
// does the file with this name exists?
// does the file with this name exist?
bool FileExists() const;
static bool FileExists( const wxString &file );
// does the directory with this name exists?
// does the directory with this name exist?
bool DirExists() const;
static bool DirExists( const wxString &dir );
// does anything at all with this name (i.e. file, directory or some
// other file system object such as a device, socket, ...) exist?
bool Exists() const { return Exists(GetFullPath()); }
static bool Exists(const wxString& path);
// checks on most common flags for files/directories;
// more platform-specific features (like e.g. Unix permissions) are not
// available in wxFileName

View File

@ -5,7 +5,7 @@
// Modified by:
// Created: 14/4/2006
// Copyright: (c) Francesco Montorsi
// RCS-ID: $Id: filepicker.h 58849 2009-02-12 21:09:20Z RR $
// RCS-ID: $Id: filepicker.h 70043 2011-12-18 12:34:47Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -87,9 +87,13 @@ public:
wxFileDirPickerWidgetBase() { }
virtual ~wxFileDirPickerWidgetBase() { }
// Path here is the name of the selected file or directory.
wxString GetPath() const { return m_path; }
virtual void SetPath(const wxString &str) { m_path=str; }
// Set the directory to open the file browse dialog at initially.
virtual void SetInitialDirectory(const wxString& dir) = 0;
// returns the picker widget cast to wxControl
virtual wxControl *AsControl() = 0;
@ -109,12 +113,14 @@ protected:
#define wxFLP_OVERWRITE_PROMPT 0x1000
#define wxFLP_FILE_MUST_EXIST 0x2000
#define wxFLP_CHANGE_DIR 0x4000
#define wxFLP_SMALL wxPB_SMALL
// NOTE: wxMULTIPLE is not supported !
#define wxDIRP_DIR_MUST_EXIST 0x0008
#define wxDIRP_CHANGE_DIR 0x0010
#define wxDIRP_SMALL wxPB_SMALL
// map platform-dependent controls which implement the wxFileDirPickerWidgetBase
@ -163,6 +169,12 @@ public: // public API
wxString GetPath() const;
void SetPath(const wxString &str);
// Set the directory to open the file browse dialog at initially.
void SetInitialDirectory(const wxString& dir)
{
m_pickerIface->SetInitialDirectory(dir);
}
public: // internal functions
void UpdatePickerFromTextCtrl();
@ -253,13 +265,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxFLP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxFilePickerCtrlNameStr)
{
return wxFileDirPickerCtrlBase::CreateBase(parent, id, path,
message, wildcard,
pos, size, style,
validator, name);
}
const wxString& name = wxFilePickerCtrlNameStr);
void SetFileName(const wxFileName &filename)
{ SetPath(filename.GetFullPath()); }
@ -306,8 +312,13 @@ protected:
// extracts the style for our picker from wxFileDirPickerCtrlBase's style
long GetPickerStyle(long style) const
{
return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR|wxFLP_USE_TEXTCTRL));
return style & (wxFLP_OPEN |
wxFLP_SAVE |
wxFLP_OVERWRITE_PROMPT |
wxFLP_FILE_MUST_EXIST |
wxFLP_CHANGE_DIR |
wxFLP_USE_TEXTCTRL |
wxFLP_SMALL);
}
private:
@ -358,14 +369,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDIRP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDirPickerCtrlNameStr)
{
return wxFileDirPickerCtrlBase::CreateBase
(
parent, id, path, message, wxEmptyString,
pos, size, style, validator, name
);
}
const wxString& name = wxDirPickerCtrlNameStr);
void SetDirName(const wxFileName &dirname)
{ SetPath(dirname.GetPath()); }
@ -409,7 +413,12 @@ protected:
// extracts the style for our picker from wxFileDirPickerCtrlBase's style
long GetPickerStyle(long style) const
{ return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR|wxDIRP_USE_TEXTCTRL)); }
{
return style & (wxDIRP_DIR_MUST_EXIST |
wxDIRP_CHANGE_DIR |
wxDIRP_USE_TEXTCTRL |
wxDIRP_SMALL);
}
private:
DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 20.09.99
// RCS-ID: $Id: font.h 67052 2011-02-27 12:47:05Z VZ $
// RCS-ID: $Id: font.h 70446 2012-01-23 11:28:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -227,6 +227,7 @@ public:
virtual wxFontStyle GetStyle() const = 0;
virtual wxFontWeight GetWeight() const = 0;
virtual bool GetUnderlined() const = 0;
virtual bool GetStrikethrough() const { return false; }
virtual wxString GetFaceName() const = 0;
virtual wxFontEncoding GetEncoding() const = 0;
virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0;
@ -244,6 +245,7 @@ public:
virtual void SetWeight( wxFontWeight weight ) = 0;
virtual void SetUnderlined( bool underlined ) = 0;
virtual void SetStrikethrough( bool WXUNUSED(strikethrough) ) {}
virtual void SetEncoding(wxFontEncoding encoding) = 0;
virtual bool SetFaceName( const wxString& faceName );
void SetNativeFontInfo(const wxNativeFontInfo& info)
@ -277,7 +279,7 @@ public:
static void SetDefaultEncoding(wxFontEncoding encoding);
// this doesn't do anything and is kept for compatibility only
#ifdef WXWIN_COMPATIBILITY_2_8
#if WXWIN_COMPATIBILITY_2_8
wxDEPRECATED_INLINE(void SetNoAntiAliasing(bool no = true), wxUnusedVar(no););
wxDEPRECATED_INLINE(bool GetNoAntiAliasing() const, return false;)
#endif // WXWIN_COMPATIBILITY_2_8
@ -290,6 +292,33 @@ protected:
// wxFONTFAMILY_UNKNOWN unlike the public method (see comment there).
virtual wxFontFamily DoGetFamily() const = 0;
// Helper functions to recover wxFONTSTYLE/wxFONTWEIGHT and underlined flg
// values from flags containing a combination of wxFONTFLAG_XXX.
static wxFontStyle GetStyleFromFlags(int flags)
{
return flags & wxFONTFLAG_ITALIC
? wxFONTSTYLE_ITALIC
: flags & wxFONTFLAG_SLANT
? wxFONTSTYLE_SLANT
: wxFONTSTYLE_NORMAL;
}
static wxFontWeight GetWeightFromFlags(int flags)
{
return flags & wxFONTFLAG_LIGHT
? wxFONTWEIGHT_LIGHT
: flags & wxFONTFLAG_BOLD
? wxFONTWEIGHT_BOLD
: wxFONTWEIGHT_NORMAL;
}
static bool GetUnderlinedFromFlags(int flags)
{
return (flags & wxFONTFLAG_UNDERLINED) != 0;
}
private:
// the currently default encoding: by default, it's the default system
// encoding, but may be changed by the application using
@ -329,6 +358,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
wxFont& MakeBold(); \
wxFont& MakeItalic(); \
wxFont& MakeUnderlined(); \
wxFont& MakeStrikethrough(); \
wxFont& MakeLarger() { return Scale(1.2f); } \
wxFont& MakeSmaller() { return Scale(1/1.2f); } \
wxFont& Scale(float x); \
@ -336,14 +366,13 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
wxFont Bold() const; \
wxFont Italic() const; \
wxFont Underlined() const; \
wxFont Strikethrough() const; \
wxFont Larger() const { return Scaled(1.2f); } \
wxFont Smaller() const { return Scaled(1/1.2f); } \
wxFont Scaled(float x) const
// include the real class declaration
#if defined(__WXPALMOS__)
#include "wx/palmos/font.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/font.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/font.h"
@ -353,8 +382,6 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
#include "wx/gtk1/font.h"
#elif defined(__WXX11__)
#include "wx/x11/font.h"
#elif defined(__WXMGL__)
#include "wx/mgl/font.h"
#elif defined(__WXDFB__)
#include "wx/dfb/font.h"
#elif defined(__WXMAC__)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 05.11.99
// RCS-ID: $Id: fontutil.h 63918 2010-04-08 21:39:14Z SC $
// RCS-ID: $Id: fontutil.h 70446 2012-01-23 11:28:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -172,6 +172,7 @@ public:
wxFontStyle m_style;
wxFontWeight m_weight;
bool m_underlined;
bool m_strikethrough;
wxString m_faceName;
wxFontEncoding m_encoding;
public :
@ -187,6 +188,7 @@ public :
wxFontStyle style;
wxFontWeight weight;
bool underlined;
bool strikethrough;
wxString faceName;
wxFontEncoding encoding;
#endif // platforms
@ -224,6 +226,7 @@ public:
SetStyle((wxFontStyle)font.GetStyle());
SetWeight((wxFontWeight)font.GetWeight());
SetUnderlined(font.GetUnderlined());
SetStrikethrough(font.GetStrikethrough());
#if defined(__WXMSW__)
if ( font.IsUsingSizeInPixels() )
SetPixelSize(font.GetPixelSize());
@ -252,6 +255,7 @@ public:
wxFontStyle GetStyle() const;
wxFontWeight GetWeight() const;
bool GetUnderlined() const;
bool GetStrikethrough() const;
wxString GetFaceName() const;
wxFontFamily GetFamily() const;
wxFontEncoding GetEncoding() const;
@ -261,6 +265,7 @@ public:
void SetStyle(wxFontStyle style);
void SetWeight(wxFontWeight weight);
void SetUnderlined(bool underlined);
void SetStrikethrough(bool strikethrough);
bool SetFaceName(const wxString& facename);
void SetFamily(wxFontFamily family);
void SetEncoding(wxFontEncoding encoding);

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 15.11.99
// RCS-ID: $Id: frame.h 64278 2010-05-10 21:09:50Z VZ $
// RCS-ID: $Id: frame.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -39,7 +39,6 @@ class WXDLLIMPEXP_FWD_CORE wxToolBar;
#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only)
#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu
#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent
#define wxFRAME_SHAPED 0x0010 // Create a window that is able to be shaped
// ----------------------------------------------------------------------------
// wxFrame is a top-level window with optional menubar, statusbar and toolbar
@ -252,9 +251,7 @@ protected:
#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__)
#include "wx/univ/frame.h"
#else // !__WXUNIVERSAL__
#if defined(__WXPALMOS__)
#include "wx/palmos/frame.h"
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include "wx/msw/frame.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/frame.h"

View File

@ -3,7 +3,7 @@
// Purpose: wxFileSystemWatcherBase
// Author: Bartosz Bekier
// Created: 2009-05-23
// RCS-ID: $Id: fswatcher.h 62474 2009-10-22 11:35:43Z VZ $
// RCS-ID: $Id: fswatcher.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -55,6 +55,16 @@ enum
wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR
};
// Type of the path watched, used only internally for now.
enum wxFSWPathType
{
wxFSWPath_None, // Invalid value for an initialized watch.
wxFSWPath_File, // Plain file.
wxFSWPath_Dir, // Watch a directory and the files in it.
wxFSWPath_Tree // Watch a directory and all its children recursively.
};
/**
* Event containing information about file system change.
*/
@ -174,24 +184,24 @@ typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction)
#define wxFileSystemWatcherEventHandler(func) \
wxEVENT_HANDLER_CAST(wxFileSystemWatcherEventFunction, func)
#define EVT_FSWATCHER(winid, func) \
wx__DECLARE_EVT1(wxEVT_FSWATCHER, winid, wxFileSystemWatcherEventHandler(func))
// ----------------------------------------------------------------------------
// wxFileSystemWatcherBase: interface for wxFileSystemWatcher
// ----------------------------------------------------------------------------
/**
* Simple container to store information about one watched file
*/
// Simple container to store information about one watched path.
class wxFSWatchInfo
{
public:
wxFSWatchInfo() :
m_path(wxEmptyString), m_events(-1)
m_events(-1), m_type(wxFSWPath_None)
{
}
wxFSWatchInfo(const wxString& path, int events) :
m_path(path), m_events(events)
wxFSWatchInfo(const wxString& path, int events, wxFSWPathType type) :
m_path(path), m_events(events), m_type(type)
{
}
@ -205,9 +215,15 @@ public:
return m_events;
}
wxFSWPathType GetType() const
{
return m_type;
}
protected:
wxString m_path;
int m_events;
wxFSWPathType m_type;
};
WX_DECLARE_STRING_HASH_MAP(wxFSWatchInfo, wxFSWatchInfoMap);
@ -304,6 +320,11 @@ protected:
return path_copy.GetFullPath();
}
// Delegates the real work of adding the path to wxFSWatcherImpl::Add() and
// updates m_watches if the new path was successfully added.
bool DoAdd(const wxFileName& path, int events, wxFSWPathType type);
wxFSWatchInfoMap m_watches; // path=>wxFSWatchInfo map
wxFSWatcherImpl* m_service; // file system events service
wxEvtHandler* m_owner; // handler for file system events
@ -320,7 +341,7 @@ protected:
#elif defined(wxHAS_KQUEUE)
#include "wx/unix/fswatcher_kqueue.h"
#define wxFileSystemWatcher wxKqueueFileSystemWatcher
#elif defined(__WXMSW__)
#elif defined(__WINDOWS__)
#include "wx/msw/fswatcher.h"
#define wxFileSystemWatcher wxMSWFileSystemWatcher
#else

View File

@ -6,7 +6,7 @@
//
// Author: Robin Dunn
// Created: 03-Nov-2003
// RCS-ID: $Id: gbsizer.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: gbsizer.h 69970 2011-12-10 04:34:06Z RD $
// Copyright: (c) Robin Dunn
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -115,26 +115,26 @@ public:
wxGBSizerItem( int width,
int height,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
wxObject* userData);
const wxGBSpan& span=wxDefaultSpan,
int flag=0,
int border=0,
wxObject* userData=NULL);
// window
wxGBSizerItem( wxWindow *window,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
wxObject* userData );
const wxGBSpan& span=wxDefaultSpan,
int flag=0,
int border=0,
wxObject* userData=NULL );
// subsizer
wxGBSizerItem( wxSizer *sizer,
const wxGBPosition& pos,
const wxGBSpan& span,
int flag,
int border,
wxObject* userData );
const wxGBSpan& span=wxDefaultSpan,
int flag=0,
int border=0,
wxObject* userData=NULL );
// default ctor
wxGBSizerItem();
@ -160,7 +160,7 @@ public:
// is successful and after the next Layout the item will be resized.
bool SetSpan( const wxGBSpan& span );
// Returns true if this item and the other item instersect
// Returns true if this item and the other item intersect
bool Intersects(const wxGBSizerItem& other);
// Returns true if the given pos/span would intersect with this item.

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: gdicmn.h 66306 2010-12-03 12:39:43Z VZ $
// RCS-ID: $Id: gdicmn.h 70789 2012-03-04 00:28:58Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -59,8 +59,10 @@ enum wxBitmapType
wxBITMAP_TYPE_XBM_DATA,
wxBITMAP_TYPE_XPM,
wxBITMAP_TYPE_XPM_DATA,
wxBITMAP_TYPE_TIF,
wxBITMAP_TYPE_TIF_RESOURCE,
wxBITMAP_TYPE_TIFF,
wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF,
wxBITMAP_TYPE_TIFF_RESOURCE,
wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE,
wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_GIF_RESOURCE,
wxBITMAP_TYPE_PNG,
@ -158,14 +160,18 @@ enum wxStockCursor
// macros
// ---------------------------------------------------------------------------
#if defined(__WINDOWS__) || defined(__WXPM__)
#define wxHAS_IMAGES_IN_RESOURCES
#endif
/* Useful macro for creating icons portably, for example:
wxIcon *icon = new wxICON(sample);
expands into:
wxIcon *icon = new wxIcon("sample"); // On wxMSW
wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK
wxIcon *icon = new wxIcon("sample"); // On Windows
wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK/Linux
*/
#ifdef __WXMSW__
@ -174,9 +180,6 @@ enum wxStockCursor
#elif defined(__WXPM__)
// Load from a resource
#define wxICON(X) wxIcon(wxT(#X))
#elif defined(__WXMGL__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
#elif defined(__WXDFB__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
@ -202,12 +205,11 @@ enum wxStockCursor
*/
#if defined(__WXMSW__) || defined(__WXPM__)
#define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
#define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_BMP_RESOURCE)
#elif defined(__WXGTK__) || \
defined(__WXMOTIF__) || \
defined(__WXX11__) || \
defined(__WXMAC__) || \
defined(__WXMGL__) || \
defined(__WXDFB__) || \
defined(__WXCOCOA__)
// Initialize from an included XPM
@ -900,7 +902,7 @@ class WXDLLIMPEXP_CORE wxResourceCache: public wxList
{
public:
wxResourceCache() { }
#if !wxUSE_STL
#if !wxUSE_STD_CONTAINERS
wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
#endif
virtual ~wxResourceCache();

View File

@ -5,7 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// RCS-ID: $Id: gdiobj.h 66374 2010-12-14 18:43:49Z VZ $
// RCS-ID: $Id: gdiobj.h 70345 2012-01-15 01:05:28Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -57,7 +57,7 @@ public:
// because it's still widely used)
bool Ok() const { return IsOk(); }
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXPALMOS__)
#if defined(__WXMSW__) || defined(__WXPM__)
// Creates the resource
virtual bool RealizeResource() { return false; }

View File

@ -3,7 +3,7 @@
// Purpose: generic wxAboutBox() implementation
// Author: Vadim Zeitlin
// Created: 2006-10-07
// RCS-ID: $Id: aboutdlgg.h 60389 2009-04-26 13:41:21Z VZ $
// RCS-ID: $Id: aboutdlgg.h 70413 2012-01-20 22:11:32Z VZ $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -21,6 +21,16 @@ class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo;
class WXDLLIMPEXP_FWD_CORE wxSizer;
class WXDLLIMPEXP_FWD_CORE wxSizerFlags;
// Under GTK and OS X "About" dialogs are not supposed to be modal, unlike MSW
// and, presumably, all the other platforms.
#ifndef wxUSE_MODAL_ABOUT_DIALOG
#if defined(__WXGTK__) || defined(__WXMAC__)
#define wxUSE_MODAL_ABOUT_DIALOG 0
#else
#define wxUSE_MODAL_ABOUT_DIALOG 1
#endif
#endif // wxUSE_MODAL_ABOUT_DIALOG not defined
// ----------------------------------------------------------------------------
// wxGenericAboutDialog: generic "About" dialog implementation
// ----------------------------------------------------------------------------
@ -73,6 +83,12 @@ private:
// common part of all ctors
void Init() { m_sizerText = NULL; }
#if !wxUSE_MODAL_ABOUT_DIALOG
// An explicit handler for deleting the dialog when it's closed is needed
// when we show it non-modally.
void OnCloseWindow(wxCloseEvent& event);
void OnOK(wxCommandEvent& event);
#endif // !wxUSE_MODAL_ABOUT_DIALOG
wxSizer *m_sizerText;
};

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions
// Created: 01/02/97
// RCS-ID: $Id: choicdgg.h 63731 2010-03-21 11:06:31Z VZ $
// RCS-ID: $Id: choicdgg.h 70642 2012-02-20 21:56:18Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -106,39 +106,112 @@ public:
const wxString& caption,
int n,
const wxString *choices,
char **clientData = (char **)NULL,
void **clientData = NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
const wxPoint& pos = wxDefaultPosition)
{
Create(parent, message, caption, n, choices, clientData, style, pos);
}
wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxArrayString& choices,
char **clientData = (char **)NULL,
void **clientData = NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
const wxPoint& pos = wxDefaultPosition)
{
Create(parent, message, caption, choices, clientData, style, pos);
}
bool Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
int n,
const wxString *choices,
char **clientData = (char **)NULL,
void **clientData = NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
bool Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxArrayString& choices,
char **clientData = (char **)NULL,
void **clientData = NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
void SetSelection(int sel);
int GetSelection() const { return m_selection; }
wxString GetStringSelection() const { return m_stringSelection; }
void* GetSelectionData() const { return m_clientData; }
// obsolete function (NB: no need to make it return wxChar, it's untyped)
char *GetSelectionClientData() const { return (char *)m_clientData; }
#if WXWIN_COMPATIBILITY_2_8
// Deprecated overloads taking "char**" client data.
wxDEPRECATED_CONSTRUCTOR
(
wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
int n,
const wxString *choices,
char **clientData,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition)
)
{
Create(parent, message, caption, n, choices,
(void**)clientData, style, pos);
}
wxDEPRECATED_CONSTRUCTOR
(
wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxArrayString& choices,
char **clientData,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition)
)
{
Create(parent, message, caption, choices,
(void**)clientData, style, pos);
}
wxDEPRECATED_INLINE
(
bool Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
int n,
const wxString *choices,
char **clientData,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition),
return Create(parent, message, caption, n, choices,
(void**)clientData, style, pos);
)
wxDEPRECATED_INLINE
(
bool Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxArrayString& choices,
char **clientData,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition),
return Create(parent, message, caption, choices,
(void**)clientData, style, pos);
)
// NB: no need to make it return wxChar, it's untyped
wxDEPRECATED_ACCESSOR
(
char* GetSelectionClientData() const,
(char*)GetSelectionData()
)
#endif // WXWIN_COMPATIBILITY_2_8
// implementation from now on
void OnOK(wxCommandEvent& event);

View File

@ -4,7 +4,7 @@
// Author: Francesco Montorsi
// Modified by:
// Created: 8/10/2006
// RCS-ID: $Id: collpaneg.h 58606 2009-02-01 20:59:03Z FM $
// RCS-ID: $Id: collpaneg.h 68366 2011-07-24 22:19:33Z VZ $
// Copyright: (c) Francesco Montorsi
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -25,7 +25,8 @@ class WXDLLIMPEXP_FWD_CORE wxDisclosureTriangle;
// wxGenericCollapsiblePane
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxGenericCollapsiblePane : public wxCollapsiblePaneBase
class WXDLLIMPEXP_CORE wxGenericCollapsiblePane :
public wxNavigationEnabled<wxCollapsiblePaneBase>
{
public:
wxGenericCollapsiblePane() { Init(); }
@ -103,7 +104,6 @@ private:
void OnButton(wxCommandEvent &ev);
void OnSize(wxSizeEvent &ev);
WX_DECLARE_CONTROL_CONTAINER();
DECLARE_DYNAMIC_CLASS(wxGenericCollapsiblePane)
DECLARE_EVENT_TABLE()
};

View File

@ -0,0 +1,96 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/custombgwin.h
// Purpose: Generic implementation of wxCustomBackgroundWindow.
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GENERIC_CUSTOMBGWIN_H_
#define _WX_GENERIC_CUSTOMBGWIN_H_
#include "wx/bitmap.h"
// A helper to avoid template bloat: this class contains all type-independent
// code of wxCustomBackgroundWindow<> below.
class wxCustomBackgroundWindowGenericBase : public wxCustomBackgroundWindowBase
{
public:
wxCustomBackgroundWindowGenericBase() { }
protected:
void DoEraseBackground(wxEraseEvent& event, wxWindow* win)
{
wxDC& dc = *event.GetDC();
const wxSize clientSize = win->GetClientSize();
const wxSize bitmapSize = m_bitmapBg.GetSize();
for ( int x = 0; x < clientSize.x; x += bitmapSize.x )
{
for ( int y = 0; y < clientSize.y; y += bitmapSize.y )
{
dc.DrawBitmap(m_bitmapBg, x, y);
}
}
}
// The bitmap used for painting the background if valid.
wxBitmap m_bitmapBg;
wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowGenericBase);
};
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow
// ----------------------------------------------------------------------------
template <class W>
class wxCustomBackgroundWindow : public W,
public wxCustomBackgroundWindowGenericBase
{
public:
typedef W BaseWindowClass;
wxCustomBackgroundWindow() { }
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp)
{
m_bitmapBg = bmp;
if ( m_bitmapBg.IsOk() )
{
BaseWindowClass::Connect
(
wxEVT_ERASE_BACKGROUND,
wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground)
);
}
else
{
BaseWindowClass::Disconnect
(
wxEVT_ERASE_BACKGROUND,
wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground)
);
}
}
private:
// Event handler for erasing the background which is only used when we have
// a valid background bitmap.
void OnEraseBackground(wxEraseEvent& event)
{
DoEraseBackground(event, this);
}
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W);
};
#endif // _WX_GENERIC_CUSTOMBGWIN_H_

View File

@ -3,7 +3,7 @@
// Purpose: wxDataViewCtrl generic implementation header
// Author: Robert Roebling
// Modified By: Bo Yang
// Id: $Id: dataview.h 65948 2010-10-30 15:57:41Z VS $
// Id: $Id: dataview.h 70717 2012-02-27 18:54:02Z VZ $
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -68,10 +68,12 @@ public:
virtual void SetFlags(int flags) { m_flags = flags; UpdateDisplay(); }
virtual int GetFlags() const { return m_flags; }
virtual void SetAsSortKey(bool sort = true) { m_sort = sort; UpdateDisplay(); }
virtual bool IsSortKey() const { return m_sort; }
virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; UpdateDisplay(); }
virtual void UnsetAsSortKey() { m_sort = false; UpdateDisplay(); }
virtual void SetSortOrder(bool ascending);
virtual bool IsSortOrderAscending() const { return m_sortAscending; }
virtual void SetBitmap( const wxBitmap& bitmap ) { wxDataViewColumnBase::SetBitmap(bitmap); UpdateDisplay(); }
@ -155,7 +157,7 @@ public:
virtual wxDataViewColumn *GetSortingColumn() const;
virtual wxDataViewItem GetSelection() const;
virtual int GetSelectedItemsCount() const;
virtual int GetSelections( wxDataViewItemArray & sel ) const;
virtual void SetSelections( const wxDataViewItemArray & sel );
virtual void Select( const wxDataViewItem & item );
@ -172,6 +174,8 @@ public:
virtual wxRect GetItemRect( const wxDataViewItem & item,
const wxDataViewColumn *column = NULL ) const;
virtual bool SetRowHeight( int rowHeight );
virtual void Expand( const wxDataViewItem & item );
virtual void Collapse( const wxDataViewItem & item );
virtual bool IsExpanded( const wxDataViewItem & item ) const;
@ -185,19 +189,18 @@ public:
virtual wxBorder GetDefaultBorder() const;
void StartEditor( const wxDataViewItem & item, unsigned int column );
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column);
// These methods are specific to generic wxDataViewCtrl implementation and
// should not be used in portable code.
wxColour GetAlternateRowColour() const { return m_alternateRowColour; }
void SetAlternateRowColour(const wxColour& colour);
protected:
virtual int GetSelections( wxArrayInt & sel ) const;
virtual void SetSelections( const wxArrayInt & sel );
virtual void Select( int row );
virtual void Unselect( int row );
virtual bool IsSelected( int row ) const;
virtual void SelectRange( int from, int to );
virtual void UnselectRange( int from, int to );
virtual void EnsureVisible( int row, int column );
// Notice that row here may be invalid (i.e. >= GetRowCount()), this is not
// an error and this function simply returns an invalid item in this case.
virtual wxDataViewItem GetItemByRow( unsigned int row ) const;
virtual int GetRowByItem( const wxDataViewItem & item ) const;
@ -226,21 +229,32 @@ public: // utility functions not part of the API
// return the column displayed at the given position in the control
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
virtual wxDataViewColumn *GetCurrentColumn() const;
virtual void OnInternalIdle();
private:
virtual wxDataViewItem DoGetCurrentItem() const;
virtual void DoSetCurrentItem(const wxDataViewItem& item);
void InvalidateColBestWidths();
void InvalidateColBestWidth(int idx);
void UpdateColWidths();
wxDataViewColumnList m_cols;
// cached column best widths or 0 if not computed, values are for
// respective columns from m_cols and the arrays have same size
wxVector<int> m_colsBestWidths;
// m_colsBestWidths partially invalid, needs recomputing
bool m_colsDirty;
wxDataViewModelNotifier *m_notifier;
wxDataViewMainWindow *m_clientArea;
wxDataViewHeaderWindow *m_headerArea;
// user defined color to draw row lines, may be invalid
wxColour m_alternateRowColour;
// the index of the column currently used for sorting or -1
int m_sortingColumnIdx;

View File

@ -4,7 +4,7 @@
// Author: Andreas Pflug
// Modified by:
// Created: 2005-01-19
// RCS-ID: $Id: datectrl.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: datectrl.h 70736 2012-02-28 14:41:30Z VZ $
// Copyright: (c) 2005 Andreas Pflug <pgadmin@pse-consulting.de>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -82,6 +82,10 @@ private:
void OnSize(wxSizeEvent& event);
void OnFocus(wxFocusEvent& event);
#ifdef __WXOSX_COCOA__
virtual void OSXGenerateEvent(const wxDateTime& WXUNUSED(dt)) { }
#endif
wxComboCtrl* m_combo;
wxCalendarComboPopup* m_popup;

View File

@ -3,7 +3,7 @@
// Purpose: wxDataViewRenderer for generic wxDataViewCtrl implementation
// Author: Robert Roebling, Vadim Zeitlin
// Created: 2009-11-07 (extracted from wx/generic/dataview.h)
// RCS-ID: $Id: dvrenderer.h 67099 2011-03-01 12:16:49Z VS $
// RCS-ID: $Id: dvrenderer.h 69473 2011-10-19 16:20:17Z VS $
// Copyright: (c) 2006 Robert Roebling
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
@ -41,23 +41,16 @@ public:
// implementation
// These callbacks are used by generic implementation of wxDVC itself.
// They're different from the corresponding Activate/LeftClick() methods
// which should only be overridable for the custom renderers while the
// generic implementation uses these ones for all of them, including the
// standard ones.
// This callback is used by generic implementation of wxDVC itself. It's
// different from the corresponding ActivateCell() method which should only
// be overridable for the custom renderers while the generic implementation
// uses this one for all of them, including the standard ones.
virtual bool WXOnActivate(const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col))
{ return false; }
virtual bool WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
virtual bool WXActivateCell(const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col),
const wxMouseEvent* WXUNUSED(mouseEvent))
{ return false; }
private:

View File

@ -3,7 +3,7 @@
// Purpose: All generic wxDataViewCtrl renderer classes
// Author: Robert Roebling, Vadim Zeitlin
// Created: 2009-11-07 (extracted from wx/generic/dataview.h)
// RCS-ID: $Id: dvrenderers.h 67099 2011-03-01 12:16:49Z VS $
// RCS-ID: $Id: dvrenderers.h 69473 2011-10-19 16:20:17Z VS $
// Copyright: (c) 2006 Robert Roebling
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
@ -26,21 +26,13 @@ public:
// see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h
virtual bool WXOnActivate(const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col)
virtual bool WXActivateCell(const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col,
const wxMouseEvent *mouseEvent)
{
return Activate(cell, model, item, col);
}
virtual bool WXOnLeftClick(const wxPoint& cursor,
const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem &item,
unsigned int col)
{
return LeftClick(cursor, cell, model, item, col);
return ActivateCell(cell, model, item, col, mouseEvent);
}
private:
@ -67,9 +59,9 @@ public:
// in-place editing
virtual bool HasEditorCtrl() const;
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
protected:
wxString m_text;
@ -121,11 +113,11 @@ public:
wxSize GetSize() const;
// Implementation only, don't use nor override
virtual bool WXOnLeftClick(const wxPoint& cursor,
const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col);
virtual bool WXActivateCell(const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col,
const wxMouseEvent *mouseEvent);
private:
bool m_toggle;
@ -177,9 +169,9 @@ public:
virtual wxSize GetSize() const;
virtual bool HasEditorCtrl() const { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
private:
wxDataViewIconText m_value;
@ -188,36 +180,5 @@ protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
};
// ---------------------------------------------------------
// wxDataViewDateRenderer
// ---------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewRenderer
{
public:
wxDataViewDateRenderer( const wxString &varianttype = wxT("datetime"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
int align = wxDVR_DEFAULT_ALIGNMENT );
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant& value ) const;
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
// Implementation only, don't use nor override
virtual bool WXOnActivate(const wxRect& cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col);
private:
wxDateTime m_date;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
};
#endif // _WX_GENERIC_DVRENDERERS_H_

View File

@ -5,7 +5,7 @@
// Modified by:
// Created: 14/4/2006
// Copyright: (c) Francesco Montorsi
// RCS-ID: $Id: filepickerg.h 63690 2010-03-16 00:23:57Z VZ $
// RCS-ID: $Id: filepickerg.h 70043 2011-12-18 12:34:47Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@ -49,7 +49,7 @@ public:
virtual wxControl *AsControl() { return this; }
public: // overrideable
public: // overridable
virtual wxDialog *CreateDialog() = 0;
@ -58,6 +58,8 @@ public: // overrideable
virtual wxEventType GetEventType() const = 0;
virtual void SetInitialDirectory(const wxString& dir);
public:
bool Create(wxWindow *parent, wxWindowID id,
@ -82,6 +84,9 @@ protected:
// just doesn't make sense to use picker styles for wxButton anyhow
long m_pickerStyle;
// Initial directory set by SetInitialDirectory() call or empty.
wxString m_initialDir;
private:
// common part of all ctors
void Init() { m_pickerStyle = -1; }
@ -114,7 +119,7 @@ public:
pos, size, style, validator, name);
}
public: // overrideable
public: // overridable
virtual long GetDialogStyle() const
{
@ -140,16 +145,7 @@ public: // overrideable
return filedlgstyle;
}
virtual wxDialog *CreateDialog()
{
wxFileDialog *p = new wxFileDialog(GetDialogParent(), m_message,
wxEmptyString, wxEmptyString,
m_wildcard, GetDialogStyle());
// this sets both the default folder and the default file of the dialog
p->SetPath(m_path);
return p;
}
virtual wxDialog *CreateDialog();
wxEventType GetEventType() const
{ return wxEVT_COMMAND_FILEPICKER_CHANGED; }
@ -160,6 +156,10 @@ protected:
void UpdatePathFromDialog(wxDialog *p)
{ m_path = wxStaticCast(p, wxFileDialog)->GetPath(); }
// Set the initial directory for the dialog but without overriding the
// directory of the currently selected file, if any.
void DoSetInitialDirectory(wxFileDialog* dialog, const wxString& dir);
private:
DECLARE_DYNAMIC_CLASS(wxGenericFileButton)
};
@ -190,7 +190,7 @@ public:
pos, size, style, validator, name);
}
public: // overrideable
public: // overridable
virtual long GetDialogStyle() const
{
@ -204,11 +204,7 @@ public: // overrideable
return dirdlgstyle;
}
virtual wxDialog *CreateDialog()
{
return new wxDirDialog(GetDialogParent(), m_message, m_path,
GetDialogStyle());
}
virtual wxDialog *CreateDialog();
wxEventType GetEventType() const
{ return wxEVT_COMMAND_DIRPICKER_CHANGED; }

Some files were not shown because too many files have changed in this diff Show More