wxwidgets

wx 0.90.0.1 fails to install on Haskell Platform 2012.2.0.0 (WinXP)

回眸只為那壹抹淺笑 提交于 2019-12-22 08:48:00
问题 I tried to install WX 0.90.0.1 on Haskell Platform 2012.2.0.0 using "cabal install wx" but got the following result: Configuring wxc-0.90.0.4... setup.exe: wx-config: does not exist cabal: Error: some packages failed to install: wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install. wxc-0.90.0.4 failed during the configure step. The exception was: ExitFailure 1 wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install. Can anyone help? 回答1: I had the same problem with wxc-0.90.0.4

Alien::wxWidgets install fails on OSX10.10

浪子不回头ぞ 提交于 2019-12-22 08:17:06
问题 I'm trying to install Alien::wxWidgets version 0.67 with wxWidgets version 3.0.2, but no matter what I do, I get the following error: checking if C compiler (clang -mmacosx-version-min=10.5) works with SDK/version options... configure: error: in `/Users/David/.cpan/build/Alien-wxWidgets-0.67-GGkXTu/wxWidgets-3.0.2/bld': configure: error: no. Try a different SDK See `config.log' for more details system: echo exit | sh ../configure --prefix=/Users/David/perl5/perlbrew/perls/perl-5.16.0/lib/site

Example code for a minimal paint program (MS Paint style)

大兔子大兔子 提交于 2019-12-21 20:22:10
问题 I want to write a paint program in the style of MS Paint. On a most basic level, I have to draw a dot on the screen whenever the user drags the mouse. def onMouseMove(): if mouse.button.down: draw circle at (mouse.position.x, mouse.position.y) Unfortunately, I'm having trouble with my GUI framework (see previous question), I'm not getting mouse move messages frequently enough. I'm using the GUI framework wxWidgets and the programming language Haskell. Question: Could you give me some example

How can I make “real-time” plots with wxMathPlot?

北慕城南 提交于 2019-12-21 05:47:13
问题 I am thinking of using wxMathPlot for plotting/graphing some data that arrives continuously. I want to draw "Real-time" plot/graph using it. Is that possible? I.E. I don't want just a static graph of a one-time read of a file - I want the streaming data plotted and continued out to the right of the graph - (and let the left side fall off/scroll out of view) EDIT I still have not gotten an answer for this. There is an interesting class in the wxmathPlot library called mpFXYVector but that

Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout?

冷暖自知 提交于 2019-12-20 09:58:34
问题 As referenced in my previous question, I am trying to make something slightly wizard-like in function. I have settled on a single frame with a sizer added to it. I build panels for each of the screens I would like users to see, add them to the frame's sizer, then switch between panels by .Hide() ing one panel, then calling a custom .ShowYourself() on the next panel. Obviously, I would like the buttons to remain in the same place as the user progresses through the process. I have linked

Setting the width of a menu in the Windows API

时光毁灭记忆、已成空白 提交于 2019-12-20 06:25:35
问题 I'm creating a custom control in wxWidgets that displays a menu as part of it, and currently working on the Windows side of things. wxWidgets doesn't have a way of setting the width of a menu. It just makes the window as wide as the longest string plus a few pixels on either side. In the API, there is a way to get the actual Windows API menu handle. Does the Windows API have a method of setting the width of a menu other than just calculating it on its own based on the width of the string? 回答1

How to move items smoothly in wxPython?

ε祈祈猫儿з 提交于 2019-12-20 03:51:32
问题 I am trying to drag and drop a button, with the following code in wxPython, however, the drag flickers, and feels jarring, and I'm not sure why -- or how to fix it. I've pored over the wxWidgets docs, but can't seem to find out what the problem is. Thanks in advance! import wx app = wx.App(False) d = {} def wMouseDown(e): print "!!!", e.GetEventObject() def MouseDown(e): o = e.GetEventObject() sx,sy = panel.ScreenToClient(o.GetPositionTuple()) dx,dy = panel.ScreenToClient(wx.GetMousePosition(

Howto determine the size of a string give the current font in wxWidgets

Deadly 提交于 2019-12-20 03:37:11
问题 Is there a way to determine the display length of a given string (in pixels) based on the currently selected font in (C++) wxWidgets? For example if I print out the string "Speed:" and want to put 10 pixels between the ':' and the value about to follow, I need to know how long the "Speed:" string was. Is there a way to determine this? I can't seem to find anything in the API documentation but I may be missing something. 回答1: Maybe http://docs.wxwidgets.org/stable/wx_wxdc.html

Capturing network status change event

不想你离开。 提交于 2019-12-19 09:59:10
问题 I am trying to get events when the internet connection is reestablished after it is lost. It is for a data transfer software that I am developing. If I lose the network during data transfer, I would like to be notified when it is back and continue the transfer automatically. I can of course create a separate thread and check the network once in a while with a timer, but maybe there is a better option out there. I am developing for windows mainly, in C++ (not .net). I can also use wxwidgets (I

Executing MSYS from cmd.exe with arguments

99封情书 提交于 2019-12-19 09:25:17
问题 I am trying to learn the wxWidgets library, using MinGW and msys to compile the code. So far so good, but I can not find a way to send a command to MSYS through CMD.exe. I use Sublime Text to edit files, and it has an option to run makefiles. I want my makefiles to be able to open an instance of MSYS and send the g++ command and arguments to it. Example: Right now my makefile is: test.exe : main.cpp g++ -s main.cpp -o test.exe `wx-config --cxxflags` `wx-config --libs` When mingw32-make goes