wx/wx.h 头文件的使用
说明
wx.h包括了全部必须的wxWindows头文件,只需要一次包含,就可以完全使用wxwindows封装的所有对象,而不需要理会当前对象所属的头文件。当然你也可以有选择的为每一个控件包含相应的头文件
比如为了使用
wxTimerEvent,必须包含wx/event.h
wxTimer,必须包含wx/timer.h
wxPanel,必须包含wx/panel.h
推荐
在头文件中,调用#include "wx/wx.h"
提醒
当编译器支持预处理器时,可以使用wxprec头文件。当它不支持时,应该包含wx/wx.h
源码
#ifndef _WX_WX_H_
#define _WX_WX_H_
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/dynarray.h"
#include "wx/list.h"
#include "wx/hash.h"
#include "wx/string.h"
#include "wx/hashmap.h"
#include "wx/arrstr.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/stream.h"
#include "wx/memory.h"
#include "wx/math.h"
#include "wx/stopwatch.h"
#include "wx/timer.h"
#include "wx/module.h"
#include "wx/wxcrt.h"
#include "wx/wxcrtvararg.h"
#if wxUSE_GUI
#include "wx/window.h"
#include "wx/containr.h"
#include "wx/panel.h"
#include "wx/toplevel.h"
#include "wx/frame.h"
#include "wx/gdicmn.h"
#include "wx/gdiobj.h"
#include "wx/region.h"
#include "wx/bitmap.h"
#include "wx/image.h"
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/dcscreen.h"
#include "wx/button.h"
#include "wx/menuitem.h"
#include "wx/menu.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/cursor.h"
#include "wx/dialog.h"
#include "wx/settings.h"
#include "wx/msgdlg.h"
#include "wx/dataobj.h"
#include "wx/control.h"
#include "wx/ctrlsub.h"
#include "wx/bmpbuttn.h"
#include "wx/checkbox.h"
#include "wx/checklst.h"
#include "wx/choice.h"
#include "wx/scrolbar.h"
#include "wx/stattext.h"
#include "wx/statbmp.h"
#include "wx/statbox.h"
#include "wx/listbox.h"
#include "wx/radiobox.h"
#include "wx/radiobut.h"
#include "wx/textctrl.h"
#include "wx/slider.h"
#include "wx/gauge.h"
#include "wx/scrolwin.h"
#include "wx/dirdlg.h"
#include "wx/toolbar.h"
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/sizer.h"
#include "wx/statusbr.h"
#include "wx/choicdlg.h"
#include "wx/textdlg.h"
#include "wx/filedlg.h"
// this one is included by exactly one file (mdi.cpp) during
wx build so even
// although we keep it here for the library users, don‘t
include it to avoid
// bloating the PCH and (worse) rebuilding the entire library
when it changes
// when building the library itself
#ifndef WXBUILDING
#include "wx/mdi.h"
#endif
// always include, even if !wxUSE_VALIDATORS because we need
wxDefaultValidator
#include "wx/validate.h"
#if wxUSE_VALIDATORS
#include "wx/valtext.h"
#endif // wxUSE_VALIDATORS
#endif // wxUSE_GUI
#endif // _WX_WX_H_