[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/bindings/ruby dropdown.rb,NONE,1.1.2.1 icon.b
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/bindings/ruby dropdown.rb,NONE,1.1.2.1 icon.bmp,NONE,1.1.2.1 layouttest.rb,NONE,1.1.2.1 listbox.rb,NONE,1.1.2.1 pokus.xml,NONE,1.1.2.1 windowresize.rb,NONE,1.1.2.1 windowtest.rb,NONE,1.1.2.1 Makefile.am,1.1.2.4,1.1.2.5 |
Date: |
Fri, 03 Jan 2003 05:16:50 -0500 |
Update of /cvsroot/paragui/paragui/bindings/ruby
In directory subversions:/tmp/cvs-serv15321/bindings/ruby
Modified Files:
Tag: devel-1-0
Makefile.am
Added Files:
Tag: devel-1-0
dropdown.rb icon.bmp layouttest.rb listbox.rb pokus.xml
windowresize.rb windowtest.rb
Log Message:
moved ruby samples
--- NEW FILE ---
require 'paragui'
include Paragui
app = PG_Application.new
app.LoadTheme "default"
app.InitScreen(640, 480, 0, 0)
dd1 = PG_DropDown.new(nil, 1, PG_Rect.new(10,10,100,20))
dd2 = PG_DropDown.new(nil, 2, PG_Rect.new(120,10,100,20))
10.times {|i| dd1.AddItem "poop"; dd2.AddItem "yeah"}
dd1.Show
dd2.Show
app.Run
--- NEW FILE ---
BMB
--- NEW FILE ---
# test XML layout
require 'paragui'
include Paragui
app = PG_Application.new
app.EnableBackground true
app.LoadTheme "default"
if not app.InitScreen(800, 600, 0, 0)
puts "Reesolution not supported!"
exit
end
wnd = PG_Window.new nil, PG_Rect.new(0,0,400,300), "Test"
wnd.LoadLayout "pokus.xml"
sleep 2
wnd.Show
app.Run
--- NEW FILE ---
# TODO find out why this crashes on exit
require 'paragui'
include Paragui
$counter = 1
def populate(list)
10.times do
list.AddItem PG_ListBoxItem.new(25, "Item#{$counter}")
$counter += 1
end
end
app = PG_Application.new
app.LoadTheme "default"
app.InitScreen(640, 480, 0, 0)
app.SetEmergencyQuit(true)
lb = PG_ListBox.new nil, PG_Rect.new(10,10,300,100)
# this is how we set a callback
lb.set_rbcallback MSG_SELECTITEM, proc {|id, widget, item|
# inspect the data
puts "#{id}, #{item} #{widget.type}"
widget.DeleteAll
populate widget
widget.Update
true
}
populate lb
lb.Show
app.Run
--- NEW FILE ---
<?xml version="1.0"?>
<layout>
<head>
</head>
<body>
<menubar pos="100,50,300,25">
<popupmenu text="test" hide="1">
<popupmenuitem caption="item1" id="1"/>
<popupmenuitem caption="item2" id="2"/>
<popupmenuitem caption="item3" id="3"/>
<popupmenuitem caption="item4" id="4"/>
</popupmenu>
<popupmenu text="test2" hide="1">
<popupmenuitem caption="item1" id="1"/>
</popupmenu>
</menubar>
<button text="button3" id="7" pos="10,10,80,30" toggle="1"
pressed="1" border="5,10,15" transparency="0,128,255"/>
<button text="grad button" id="7" pos="90,150,100,20"
upgrad="255,0,0, 0,255,0, 0,0,255, 255,255,0" downgrad="0,255,0, 0,0,255,
0,0,0, 255,255,255" selgrad="0,0,255, 0,0,0, 255,0,0, 0,255,255"/>
<dropdown pos="490,50,100,20" indent="10" edit="1"
text="pretext">
<dropdownitem text="First"/>
<dropdownitem text="Second"/>
<dropdownitem text="Third"/>
</dropdown>
<label pos="300,50,200,30" text="Label" fsize="20" fstyle="7"
indent="20" align="left" icon="icon.bmp"/>
<image pos="300,90" iimage="icon.bmp"/>
<gradientwidget pos="100,300,100,100" image="icon.bmp"
imode="stretch" blend="128" gradient="255,0,0, 0,255,0, 0,0,255, 255,255,0"/>
<themewidget pos="250,300,100,100" bimage="icon.bmp"
transparency="128"/>
<themewidget pos="400,300,100,100" bimage="icon.bmp"/>
<lineedit pos="10,500,100,30" length="8" text="pokus"/>
<maskedit pos="10,540,100,30" mask="##.##.####" spacer="_"/>
<progressbar pos="130,500,100,30" progress="20"/>
<spinnerbox pos="130,540,100,30" value="20" min="5" max="35"
mask="##"/>
<window pos="20%,20%,60%,60%" title="Experimental window"
titlecolor="0,0,255" flags="2">
<label pos="20%,20%,60%,60%" text="Close this window
!!!" align="center" textcolor="255,0,0"/>
</window>
<widgetlist pos="250,500,100,90" scrollbar="1">
<label pos="0,0,100,30" text="hepci !" align="left"/>
</widgetlist>
<listbox pos="360,500,100,90" multisel="0">
<listboxitem height="15" ltext="First" select="1"/>
<listboxitem height="15" ltext="Second"/>
<listboxitem height="15" ltext="Third" select="1"/>
<listboxitem height="15" ltext="Fouth" select="1"/>
<listboxitem height="15" ltext="Fifth"/>
<listboxitem height="15" ltext="Sixth"/>
<listboxitem height="15" ltext="Seventh"/>
</listbox>
<listbox pos="480,500,200,90" multisel="1">
<columnitem height="15" select="1" columns="1">
<column number="0" text="heh"/>
</columnitem>
<columnitem height="15" columns="2">
<column number="1" text="heh"/>
</columnitem>
<columnitem height="15" select="1" columns="3">
<column/>
</columnitem>
<columnitem height="15" select="1" columns="4">
<column/>
</columnitem>
<columnitem height="15" columns="5">
<column/>
</columnitem>
<columnitem height="15" columns="6">
<column/>
</columnitem>
<columnitem height="15" columns="7">
<column/>
</columnitem>
</listbox>
<radiobutton pos="700,400,90,20" text="radio1"
name="radiogroup1" transparency="255"/>
<radiobutton pos="700,420,90,20" text="radio2" pressed="1"
group="radiogroup1" transparency="255"/>
<radiobutton pos="700,440,90,20" text="radio3"
group="radiogroup1" transparency="255"/>
<checkbutton pos="700,480,90,20" text="check"
transparency="255"/>
<scrollbar pos="690,10,20,90" dir="1"/>
<scrollbar pos="710,10,90,20" />
</body>
</layout>
--- NEW FILE ---
# resize internally before showing
require 'paragui'
include Paragui
app = PG_Application.new
app.LoadTheme "default"
app.InitScreen(640, 480, 0, 0)
a = PG_Window.new(nil, PG_Rect.new(10, 10, 100, 100), "Window 98, the most
reliable window yet.")
b = PG_Window.new(nil, PG_Rect.new(60, 110, 100, 100), "Window XP, .")
a.SizeWidget(400, 200)
b.SizeWidget(400, 200)
a.Show
b.Show
app.Run
--- NEW FILE ---
require 'paragui'
include Paragui
class CMyWindow < PG_Window
def initialize(parent, rect, text, flags, style="Window")
super(parent, rect, text, flags, style)
end
end
class CMyWidget < PG_ThemeWidget
def initialize(parent, rect)
super(parent, rect)
mywindow = CMyWindow.new(self, PG_Rect.new(50,50,150,100), "Fenster",
WF_DEFAULT)
AddChild(mywindow)
end
end
def init_app(app)
app.SetEmergencyQuit true
app.LoadTheme "default"
app.InitScreen(800,600,0,0)
end
app = PG_Application.new
init_app(app)
def create_widgets
mywidget = CMyWidget.new(nil, PG_Rect.new(200,200,350,250))
mywidget.Show
msgbox = PG_MessageBox.new nil, PG_Rect.new(200,50,240,200),
"Model Messagebox", 'Click "Ok" to close me',
PG_Rect.new(90,120,50,50), "Ok",
PG_Rect.new(0,0,0,0), "",
PG_TA_CENTER, "MessageBox"
drop = PG_DropDown.new msgbox, 15, PG_Rect.new(5,60,200,25)
drop.SetIndent 5
drop.AddItem "Under Construction"
3.times {|i| drop.AddItem "Item#{i}"}
msgbox.Show
msgbox.WaitForClick
msgbox
end
(create_widgets).Hide
app.Run
# can't seem to delete app completely
Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/bindings/ruby/Attic/Makefile.am,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** Makefile.am 1 Jan 2003 20:16:28 -0000 1.1.2.4
--- Makefile.am 3 Jan 2003 10:16:45 -0000 1.1.2.5
***************
*** 1,4 ****
- DIST_SUBDIRS = test
-
SWIGCOMPILE = $(SWIG) -ruby -c++ -I$(top_srcdir)/include -I$(srcdir)
--- 1,2 ----
***************
*** 47,49 ****
EXTRA_DIST = \
swigcommon.h \
! interface.i
--- 45,54 ----
EXTRA_DIST = \
swigcommon.h \
! interface.i \
! dropdown.rb \
! layouttest.rb \
! listbox.rb \
! windowresize.rb \
! windowtest.rb \
! icon.bmp \
! pokus.xml
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/bindings/ruby dropdown.rb,NONE,1.1.2.1 icon.bmp,NONE,1.1.2.1 layouttest.rb,NONE,1.1.2.1 listbox.rb,NONE,1.1.2.1 pokus.xml,NONE,1.1.2.1 windowresize.rb,NONE,1.1.2.1 windowtest.rb,NONE,1.1.2.1 Makefile.am,1.1.2.4,1.1.2.5,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui configure.in,1.3.6.21,1.3.6.22
- Next by Date:
[paragui-cvs] CVS: paragui-doc/doc contribute.doc,1.2,1.3 mainpage.doc,1.1.1.1,1.2
- Previous by thread:
[paragui-cvs] CVS: paragui configure.in,1.3.6.21,1.3.6.22
- Next by thread:
[paragui-cvs] CVS: paragui-doc/doc contribute.doc,1.2,1.3 mainpage.doc,1.1.1.1,1.2
- Index(es):