From: Mattia B. <mb...@ds...> - 2001-11-29 21:00:48
|
> Hi everyone, Hi, > I've just started using WxPerl and I like what I see so far. > > I need to create an app with the following user interface: > > A big window with a menu bar and status bar (I can do that from the > example on perl.com). > > A toolbar. > > A way from the toolbar or menu for adding a component onto the page (this > would be a frame with an image in, I think). better: just create a MyCanvas derived from Wx::Window that is responsible for all the input handling; it will have an EVT_PAINT handler ( to redraw itself ), and at least EVT_LEFT_DOWN, EVT_MOTION and EVT_RIGHT_DOWN handlers ( see the docs for wxMouseEvent for details ) > >From the component, a right-click context menu (this is the bit I can't > figure out how you do in WxPerl). if $window is some Wx::Window and $menu your Wx::Menu then $window->PopupMenu( $menu, $point ); or $window->PopupMenu( $menu, $x, $y ); will do > A way to join the components together using "wires" - basically lines > drawn from component to component. The lines should move around if I > click-drag the components around. To draw lines use: my $dc = Wx::ClientDC->new( $window ); and then call the appropriate methods on the DC ( device context ) hint: use Wx::DC::SetLogicalFunction( wxXOR ) for drawing connection lines while dragging > Anyway, hope someone can help - I don't need code, just some pointers as > to where to look, since the docs are kinda lacking ;-) I am sure no one will complain if you write them ;-p HTH Mattia |