亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? porting.tex

?? 很牛的GUI源碼wxWidgets-2.8.0.zip 可在多種平臺下運行.
?? TEX
?? 第 1 頁 / 共 2 頁
字號:
\chapter{Porting from wxWidgets 1.xx}\label{porting}This addendum gives guidelines and tips for porting applications fromversion 1.xx of wxWidgets to version 2.0.The first section offers tips for writing 1.xx applications in a way tominimize porting time. The following sections detail the changes andhow you can modify your application to be 2.0-compliant.You may be worrying that porting to 2.0 will be a lot of work,particularly if you have only recently started using 1.xx. In fact,the wxWidgets 2.0 API has far more in common with 1.xx than it has differences.The main challenges are using the new event system, doing without the defaultpanel item layout, and the lack of automatic labels in some controls.Please don't be freaked out by the jump to 2.0! For one thing, 1.xx is still availableand will be supported by the user community for some time. And when you havechanged to 2.0, we hope that you will appreciate the benefits in termsof greater flexibility, better user interface aesthetics, improved C++ conformance,improved compilation speed, and many other enhancements. The revised architectureof 2.0 will ensure that wxWidgets can continue to evolve for the foreseeablefuture.{\it Please note that this document is a work in progress.}\section{Preparing for version 2.0}\label{portingpreparing}Even before compiling with version 2.0, there's also a lot you can do right now to make portingrelatively simple. Here are a few tips.\begin{itemize}\item {\bf Use constraints or .wxr resources} for layout, rather than the default layout scheme.Constraints should be the same in 2.0, and resources will be translated.\item {\bf Use separate wxMessage items} instead of labels for wxText, wxMultiText,wxChoice, wxComboBox. These labels will disappear in 2.0. Use separatewxMessages whether you're creating controls programmatically or usingthe dialog editor. The future dialog editor will be able to translatefrom old to new more accurately if labels are separated out.\item {\bf Parameterise functions that use wxDC} or derivatives, i.e. make the wxDCan argument to all functions that do drawing. Minimise the use ofwxWindow::GetDC and definitely don't store wxDCs long-termbecause in 2.0, you can't use GetDC() and wxDCs are not persistent.You will use wxClientDC, wxPaintDC stack objects instead. Minimisingthe use of GetDC() will ensure that there are very few places youhave to change drawing code for 2.0.\item {\bf Don't set GDI objects} (wxPen, wxBrush etc.) in windows or wxCanvasDCs before they'reneeded (e.g. in constructors) - do so within your drawing routine instead. In2.0, these settings will only take effect between the construction and destructionof temporary wxClient/PaintDC objects.\item {\bf Don't rely} on arguments to wxDC functions being floating point - they willbe 32-bit integers in 2.0.\item {\bf Don't use the wxCanvas member functions} that duplicate wxDC functions, such as SetPen and DrawLine, sincethey are going.\item {\bf Using member callbacks} called from global callback functions will make the transitioneasier - see the FAQfor some notes on using member functions for callbacks. wxWidgets 2.0 will banish globalcallback functions (and OnMenuCommand), and nearly all event handling will be done by functions taking a single event argument.So in future you will have code like:{\small\begin{verbatim}void MyFrame::OnOK(wxCommandEvent& event){        ...}\end{verbatim}}%You may find that writing the extra code to call a member function isn't worth it at this stage,but the option is there.\item {\bf Use wxString wherever possible.} 2.0 replaces char * with wxStringin most cases, and if you use wxString to receive strings returned fromwxWidgets functions (except when you need to save the pointer if deallocation is required), there shouldbe no conversion problems later on.\item Be aware that under Windows, {\bf font sizes will change} to match standard Windowsfont sizes (for example, a 12-point font will appear bigger than before). Write your applicationto be flexible where fonts are concerned.Don't rely on fonts being similarly-sized across platforms, as they were (by chance) betweenWindows and X under wxWidgets 1.66. Yes, this is not easy... but I think it is better to conform to thestandards of each platform, and currently the size difference makes it difficult toconform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensatefor size differences. The old font sizing will still be available via wx\_setup.h, so do not panic...\item {\bf Consider dropping wxForm usage}:wxPropertyFormView can be used in a wxForm-like way, except that you specify a pre-constructed panelor dialog; or you can use a wxPropertyListView to show attributes in a scrolling list - you don't even needto lay panel items out.Because wxForm uses a number of features to be dropped in wxWidgets 2.0, it cannot besupported in the future, at least in its present state.\item {\bf When creating a wxListBox}, put the wxLB\_SINGLE, wxLB\_MULTIPLE, wxLB\_EXTENDED styles in the window style parameter, and putzero in the {\it multiple} parameter. The {\it multiple} parameter will be removed in 2.0.\item {\bf For MDI applications}, don't reply on MDI being run-time-switchable in the way that theMDI sample is. In wxWidgets 2.0, MDI functionality is separated into distinct classes.\end{itemize}\section{The new event system}\label{portingeventsystem}The way that events are handled has been radically changed in wxWidgets 2.0. Pleaseread the topic `Event handling overview' in the wxWidgets 2.0 manual for backgroundon this.\subsection{Callbacks}Instead of callbacks for panel items, menu command events, control commands and other events are directed tothe originating window, or an ancestor, or an event handler that has been plugged into the windowor its ancestor. Event handlers always have one argument, a derivative of wxEvent.For menubar commands, the {\bf OnMenuCommand} member function will be replaced by a series of separate member functions,each of which responds to a particular command. You need to add these (non-virtual) functions to yourframe class, add a DECLARE\_EVENT\_TABLE entry to the class, and then add an event table toyour implementation file, as a BEGIN\_EVENT\_TABLE and END\_EVENT\_TABLE block. Theindividual event mapping macros will be of the form:\begin{verbatim}BEGIN_EVENT_TABLE(MyFrame, wxFrame)    EVT_MENU(MYAPP_NEW, MyFrame::OnNew)    EVT_MENU(wxID_EXIT, MyFrame::OnExit)END_EVENT_TABLE()\end{verbatim}Control commands, such as button commands, can be routed to a derived button class,the parent window, or even the frame. Here, you use a function of the form EVT\_BUTTON(id, func).Similar macros exist for other control commands.\subsection{Other events}To intercept other events, you used to override virtual functions, such as OnSize. Now, while you can usethe OnSize name for such event handlers (or any other name of your choice), it has only a single argument(wxSizeEvent) and must again be `mapped' using the EVT\_SIZE macro. The same goes for all other events,including OnClose (although in fact you can still use the old, virtual form of OnClose for the time being).\section{Class hierarchy}\label{portingclasshierarchy}The class hierarchy has changed somewhat. wxToolBar and wxButtonBarclasses have been split into several classes, and are derived from wxControl (which wascalled wxItem). wxPanel derives from wxWindow instead of from wxCanvas, which hasdisappeared in favour of wxScrolledWindow (since all windows are now effectively canvaseswhich can be drawn into). The status bar has become a class in its own right, wxStatusBar.There are new MDI classes so that wxFrame does not have to be overloaded with thisfunctionality.There are new device context classes, with wxPanelDC and wxCanvasDC disappearing.See \helpref{Device contexts and painting}{portingdc}.\section{GDI objects}\label{portinggdiobjects}These objects - instances of classes such as wxPen, wxBrush, wxBitmap (but not wxColour) -are now implemented with reference-counting. This makes assignment a very cheap operation,and also means that management of the resource is largely automatic. You now pass {\it references} toobjects to functions such as wxDC::SetPen, not pointers, so you will need to dereference your pointers.The device context does not store a copy of the penitself, but takes a copy of it (via reference counting), and the object's data gets freed upwhen the reference count goes to zero. The application does not have to worry so much aboutwho the object belongs to: it can pass the reference, then destroy the object withoutleaving a dangling pointer inside the device context.For the purposes of code migration, you can use the old style of object management - maintainingpointers to GDI objects, and using the FindOrCreate... functions. However, it is preferable tokeep this explicit management to a minimum, instead creating objects on the fly as needed, on the stack,unless this causes too much of an overhead in your application.At a minimum, you will have to make sure that calls to SetPen, SetBrush etc. work. Also, where you pass NULL to thesefunctions, you will need to use an identifier such as wxNullPen or wxNullBrush.\section{Dialogs and controls}\label{portingdialogscontrols}\wxheading{Labels}Most controls no longer have labels and values as they used to in 1.xx. Instead, labelsshould be created separately using wxStaticText (the new name for wxMessage). This willneed some reworking of dialogs, unfortunately; programmatic dialog creation that doesn'tuse constraints will be especially hard-hit. Perhaps take this opportunity to make moreuse of dialog resources or constraints. Or consider using the wxPropertyListView classwhich can do away with dialog layout issues altogether by presenting a list of editableproperties.\wxheading{Constructors}All window constructors have two main changes, apart from the label issue mentioned above.Windows now have integer identifiers; and position and size are now passed as wxPoint andwxSize objects. In addition, some windows have a wxValidator argument.\wxheading{Show versus ShowModal}If you have used or overridden the {\bf wxDialog::Show} function in the past, you may findthat modal dialogs no longer work as expected. This is because the function for modal showingis now {\bf wxDialog:ShowModal}. This is part of a more fundamental change in which acontrol may tell the dialog that it caused the dismissal of a dialog, bycalling {\bf wxDialog::EndModal} or {\bf wxWindow::SetReturnCode}. Using thisinformation, {\bf ShowModal} now returns the id of the control that caused dismissal,giving greater feedback to the application than just true or false.If you overrode or called {\bf wxDialog::Show}, use {\bf ShowModal} and test for a returned identifier,commonly wxID\_OK or wxID\_CANCEL.\wxheading{wxItem}This is renamed wxControl.\wxheading{wxText, wxMultiText and wxTextWindow}These classes no longer exist and are replaced by the single class wxTextCtrl.Multi-line text items are created using the wxTE\_MULTILINE style.\wxheading{wxButton}Bitmap buttons are now a separate class, instead of being part of wxBitmap.\wxheading{wxMessage}Bitmap messages are now a separate class, wxStaticBitmap, and wxMessageis renamed wxStaticText.\wxheading{wxGroupBox}wxGroupBox is renamed wxStaticBox.\wxheading{wxForm}Note that wxForm is no longer supported in wxWidgets 2.0. Consider using the wxPropertyFormView classinstead, which takes standard dialogs and panels and associates controls with property objects.You may also find that the new validation method, combined with dialog resources, is easierand more flexible than using wxForm.\section{Device contexts and painting}\label{portingdc}In wxWidgets 2.0, device contexts are used for drawing into, as per 1.xx, but the waythey are accessed and constructed is a bit different.You no longer use {\bf GetDC} to access device contexts for panels, dialogs and canvases.Instead, you create a temporary device context, which means that any window or control can be drawninto. The sort of device context you create depends on where your code is called from. Ifpainting within an {\bf OnPaint} handler, you create a wxPaintDC. If not within an {\bf OnPaint} handler,you use a wxClientDC or wxWindowDC. You can still parameterise your drawing code so that itdoesn't have to worry about what sort of device context to create - it uses the DC it is passed

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区中文视频| 欧美日韩亚洲不卡| 精品国产99国产精品| 久久精品国产亚洲高清剧情介绍 | 国产麻豆精品一区二区| 欧美成人精品3d动漫h| 国内国产精品久久| 国产欧美一区二区精品性色超碰 | 欧美日韩免费观看一区三区| 一区二区三区欧美激情| 欧美精品一二三| 久久精品免费观看| 国产女人18水真多18精品一级做| 国产成人av电影在线| 亚洲美腿欧美偷拍| 欧美一区二区三区日韩视频| 韩国精品在线观看| 国产一区二区福利视频| 国产精品国产三级国产a| 欧美中文一区二区三区| 久久精品国产精品亚洲综合| 欧美韩国日本综合| 精品1区2区3区| 国产美女久久久久| 亚洲免费av高清| 欧美电影免费观看高清完整版在| 国产精品一区二区x88av| 亚洲天堂av一区| 777奇米成人网| 成人av影院在线| 肉色丝袜一区二区| 欧美激情在线观看视频免费| 欧美日韩一区不卡| 懂色一区二区三区免费观看| 亚洲成人福利片| 欧美经典一区二区| 欧美精品tushy高清| 成人一级片网址| 免费看日韩精品| 一区二区三区中文免费| 精品欧美久久久| 欧洲视频一区二区| 成人性视频网站| 日本网站在线观看一区二区三区| 国产精品三级av| 香蕉加勒比综合久久| 久久综合资源网| 欧美美女一区二区| 不卡一区二区三区四区| 性做久久久久久久免费看| 国产精品久久久久久久午夜片| 91精品视频网| 欧美最新大片在线看| 国产成人av电影在线| 麻豆精品一二三| 五月婷婷综合在线| 自拍偷拍亚洲综合| 国产日韩欧美一区二区三区综合| 91麻豆精品国产无毒不卡在线观看| caoporm超碰国产精品| 激情小说亚洲一区| 日韩黄色免费网站| 亚洲一区二区三区中文字幕在线| 欧美国产97人人爽人人喊| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩国产另类一区| 91丨九色丨蝌蚪丨老版| 成人午夜在线免费| 国产精品中文字幕日韩精品| 日韩影院在线观看| 日韩激情视频在线观看| 五月天视频一区| 五月激情六月综合| 亚洲一区二区在线播放相泽| 亚洲精品视频自拍| 中文字幕亚洲一区二区va在线| 欧美国产成人在线| 国产精品第五页| 国产精品美女久久久久久 | 在线视频中文字幕一区二区| 成人免费黄色在线| 成人动漫一区二区三区| 国产69精品久久久久777| 成人一区二区在线观看| 成人免费av网站| va亚洲va日韩不卡在线观看| 99国产精品久久久久久久久久| jlzzjlzz亚洲女人18| av亚洲精华国产精华精| 91在线视频观看| 色欧美88888久久久久久影院| 色哟哟一区二区三区| 国产亚洲精品福利| 中文一区在线播放| 亚洲日本在线观看| 亚洲一区二区三区四区在线观看 | 色婷婷狠狠综合| 色菇凉天天综合网| 6080日韩午夜伦伦午夜伦| 日韩欧美国产小视频| 久久久美女艺术照精彩视频福利播放| 久久久亚洲精品石原莉奈| 国产日韩欧美综合一区| 亚洲美女在线一区| 日日嗨av一区二区三区四区| 老司机精品视频在线| 懂色一区二区三区免费观看| 一本大道av一区二区在线播放| 欧美午夜精品久久久久久孕妇 | 成人黄色网址在线观看| 91丨porny丨在线| 在线综合亚洲欧美在线视频| 久久蜜桃香蕉精品一区二区三区| 国产精品福利一区| 午夜天堂影视香蕉久久| 国产伦理精品不卡| 在线精品亚洲一区二区不卡| 日韩亚洲欧美在线| 国产午夜久久久久| 午夜精品一区在线观看| 国产麻豆精品在线| 精品视频1区2区| 久久精品人人做人人综合| 亚洲与欧洲av电影| 国产高清不卡一区二区| 欧美性做爰猛烈叫床潮| 久久久美女毛片| 一区二区三区加勒比av| 国产精品99久久不卡二区| 欧美日韩在线直播| 国产精品久久久久影视| 久久精品国产精品亚洲综合| 一本到一区二区三区| 久久亚洲综合av| 日韩精品乱码免费| 色呦呦国产精品| 中文字幕乱码日本亚洲一区二区 | 日本在线不卡一区| 99在线精品一区二区三区| 日韩欧美aaaaaa| 亚洲一卡二卡三卡四卡五卡| 国产精品 日产精品 欧美精品| 欧美日产国产精品| 亚洲精品乱码久久久久久久久| 韩国成人在线视频| 91精品国产色综合久久不卡蜜臀 | 欧美日韩国产高清一区二区三区| 国产拍欧美日韩视频二区| 蜜桃精品在线观看| 欧美日韩成人在线| 亚洲欧美日韩国产另类专区| 日韩一区二区三区电影| 一区二区免费看| 99re6这里只有精品视频在线观看| 久久嫩草精品久久久精品一| 奇米影视一区二区三区小说| 欧美日韩一卡二卡三卡 | 一区二区三区在线视频免费 | 99视频精品在线| 国产偷国产偷精品高清尤物| 日韩和的一区二区| 欧美午夜宅男影院| 亚洲影视资源网| 欧洲国内综合视频| 亚洲国产综合人成综合网站| 91麻豆文化传媒在线观看| 欧美国产日产图区| 国产成人av一区二区三区在线观看| 欧美一级在线免费| 六月丁香婷婷久久| 日韩免费观看高清完整版在线观看| 婷婷综合五月天| 69成人精品免费视频| 日本不卡不码高清免费观看| 91精品国产综合久久久久久久久久| 亚洲一区二区三区在线| 欧美偷拍一区二区| 午夜精品久久久久久久久| 欧美顶级少妇做爰| 人人狠狠综合久久亚洲| 欧美不卡一区二区三区四区| 激情六月婷婷综合| 中文字幕国产精品一区二区| 成人理论电影网| 一区二区三区国产精华| 欧美日韩极品在线观看一区| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩三级高清在线| 国产高清不卡一区| 椎名由奈av一区二区三区| 日本福利一区二区| 天天影视色香欲综合网老头| 欧美一级黄色片| 国产suv精品一区二区三区| 最新国产成人在线观看| 欧美综合久久久| 精品一区二区久久| 国产精品免费视频网站| 欧美午夜精品理论片a级按摩| 蜜桃免费网站一区二区三区|