XPEHOMETP
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Взято из справки к wxWidgets: wxWidgets 2.7.1: A portable C++ and Python GUI toolkit (CHM файл) Цитата: Strategies for portability -------------------------------------------------------------------------------- Use relative positioning or constraints Don't use absolute panel item positioning if you can avoid it. Different GUIs have very differently sized panel items. Consider using the constraint system, although this can be complex to program. Alternatively, you could use alternative .wrc (wxWidgets resource files) on different platforms, with slightly different dimensions in each. Or space your panel items out to avoid problems. -------------------------------------------------------------------------------- Use wxWidgets resource files Use .xrc (wxWidgets resource files) where possible, because they can be easily changed independently of source code. | В общем, для полной переносимости ГУЕв сами разработчики советуют пихать их в файлы ресурсов, причем корректировать их при необходимости. Кроме того, нужно учесть еще такое свойство этой библиотеки: Цитата: wxWidgets and Object-Oriented Programming Like all modern GUI frameworks, wxWidgets benefits from heavy use of object-oriented programming concepts. Each window is represented as a C++ object; these objects have well-defined behavior, and can receive and react to events. What the user sees is the visual manifestation of this interacting system of objects. Your job as a developer is to orchestrate these objects' collective behavior, a task made easier by the default behaviors that wxWidgets implements for you. | Взято из: Cross-Platform GUI Programming with wxWidgets By Julian Smart, Kevin Hock, Stefan Csomor. Prentice Hall PTR (2005) (скачал у китайцев) Так что, похоже, простым вызовом функций ограничиться не дадут. Правда, я не пробовал... Да, из той же книжечки - пример того, как делается кнопка с помощью процедурного программирования и как - с помощью объектно-ориентированного: Цитата: wxButton(); wxButton(wxWindow* parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("button")); The following example of one-step construction takes advantage of all the constructor's default values: wxButton* button = new wxButton(parent, wxID_OK); | В общем, простой вызов функций - это дебри, почище тех, что выращены Мелкомягкими. Опять же нужно для такого вызова сишные хедеры переводить на фортран; сомневаюсь, чтобы это было сделано. | Всего записей: 2485 | Зарегистр. 21-06-2005 | Отправлено: 20:59 10-02-2007 | Исправлено: XPEHOMETP, 21:01 10-02-2007 |
|