用於顯示位圖和處理按鈕按下的簡單框架 (Simple Frameworks for Displaying Bitmaps and Handling Button Presses)


問題描述

顯示位圖和處理按鈕按下的簡單框架 (Simple Frameworks for Displaying Bitmaps and Handling Button Presses)

我們有一組應用程序,它們基本上顯示一堆位圖和文本,然後允許用戶按下導致動作發生的“按鈕”(某些位圖)。

我們目前使用這些實現這些DirectX 和一堆用於放置位圖和處理按鈕按下的代碼。但我們希望擁有以下功能:

  • 可移植到 Linux
  • 某種“編輯器”,允許我們在沒有硬編碼位置的情況下佈置屏幕代碼中的元素數
  • 動畫
  • 我們需要能夠覆蓋視頻
  • 不是資源密集型(這些終端沒有很多內存或CPU )
  • 我們目前使用的是 C++,因此管理層更願意這樣做,但會考慮其他語言
  • 我們更喜歡免費的開源解決方案,但如果價格不太貴,我們也願意購買。(我們有幾十個開發人員,部署了數以萬計的終端。)

我們不喜歡常見的 GUI 工具包或小部件。我們想要一些更像遊戲而不是對話框的東西。

對我們可以使用的現成的東西有什麼建議嗎?


參考解法

方法 1:

Maybe the way to go is something like Clutter or Allegro. If you check in this article at ArsTechnica what they are using Clutter for, you might get an idea how to use it. I don't know for sure if it works on Windows, but I'm pretty sure it does, considering it only depends on libraries that are supported under Windows.

方法 2:

You could try wxWidgets (it has wxBitmapButton) or try to implement your own solution using SDL for all of the graphics.

方法 3:

"We don't like the common GUI toolkits or widgets. We want something that has more of the look of a game than of a dialog box."

You realize that Trolltech's QT has a style sheet language for widgets? Take a look at their white paper, specifically page 60

http://trolltech.com/pdf/qt43‑whitepaper‑us.pdf

Going over your other requirements:

  • portable to Linux

Yes. Also supports Windows, Mac, and embedded environments.

  • some sort of "editor" that would allow us to lay out screens without hard‑coding locations of elements in code

Qt's Designer is a very nice tool. I use it all the time.

  • animation

Qt supports this.

  • we need to be able to overlay video

Qt supports this.

  • not resource intensive (these terminals don't have a lot of memory or CPU)

This might be the fly in the ointment. You could check out Qt's embedded option. I've never used that myself.

  • we're currently using C++, so management would prefer that, but other languages would be considered

Qt is for C++ and works with all major compilers.

  • We'd prefer a free, open‑source solution, but would be willing to buy something if it is not too expensive. (We have a couple dozen developers, and tens of thousands of terminals deployed.)

Qt has both open‑source and closed source options.

(by Kristopher JohnsondguaragliaMichał Piaskowskinsanders)

參考文件

  1. Simple Frameworks for Displaying Bitmaps and Handling Button Presses (CC BY‑SA 2.5/3.0/4.0)

#bitmap #graphics #user-interface #C++






相關問題

在 WPF 4.0 中:如何渲染到(PNG)位圖和窗口一樣好? (In WPF 4.0: How to render to a (PNG) bitmap as good as to the window?)

Android 使用手勢移動和縮放 (Android using hand gestures to move and zoom)

Android轉換為位圖崩潰 (Android Converting to bitmap crash)

本機堆不斷增加 (Native heap keeps increasing)

如何為自定義 NSImageRep 子類實現 -draw (How to implement -draw for custom NSImageRep subclass)

為什麼 getBitmap 方法不起作用? (Why is getBitmap method not working?)

這個 3x3 均值過濾器我做錯了什麼? (What am I doing wrong with this 3x3 Mean filter?)

用於顯示位圖和處理按鈕按下的簡單框架 (Simple Frameworks for Displaying Bitmaps and Handling Button Presses)

如何在Android中位圖壓縮後保存Exif數據 (How to save Exif data after bitmap coppression in Android)

運行幾幀後位圖動畫停止工作 (Bitmap animation stops working, after running a few frames)

Silverlight PrtScr 一些控件 (Silverlight PrtScr some controls)

如何使用 PdfiumViewer 將 PDF 轉換為位圖圖像? (How to convert a PDF to a Bitmap image using PdfiumViewer?)







留言討論