FOX toolkit
| FOX Toolkit | |
|---|---|
| | |
| | |
| Тип | библиотека элементов интерфейса (виджетов) |
| Разработчики | Jeroen van der Zijp, FOX community |
| Написана на | C++ |
| Операционная система | Кроссплатформенное ПО |
| Последняя версия | 1.6.57 (4 апреля 2018) |
| Тестовая версия | 1.7.81 (13 ноября 2022) |
| Лицензия | LGPL |
| Сайт | www.fox-toolkit.org |
FOX Toolkit — кроссплатформенная библиотека инструментов с открытым исходным кодом (лицензия LGPL) для построения графического интерфейса пользователя[1].
Это достаточно быстрый пакет, который содержит большое число элементов GUI и поддержку OpenGL[2]. Язык разработки — C++, также существуют привязки к Ruby[3], Python, Eiffel.
Примеры
C/C++
Пример программы «Hello World» на C/C++ (он же hello.cpp в папке tests):
#include "fx.h"
#include "FXExpression.h"
int main(int argc, char **argv) {
FXApp application("Hello","FoxTest");
application.init(argc,argv);
FXMainWindow *main=new FXMainWindow(&application,"Hello",NULL,NULL,DECOR_ALL);
new FXButton(main,"&Hello, World!",NULL,&application,FXApp::ID_QUIT);
application.create();
main->show(PLACEMENT_SCREEN);
return application.run();
}
Ruby
Пример «Hello World» на FxRuby, привязки FOX toolkit к Ruby.
require 'fox16'
include Fox
application = FXApp.new("Hello", "FoxTest")
main = FXMainWindow.new(application, "Hi", nil, nil, DECOR_ALL)
FXButton.new(main, "&Hello, World!", nil, application, FXApp::ID_QUIT,
LAYOUT_FILL_X | BUTTON_TOOLBAR | FRAME_RAISED | FRAME_THICK)
application.create()
main.show(PLACEMENT_SCREEN)
application.run()
Python
Пример программы «Hello World» на FXPy, привязки FOX toolkit к Python 2.2:
#! /usr/bin/env python
from FXPy.fox import *
import sys
def runme():
app = FXApp('Hello', 'Test')
app.init(sys.argv)
main = FXMainWindow(app, 'Hello', None, None, DECOR_ALL)
button = FXButton(main, '&Hello, World!', None, app, FXApp.ID_QUIT);
app.create()
main.show(PLACEMENT_SCREEN)
app.run()
if __name__ == '__main__':
runme()
См. также
Примечания
- ↑ Michael Tschater. Платформонезависимая разработка программ // LinuxFocus Magazine. — 2004. — Октябрь. Архивировано 16 октября 2018 года.
- ↑ GUI and Graphics - NCBI C++ Toolkit Book. ncbi.github.io. Дата обращения: 23 января 2019. Архивировано 23 января 2019 года.
- ↑ David Berube. Ch. 11. Creating Graphical User Interfaces with fxruby // Practical Ruby Gems. — Apress, 2007. — С. 95-102. — 268 с. — ISBN 9781430201939. — [Архивировано 23 января 2019 года.]
Ссылки
- FOXTOOLKIT. Дата обращения: 10 апреля 2009. Архивировано из оригинала 12 февраля 2012 года.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.