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

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

?? porting.tex

?? wxWidgets 是一個跨平臺的 GUI 框架。它給開發人員提供了統一的接口
?? 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一区二区三区免费野_久草精品视频
日韩黄色一级片| 欧美在线观看一区二区| 972aa.com艺术欧美| 日韩写真欧美这视频| 中文字幕一区二区三中文字幕| 蜜臀国产一区二区三区在线播放| 91丝袜国产在线播放| 久久久久久久一区| 蜜桃av噜噜一区二区三区小说| 色av成人天堂桃色av| 欧美国产一区视频在线观看| 国模无码大尺度一区二区三区| 欧美日韩一区二区三区在线| 亚洲人成精品久久久久| 欧美丰满高潮xxxx喷水动漫| 中文字幕一区二区三区在线播放| 黄一区二区三区| 日韩欧美国产一区二区三区| 午夜激情一区二区三区| 日本高清不卡一区| 一区二区免费在线| 91在线观看下载| 亚洲婷婷综合色高清在线| 丁香天五香天堂综合| 精品久久久三级丝袜| 蜜臀av在线播放一区二区三区| 4hu四虎永久在线影院成人| 香蕉av福利精品导航| 欧美亚洲日本一区| 亚洲午夜在线电影| 欧美精品乱人伦久久久久久| 亚洲成人av在线电影| 欧美日本在线播放| 视频一区二区三区入口| 欧美丰满一区二区免费视频| 日韩制服丝袜av| 日韩精品专区在线影院观看 | 亚洲精品日韩专区silk| 成人蜜臀av电影| 亚洲男人天堂av网| 欧美吻胸吃奶大尺度电影 | 国产精品视频观看| 99久久婷婷国产综合精品电影| 国产精品欧美久久久久一区二区| 91麻豆自制传媒国产之光| 亚洲一区二区三区四区五区黄| 欧美影院一区二区| 日日嗨av一区二区三区四区| 精品久久久久久久久久久久包黑料| 精品一区二区三区在线播放视频| 国产无遮挡一区二区三区毛片日本| 99久久婷婷国产综合精品电影| 一区av在线播放| 欧美一级欧美一级在线播放| 国产精品一区一区| 亚洲免费av高清| 欧美一区二区在线播放| 国产精品一二三四| 伊人色综合久久天天| 精品久久人人做人人爰| 91麻豆国产福利精品| 蜜臀精品久久久久久蜜臀| 日本一区二区久久| 在线观看91av| 成人av在线网| 麻豆国产欧美一区二区三区| 日本一区二区免费在线| 国产精品护士白丝一区av| 欧日韩精品视频| 国产精品性做久久久久久| 一区二区视频免费在线观看| 日韩写真欧美这视频| 色偷偷久久一区二区三区| 久久成人麻豆午夜电影| 一区二区三区久久| 国产亚洲欧美一区在线观看| 欧美在线你懂得| 国产成人免费在线观看不卡| 日韩国产欧美三级| 最新中文字幕一区二区三区| 精品久久人人做人人爱| 欧美日韩久久久| 99久久伊人久久99| 国产一区美女在线| 日韩成人午夜精品| 亚洲欧美国产毛片在线| 久久精品视频免费观看| 制服丝袜中文字幕一区| 日本二三区不卡| 99久久99久久精品免费观看| 国产一区91精品张津瑜| 久久99精品一区二区三区| 性欧美疯狂xxxxbbbb| 一区二区三区在线免费播放| 国产日产欧美一区| 久久综合九色综合97_久久久| 欧美久久久影院| 欧美色倩网站大全免费| 色偷偷久久一区二区三区| 波多野结衣一区二区三区 | 国产亚洲欧美日韩在线一区| 在线91免费看| 69成人精品免费视频| 欧美色爱综合网| 欧美日韩国产免费一区二区| 在线视频国内一区二区| 91久久久免费一区二区| 在线观看国产一区二区| 色婷婷久久久综合中文字幕 | 国产91在线看| 国内精品视频一区二区三区八戒| 麻豆国产精品一区二区三区 | 精品系列免费在线观看| 另类小说视频一区二区| 免费欧美日韩国产三级电影| 日本欧美久久久久免费播放网| 免费日本视频一区| 久久国产精品99久久久久久老狼 | 麻豆精品久久精品色综合| 免费高清视频精品| 麻豆精品在线视频| 精品一区二区影视| 国产成人午夜视频| 99视频超级精品| 91久久精品午夜一区二区| 欧美在线观看视频一区二区| 欧美日韩精品一区二区天天拍小说| 欧美男女性生活在线直播观看| 91精品婷婷国产综合久久竹菊| 日韩欧美一区二区三区在线| 精品成人一区二区三区| 欧美国产一区二区| 亚洲美女视频一区| 青青草国产精品97视觉盛宴 | 蜜桃视频一区二区三区 | 在线免费精品视频| 欧美一区二区三区小说| 久久久777精品电影网影网 | 欧美怡红院视频| 欧美成人一区二区三区| 国产精品美女久久久久aⅴ| 亚洲永久免费视频| 日韩国产高清在线| 不卡一区二区三区四区| 欧美日韩一区国产| 久久久激情视频| 亚洲精品国产a| 美女网站色91| 99re热视频这里只精品| 日韩三级伦理片妻子的秘密按摩| 国产欧美一区二区精品性色超碰 | 欧美日韩极品在线观看一区| 欧美xxxxxxxx| 一区二区三区欧美日| 极品瑜伽女神91| 91丨九色丨黑人外教| 日韩欧美另类在线| 中文字幕视频一区二区三区久| 日韩高清欧美激情| 99久精品国产| 国产日韩欧美麻豆| 美女国产一区二区| 欧美影院一区二区| 国产精品美女一区二区三区| 久久成人免费网| 56国语精品自产拍在线观看| 亚洲色图丝袜美腿| 国产91丝袜在线播放| 欧美一区二区三区四区视频| 亚洲自拍欧美精品| 成人国产精品免费观看动漫| 精品噜噜噜噜久久久久久久久试看 | 91猫先生在线| 国产亚洲婷婷免费| 激情文学综合网| 日韩欧美二区三区| 午夜精品久久久久久久99水蜜桃| 99精品欧美一区二区三区综合在线| 欧美成人bangbros| 色天天综合久久久久综合片| 亚洲国产精品国自产拍av| 日本欧美在线观看| 欧美三级韩国三级日本三斤| 一区精品在线播放| 成人美女视频在线看| 国产欧美一区二区精品性色超碰| 久久精品国产免费| 91精品国产综合久久香蕉的特点| 一区二区不卡在线播放 | 亚洲一线二线三线视频| 99精品欧美一区| 亚洲国产精品激情在线观看| 国产剧情一区二区| 久久精品一区二区三区四区| 国产综合成人久久大片91| 日韩三级免费观看| 国产一区二区三区| 久久久久久久久久久99999| 黑人精品欧美一区二区蜜桃| 欧美大片拔萝卜|