gtk2 0.20.1 → 0.90.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +30 -0
- data/Rakefile +60 -54
- data/ext/gtk2/Makefile +163 -0
- data/ext/gtk2/depend +10 -0
- data/ext/gtk2/extconf.rb +202 -0
- data/{src → ext/gtk2}/global.h +0 -0
- data/ext/gtk2/gtk2.def +27 -0
- data/{src → ext/gtk2}/init.c +0 -0
- data/{src → ext/gtk2}/rbgdk.c +0 -0
- data/{src → ext/gtk2}/rbgdk.h +0 -0
- data/{src → ext/gtk2}/rbgdkatom.c +0 -0
- data/{src → ext/gtk2}/rbgdkcairo.c +0 -0
- data/{src → ext/gtk2}/rbgdkcolor.c +0 -0
- data/{src → ext/gtk2}/rbgdkcolormap.c +0 -0
- data/{src → ext/gtk2}/rbgdkconst.c +0 -0
- data/{src → ext/gtk2}/rbgdkconversions.h +0 -0
- data/{src → ext/gtk2}/rbgdkcursor.c +0 -0
- data/{src → ext/gtk2}/rbgdkdevice.c +0 -0
- data/{src → ext/gtk2}/rbgdkdisplay.c +0 -0
- data/{src → ext/gtk2}/rbgdkdisplaymanager.c +0 -0
- data/{src → ext/gtk2}/rbgdkdragcontext.c +0 -0
- data/{src → ext/gtk2}/rbgdkdraw.c +0 -0
- data/{src → ext/gtk2}/rbgdkevent.c +0 -0
- data/{src → ext/gtk2}/rbgdkgc.c +0 -0
- data/{src → ext/gtk2}/rbgdkgeometry.c +0 -0
- data/{src → ext/gtk2}/rbgdkimage.c +0 -0
- data/{src → ext/gtk2}/rbgdkinput.c +0 -0
- data/{src → ext/gtk2}/rbgdkkeymap.c +0 -0
- data/{src → ext/gtk2}/rbgdkkeysyms.h +0 -466
- data/{src → ext/gtk2}/rbgdkkeyval.c +0 -0
- data/{src → ext/gtk2}/rbgdkpango.c +0 -0
- data/{src → ext/gtk2}/rbgdkpangorenderer.c +0 -0
- data/{src → ext/gtk2}/rbgdkpixbuf.c +0 -0
- data/{src → ext/gtk2}/rbgdkpixmap.c +0 -0
- data/{src → ext/gtk2}/rbgdkproperty.c +0 -0
- data/{src → ext/gtk2}/rbgdkrectangle.c +0 -0
- data/{src → ext/gtk2}/rbgdkregion.c +0 -0
- data/{src → ext/gtk2}/rbgdkrgb.c +0 -0
- data/{src → ext/gtk2}/rbgdkscreen.c +0 -0
- data/{src → ext/gtk2}/rbgdkselection.c +0 -0
- data/{src → ext/gtk2}/rbgdkthreads.c +0 -0
- data/{src → ext/gtk2}/rbgdktimecoord.c +0 -0
- data/{src → ext/gtk2}/rbgdkvisual.c +0 -0
- data/{src → ext/gtk2}/rbgdkwindow.c +0 -0
- data/{src → ext/gtk2}/rbgdkwindowattr.c +0 -0
- data/{src → ext/gtk2}/rbgdkx11.c +0 -0
- data/{src → ext/gtk2}/rbgtk.c +0 -0
- data/{src → ext/gtk2}/rbgtk.h +0 -4
- data/{src → ext/gtk2}/rbgtkaboutdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccelerator.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccelgroup.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccelgroupentry.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccelkey.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccellabel.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccelmap.c +0 -0
- data/{src → ext/gtk2}/rbgtkaccessible.c +0 -0
- data/{src → ext/gtk2}/rbgtkaction.c +0 -0
- data/{src → ext/gtk2}/rbgtkactiongroup.c +0 -0
- data/{src → ext/gtk2}/rbgtkadjustment.c +0 -0
- data/{src → ext/gtk2}/rbgtkalignment.c +0 -0
- data/{src → ext/gtk2}/rbgtkallocation.c +0 -0
- data/{src → ext/gtk2}/rbgtkarrow.c +0 -0
- data/{src → ext/gtk2}/rbgtkaspectframe.c +0 -0
- data/{src → ext/gtk2}/rbgtkassistant.c +0 -0
- data/{src → ext/gtk2}/rbgtkbbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkbin.c +0 -0
- data/{src → ext/gtk2}/rbgtkbindingset.c +0 -0
- data/{src → ext/gtk2}/rbgtkborder.c +0 -0
- data/{src → ext/gtk2}/rbgtkbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkbuildable.c +0 -0
- data/{src → ext/gtk2}/rbgtkbuilder.c +0 -0
- data/{src → ext/gtk2}/rbgtkbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkcalendar.c +0 -0
- data/{src → ext/gtk2}/rbgtkcelleditable.c +0 -0
- data/{src → ext/gtk2}/rbgtkcelllayout.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrenderer.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrendereraccel.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrenderercombo.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrendererpixbuf.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrendererprogress.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrendererspin.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrenderertext.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellrenderertoggle.c +0 -0
- data/{src → ext/gtk2}/rbgtkcellview.c +0 -0
- data/{src → ext/gtk2}/rbgtkcheckbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkcheckmenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkclipboard.c +0 -0
- data/{src → ext/gtk2}/rbgtkcolorbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkcolorsel.c +0 -0
- data/{src → ext/gtk2}/rbgtkcolorselectiondialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkcombo.c +0 -0
- data/{src → ext/gtk2}/rbgtkcombobox.c +0 -0
- data/{src → ext/gtk2}/rbgtkcomboboxentry.c +0 -0
- data/{src → ext/gtk2}/rbgtkconst.c +0 -0
- data/{src → ext/gtk2}/rbgtkcontainer.c +0 -0
- data/{src → ext/gtk2}/rbgtkconversions.h +0 -0
- data/{src → ext/gtk2}/rbgtkcurve.c +0 -0
- data/{src → ext/gtk2}/rbgtkdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkdrag.c +0 -0
- data/{src → ext/gtk2}/rbgtkdrawingarea.c +0 -0
- data/{src → ext/gtk2}/rbgtkeditable.c +0 -0
- data/{src → ext/gtk2}/rbgtkentry.c +0 -0
- data/{src → ext/gtk2}/rbgtkentrycompletion.c +0 -0
- data/{src → ext/gtk2}/rbgtkeventbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkexpander.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilechooser.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilechooserbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilechooserdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilechooserwidget.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilefilter.c +0 -0
- data/{src → ext/gtk2}/rbgtkfilesel.c +0 -0
- data/{src → ext/gtk2}/rbgtkfixed.c +0 -0
- data/{src → ext/gtk2}/rbgtkfontbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkfontselection.c +0 -0
- data/{src → ext/gtk2}/rbgtkfontselectiondialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkframe.c +0 -0
- data/{src → ext/gtk2}/rbgtkgamma.c +0 -0
- data/{src → ext/gtk2}/rbgtkhandlebox.c +0 -0
- data/{src → ext/gtk2}/rbgtkhbbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkhbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkhpaned.c +0 -0
- data/{src → ext/gtk2}/rbgtkhruler.c +0 -0
- data/{src → ext/gtk2}/rbgtkhscale.c +0 -0
- data/{src → ext/gtk2}/rbgtkhscrollbar.c +0 -0
- data/{src → ext/gtk2}/rbgtkhseparator.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconfactory.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconinfo.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconset.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconsize.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconsource.c +0 -0
- data/{src → ext/gtk2}/rbgtkicontheme.c +0 -0
- data/{src → ext/gtk2}/rbgtkiconview.c +0 -0
- data/{src → ext/gtk2}/rbgtkimage.c +0 -0
- data/{src → ext/gtk2}/rbgtkimagemenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkimcontext.c +0 -0
- data/{src → ext/gtk2}/rbgtkimcontextsimple.c +0 -0
- data/{src → ext/gtk2}/rbgtkimmulticontext.c +0 -0
- data/{src → ext/gtk2}/rbgtkinits.c +2 -6
- data/{src → ext/gtk2}/rbgtkinputdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkinvisible.c +0 -0
- data/{src → ext/gtk2}/rbgtkitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkitemfactory.c +0 -0
- data/{src → ext/gtk2}/rbgtklabel.c +0 -0
- data/{src → ext/gtk2}/rbgtklayout.c +0 -0
- data/{src → ext/gtk2}/rbgtklinkbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkliststore.c +0 -0
- data/{src → ext/gtk2}/rbgtkmacros.h +0 -0
- data/{src → ext/gtk2}/rbgtkmain.c +0 -0
- data/{src → ext/gtk2}/rbgtkmenu.c +0 -0
- data/{src → ext/gtk2}/rbgtkmenubar.c +0 -0
- data/{src → ext/gtk2}/rbgtkmenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkmenushell.c +0 -0
- data/{src → ext/gtk2}/rbgtkmenutoolbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkmessagedialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkmisc.c +0 -0
- data/{src → ext/gtk2}/rbgtknotebook.c +0 -0
- data/{src → ext/gtk2}/rbgtkobject.c +0 -0
- data/{src → ext/gtk2}/rbgtkoptionmenu.c +0 -0
- data/{src → ext/gtk2}/rbgtkpagesetup.c +0 -0
- data/{src → ext/gtk2}/rbgtkpagesetupunixdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkpaned.c +0 -0
- data/{src → ext/gtk2}/rbgtkpapersize.c +0 -0
- data/{src → ext/gtk2}/rbgtkplug.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintcontext.c +0 -0
- data/{src → ext/gtk2}/rbgtkprinter.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintjob.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintoperation.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintoperationpreview.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintsettings.c +0 -0
- data/{src → ext/gtk2}/rbgtkprintunixdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkprogress.c +0 -0
- data/{src → ext/gtk2}/rbgtkprogressbar.c +0 -0
- data/{src → ext/gtk2}/rbgtkradioaction.c +0 -0
- data/{src → ext/gtk2}/rbgtkradiobutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkradiomenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkradiotoolbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkrange.c +0 -0
- data/{src → ext/gtk2}/rbgtkrc.c +0 -0
- data/{src → ext/gtk2}/rbgtkrcstyle.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentaction.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentchooser.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentchooserdialog.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentchoosermenu.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentchooserwidget.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentdata.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentfilter.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentfilterinfo.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentinfo.c +0 -0
- data/{src → ext/gtk2}/rbgtkrecentmanager.c +0 -0
- data/{src → ext/gtk2}/rbgtkruler.c +0 -0
- data/{src → ext/gtk2}/rbgtkscale.c +0 -0
- data/{src → ext/gtk2}/rbgtkscalebutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkscrollbar.c +0 -0
- data/{src → ext/gtk2}/rbgtkscrolledwindow.c +0 -0
- data/{src → ext/gtk2}/rbgtkselection.c +0 -0
- data/{src → ext/gtk2}/rbgtkselectiondata.c +0 -0
- data/{src → ext/gtk2}/rbgtkseparator.c +0 -0
- data/{src → ext/gtk2}/rbgtkseparatormenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtkseparatortoolitem.c +0 -0
- data/{src → ext/gtk2}/rbgtksettings.c +0 -0
- data/{src → ext/gtk2}/rbgtksizegroup.c +0 -0
- data/{src → ext/gtk2}/rbgtksocket.c +0 -0
- data/{src → ext/gtk2}/rbgtkspinbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkstatusbar.c +0 -0
- data/{src → ext/gtk2}/rbgtkstatusicon.c +0 -0
- data/{src → ext/gtk2}/rbgtkstock.c +0 -0
- data/{src → ext/gtk2}/rbgtkstyle.c +0 -0
- data/{src → ext/gtk2}/rbgtktable.c +0 -0
- data/{src → ext/gtk2}/rbgtktargetlist.c +0 -0
- data/{src → ext/gtk2}/rbgtktearoffmenuitem.c +0 -0
- data/{src → ext/gtk2}/rbgtktextappearance.c +0 -0
- data/{src → ext/gtk2}/rbgtktextattributes.c +0 -0
- data/{src → ext/gtk2}/rbgtktextbuffer.c +0 -0
- data/{src → ext/gtk2}/rbgtktextchild.c +0 -0
- data/{src → ext/gtk2}/rbgtktextiter.c +0 -0
- data/{src → ext/gtk2}/rbgtktextmark.c +0 -0
- data/{src → ext/gtk2}/rbgtktexttag.c +0 -0
- data/{src → ext/gtk2}/rbgtktexttagtable.c +0 -0
- data/{src → ext/gtk2}/rbgtktextview.c +0 -0
- data/{src → ext/gtk2}/rbgtktoggleaction.c +0 -0
- data/{src → ext/gtk2}/rbgtktogglebutton.c +0 -0
- data/{src → ext/gtk2}/rbgtktoggletoolbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtktoolbar.c +0 -0
- data/{src → ext/gtk2}/rbgtktoolbutton.c +0 -0
- data/{src → ext/gtk2}/rbgtktoolitem.c +0 -0
- data/{src → ext/gtk2}/rbgtktooltip.c +0 -0
- data/{src → ext/gtk2}/rbgtktooltips.c +0 -0
- data/{src → ext/gtk2}/rbgtktreedragdest.c +0 -0
- data/{src → ext/gtk2}/rbgtktreedragsource.c +0 -0
- data/{src → ext/gtk2}/rbgtktreeiter.c +0 -0
- data/{src → ext/gtk2}/rbgtktreemodel.c +0 -0
- data/{src → ext/gtk2}/rbgtktreemodelfilter.c +0 -0
- data/{src → ext/gtk2}/rbgtktreemodelsort.c +0 -0
- data/{src → ext/gtk2}/rbgtktreepath.c +0 -0
- data/{src → ext/gtk2}/rbgtktreerowreference.c +0 -0
- data/{src → ext/gtk2}/rbgtktreeselection.c +0 -0
- data/{src → ext/gtk2}/rbgtktreesortable.c +0 -0
- data/{src → ext/gtk2}/rbgtktreestore.c +0 -0
- data/{src → ext/gtk2}/rbgtktreeview.c +0 -0
- data/{src → ext/gtk2}/rbgtktreeviewcolumn.c +0 -0
- data/{src → ext/gtk2}/rbgtkuimanager.c +0 -0
- data/{src → ext/gtk2}/rbgtkvbbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkvbox.c +0 -0
- data/{src → ext/gtk2}/rbgtkviewport.c +0 -0
- data/{src → ext/gtk2}/rbgtkvolumebutton.c +0 -0
- data/{src → ext/gtk2}/rbgtkvpaned.c +0 -0
- data/{src → ext/gtk2}/rbgtkvruler.c +0 -0
- data/{src → ext/gtk2}/rbgtkvscale.c +0 -0
- data/{src → ext/gtk2}/rbgtkvscrollbar.c +0 -0
- data/{src → ext/gtk2}/rbgtkvseparator.c +0 -0
- data/{src → ext/gtk2}/rbgtkwidget.c +0 -0
- data/{src → ext/gtk2}/rbgtkwindow.c +0 -0
- data/{src → ext/gtk2}/rbgtkwindowgroup.c +0 -0
- data/extconf.rb +48 -113
- data/{src/lib → lib}/gtk2.rb +0 -0
- data/{src/lib → lib}/gtk2/base.rb +12 -1
- data/sample/gtk-demo/README +7 -0
- data/sample/gtk-demo/alphatest.png +0 -0
- data/sample/gtk-demo/apple-red.png +0 -0
- data/sample/gtk-demo/appwindow.rb +233 -0
- data/sample/gtk-demo/background.jpg +0 -0
- data/sample/gtk-demo/builder.rb +51 -0
- data/sample/gtk-demo/button_box.rb +84 -0
- data/sample/gtk-demo/cairo-arc-negative.rb +41 -0
- data/sample/gtk-demo/cairo-arc.rb +41 -0
- data/sample/gtk-demo/cairo-clip-image.rb +51 -0
- data/sample/gtk-demo/cairo-clip-rectangle.rb +35 -0
- data/sample/gtk-demo/cairo-clip.rb +35 -0
- data/sample/gtk-demo/cairo-curve-rectangle.rb +76 -0
- data/sample/gtk-demo/cairo-curve-to.rb +43 -0
- data/sample/gtk-demo/cairo-dash.rb +39 -0
- data/sample/gtk-demo/cairo-fill-and-stroke.rb +32 -0
- data/sample/gtk-demo/cairo-fill-and-stroke2.rb +38 -0
- data/sample/gtk-demo/cairo-gradient.rb +35 -0
- data/sample/gtk-demo/cairo-image-pattern.rb +39 -0
- data/sample/gtk-demo/cairo-image.rb +49 -0
- data/sample/gtk-demo/cairo-line-cap.rb +53 -0
- data/sample/gtk-demo/cairo-line-join.rb +41 -0
- data/sample/gtk-demo/cairo-long-lines.rb +41 -0
- data/sample/gtk-demo/cairo-operator.rb +83 -0
- data/sample/gtk-demo/cairo-path.rb +28 -0
- data/sample/gtk-demo/cairo-pattern-fill.rb +88 -0
- data/sample/gtk-demo/cairo-self-intersect.rb +32 -0
- data/sample/gtk-demo/cairo-text-align-center.rb +45 -0
- data/sample/gtk-demo/cairo-text-extents.rb +46 -0
- data/sample/gtk-demo/cairo-text.rb +43 -0
- data/sample/gtk-demo/changedisplay.rb +408 -0
- data/sample/gtk-demo/clipboard.rb +72 -0
- data/sample/gtk-demo/colorsel.rb +84 -0
- data/sample/gtk-demo/common.rb +88 -0
- data/sample/gtk-demo/demo.ui +258 -0
- data/sample/gtk-demo/dialog.rb +137 -0
- data/sample/gtk-demo/drawingarea.rb +226 -0
- data/sample/gtk-demo/editable_cells.rb +172 -0
- data/sample/gtk-demo/entry_completion.rb +63 -0
- data/sample/gtk-demo/expander.rb +40 -0
- data/sample/gtk-demo/floppybuddy.gif +0 -0
- data/sample/gtk-demo/gnome-applets.png +0 -0
- data/sample/gtk-demo/gnome-calendar.png +0 -0
- data/sample/gtk-demo/gnome-foot.png +0 -0
- data/sample/gtk-demo/gnome-fs-directory.png +0 -0
- data/sample/gtk-demo/gnome-fs-regular.png +0 -0
- data/sample/gtk-demo/gnome-gimp.png +0 -0
- data/sample/gtk-demo/gnome-gmush.png +0 -0
- data/sample/gtk-demo/gnome-gsame.png +0 -0
- data/sample/gtk-demo/gnu-keys.png +0 -0
- data/sample/gtk-demo/gtk-logo-rgb.gif +0 -0
- data/sample/gtk-demo/hypertext.rb +211 -0
- data/sample/gtk-demo/iconview.rb +109 -0
- data/sample/gtk-demo/images.rb +197 -0
- data/sample/gtk-demo/item_factory.rb +94 -0
- data/sample/gtk-demo/list_store.rb +138 -0
- data/sample/gtk-demo/main.rb +380 -0
- data/sample/gtk-demo/menus.rb +172 -0
- data/sample/gtk-demo/panes.rb +156 -0
- data/sample/gtk-demo/pixbufs.rb +176 -0
- data/sample/gtk-demo/printing.rb +128 -0
- data/sample/gtk-demo/rotated_text.rb +84 -0
- data/sample/gtk-demo/ruby-gnome2-logo.png +0 -0
- data/sample/gtk-demo/sizegroup.rb +118 -0
- data/sample/gtk-demo/stock_browser.rb +235 -0
- data/sample/gtk-demo/textview.rb +435 -0
- data/sample/gtk-demo/tree_store.rb +270 -0
- data/sample/misc/aboutdialog.rb +42 -0
- data/sample/misc/aboutdialog2.rb +42 -0
- data/sample/misc/alpha-demo.rb +70 -0
- data/sample/misc/assistant.rb +347 -0
- data/sample/misc/bindings.rb +107 -0
- data/sample/misc/button.rb +69 -0
- data/sample/misc/button2.rb +28 -0
- data/sample/misc/buttonbox.rb +93 -0
- data/sample/misc/cairo-pong.rb +215 -0
- data/sample/misc/calendar.rb +62 -0
- data/sample/misc/checkbutton.rb +46 -0
- data/sample/misc/colorselection.rb +25 -0
- data/sample/misc/combo_check.rb +71 -0
- data/sample/misc/combobox.rb +86 -0
- data/sample/misc/composited-windows.rb +113 -0
- data/sample/misc/cursor.rb +32 -0
- data/sample/misc/dialog.rb +44 -0
- data/sample/misc/dialog2.rb +39 -0
- data/sample/misc/dnd.rb +65 -0
- data/sample/misc/dndtreeview.rb +56 -0
- data/sample/misc/drag-move.rb +131 -0
- data/sample/misc/drawing.rb +90 -0
- data/sample/misc/entry.rb +34 -0
- data/sample/misc/entrycompletion.rb +39 -0
- data/sample/misc/expander.rb +27 -0
- data/sample/misc/filechooser.rb +49 -0
- data/sample/misc/fileselection.rb +26 -0
- data/sample/misc/frame.rb +69 -0
- data/sample/misc/gc.rb +59 -0
- data/sample/misc/gdkscreen.rb +32 -0
- data/sample/misc/gnome-logo-icon.png +0 -0
- data/sample/misc/helloworld.rb +35 -0
- data/sample/misc/iconview.rb +38 -0
- data/sample/misc/image.rb +42 -0
- data/sample/misc/itemfactory.rb +73 -0
- data/sample/misc/itemfactory2.rb +74 -0
- data/sample/misc/keyboard_grab.rb +29 -0
- data/sample/misc/label.rb +33 -0
- data/sample/misc/linkbutton.rb +42 -0
- data/sample/misc/listview.rb +92 -0
- data/sample/misc/menu.rb +81 -0
- data/sample/misc/misc_button.rb +59 -0
- data/sample/misc/mouse-gesture.rb +465 -0
- data/sample/misc/pangorenderer.rb +66 -0
- data/sample/misc/pointer_grab.rb +34 -0
- data/sample/misc/print.rb +247 -0
- data/sample/misc/properties.rb +85 -0
- data/sample/misc/radiobutton.rb +47 -0
- data/sample/misc/recentchooserdialog.rb +59 -0
- data/sample/misc/rgtk+cairo.rb +44 -0
- data/sample/misc/scalebutton.rb +25 -0
- data/sample/misc/settings.rb +41 -0
- data/sample/misc/statusicon.rb +123 -0
- data/sample/misc/stock.rb +36 -0
- data/sample/misc/style_property.rb +67 -0
- data/sample/misc/style_property.rc +19 -0
- data/sample/misc/t-gtkplug.rb +58 -0
- data/sample/misc/t-gtksocket.rb +65 -0
- data/sample/misc/test.xpm +92 -0
- data/sample/misc/textbuffer_serialize.rb +130 -0
- data/sample/misc/threads.rb +72 -0
- data/sample/misc/to_drawable.rb +42 -0
- data/sample/misc/togglebutton.rb +34 -0
- data/sample/misc/toolbar.rb +55 -0
- data/sample/misc/tooltips.rb +204 -0
- data/sample/misc/tree_combo.rb +85 -0
- data/sample/misc/tree_progress.rb +69 -0
- data/sample/misc/treemodelfilter.rb +55 -0
- data/sample/misc/treeview.rb +71 -0
- data/sample/misc/uimanager.rb +148 -0
- data/sample/misc/uimanager2.rb +91 -0
- data/sample/misc/uimanager2.xml +36 -0
- data/sample/misc/window.rb +24 -0
- data/sample/misc/xbm_cursor.rb +43 -0
- data/sample/testgtk/3DRings.xpm +116 -0
- data/sample/testgtk/FilesQueue.xpm +98 -0
- data/sample/testgtk/Modeller.xpm +117 -0
- data/sample/testgtk/README +14 -0
- data/sample/testgtk/button.rb +133 -0
- data/sample/testgtk/buttonbox.rb +108 -0
- data/sample/testgtk/check-n.xpm +21 -0
- data/sample/testgtk/check-y.xpm +21 -0
- data/sample/testgtk/checkbutton.rb +67 -0
- data/sample/testgtk/circles.xbm +46 -0
- data/sample/testgtk/colorselect.rb +33 -0
- data/sample/testgtk/dialog.rb +47 -0
- data/sample/testgtk/entry.rb +73 -0
- data/sample/testgtk/filesel.rb +67 -0
- data/sample/testgtk/fontselection.rb +56 -0
- data/sample/testgtk/gammacurve.rb +70 -0
- data/sample/testgtk/labels.rb +73 -0
- data/sample/testgtk/layout.rb +108 -0
- data/sample/testgtk/marble.xpm +408 -0
- data/sample/testgtk/menu.rb +79 -0
- data/sample/testgtk/notebook.rb +281 -0
- data/sample/testgtk/pixmap.rb +58 -0
- data/sample/testgtk/progressbar.rb +181 -0
- data/sample/testgtk/radiobutton.rb +61 -0
- data/sample/testgtk/range.rb +65 -0
- data/sample/testgtk/reparent.rb +91 -0
- data/sample/testgtk/rulers.rb +46 -0
- data/sample/testgtk/sample.rb +80 -0
- data/sample/testgtk/savedposition.rb +87 -0
- data/sample/testgtk/scrolledwindow.rb +67 -0
- data/sample/testgtk/shapedwindow.rb +99 -0
- data/sample/testgtk/spinbutton.rb +181 -0
- data/sample/testgtk/statusbar.rb +89 -0
- data/sample/testgtk/test.xpm +92 -0
- data/sample/testgtk/testgtk.rb +179 -0
- data/sample/testgtk/testgtkrc +146 -0
- data/sample/testgtk/testgtkrc2 +21 -0
- data/sample/testgtk/togglebutton.rb +53 -0
- data/sample/testgtk/toolbar.rb +82 -0
- data/sample/testgtk/tooltips.rb +41 -0
- data/sample/testgtk/wmhints.rb +40 -0
- data/test/run-test.rb +10 -8
- data/test/test_gtk_builder.rb +1 -1
- metadata +495 -334
- data/src/makeinits.rb +0 -57
- data/src/makekeysyms.rb +0 -5
@@ -0,0 +1,21 @@
|
|
1
|
+
/* XPM */
|
2
|
+
static char *openfile[] = {
|
3
|
+
/* width height num_colors chars_per_pixel */
|
4
|
+
" 10 9 5 1",
|
5
|
+
/* colors */
|
6
|
+
". c None",
|
7
|
+
"# c #000000",
|
8
|
+
"y c #666666",
|
9
|
+
"i c #ff1f00",
|
10
|
+
"# c #9f9f9f",
|
11
|
+
/* pixels */
|
12
|
+
"..........",
|
13
|
+
"........yy",
|
14
|
+
".......yy.",
|
15
|
+
"......yy..",
|
16
|
+
".yyy.yy...",
|
17
|
+
"..yyyy....",
|
18
|
+
"...yy.....",
|
19
|
+
"..........",
|
20
|
+
"..........",
|
21
|
+
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/* XPM */
|
2
|
+
static char *openfile[] = {
|
3
|
+
/* width height num_colors chars_per_pixel */
|
4
|
+
" 10 9 5 1",
|
5
|
+
/* colors */
|
6
|
+
". c None",
|
7
|
+
"# c #000000",
|
8
|
+
"i c #ff0fff",
|
9
|
+
"y c #ff1f00",
|
10
|
+
"# c #9f9f9f",
|
11
|
+
/* pixels */
|
12
|
+
"..........",
|
13
|
+
"........yy",
|
14
|
+
".......yy.",
|
15
|
+
"......yy..",
|
16
|
+
".yyy.yy...",
|
17
|
+
"..yyyy....",
|
18
|
+
"...yy.....",
|
19
|
+
"..........",
|
20
|
+
"..........",
|
21
|
+
};
|
@@ -0,0 +1,67 @@
|
|
1
|
+
=begin header
|
2
|
+
|
3
|
+
checkbutton.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
|
6
|
+
$Id: checkbutton.rb,v 1.6 2005/07/17 16:55:26 mutoh Exp $
|
7
|
+
|
8
|
+
Rewritten by Hiroshi IGARASHI <igarashi@ueda.info.waseda.ac.jp>
|
9
|
+
$Date: 2005/07/17 16:55:26 $
|
10
|
+
$Id: checkbutton.rb,v 1.6 2005/07/17 16:55:26 mutoh Exp $
|
11
|
+
|
12
|
+
Original Copyright:
|
13
|
+
|
14
|
+
GTK - The GIMP Toolkit
|
15
|
+
Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
16
|
+
|
17
|
+
This library is free software; you can redistribute it and/or
|
18
|
+
modify it under the terms of the GNU Library General Public
|
19
|
+
License as published by the Free Software Foundation; either
|
20
|
+
version 2 of the License, or (at your option) any later version.
|
21
|
+
|
22
|
+
This library is distributed in the hope that it will be useful,
|
23
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
25
|
+
Library General Public License for more details.
|
26
|
+
|
27
|
+
You should have received a copy of the GNU Library General Public
|
28
|
+
License along with this library; if not, write to the
|
29
|
+
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
30
|
+
Boston, MA 02111-1307, USA.
|
31
|
+
|
32
|
+
=end
|
33
|
+
|
34
|
+
require 'sample'
|
35
|
+
|
36
|
+
class CheckButtonSample < SampleWindow
|
37
|
+
def initialize
|
38
|
+
super("check buttons")
|
39
|
+
|
40
|
+
box1 = Gtk::VBox.new
|
41
|
+
add(box1)
|
42
|
+
|
43
|
+
box2 = Gtk::VBox.new(false, 10)
|
44
|
+
box2.border_width = 10
|
45
|
+
box1.add(box2)
|
46
|
+
|
47
|
+
button = Gtk::CheckButton.new("button1")
|
48
|
+
box2.add(button)
|
49
|
+
|
50
|
+
button = Gtk::CheckButton.new("button2")
|
51
|
+
box2.add(button)
|
52
|
+
|
53
|
+
button = Gtk::CheckButton.new("button3")
|
54
|
+
box2.add(button)
|
55
|
+
|
56
|
+
box1.pack_start(Gtk::HSeparator.new)
|
57
|
+
|
58
|
+
box2 = Gtk::VBox.new(false, 10)
|
59
|
+
box2.border_width = 10
|
60
|
+
box1.add(box2)
|
61
|
+
|
62
|
+
button = Gtk::Button.new("close")
|
63
|
+
button.signal_connect("clicked"){destroy}
|
64
|
+
|
65
|
+
box2.add(button)
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#define circles_width 64
|
2
|
+
#define circles_height 64
|
3
|
+
static unsigned char circles_bits[] = {
|
4
|
+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
5
|
+
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00,
|
6
|
+
0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
|
7
|
+
0xff, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
|
8
|
+
0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
|
9
|
+
0xff, 0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
|
10
|
+
0x00, 0xfe, 0xff, 0x01, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x3f, 0x00,
|
11
|
+
0x80, 0xff, 0x1f, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x3f, 0x00,
|
12
|
+
0x80, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0xc0, 0xff, 0x01, 0x00,
|
13
|
+
0x00, 0xf0, 0x7f, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x00,
|
14
|
+
0xf0, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0xf0, 0x1f, 0x00, 0x00,
|
15
|
+
0x00, 0x00, 0xff, 0x01, 0xf8, 0x1f, 0x00, 0x20, 0x00, 0x00, 0xff, 0x03,
|
16
|
+
0xf8, 0x0f, 0x00, 0xff, 0x07, 0x00, 0xfe, 0x03, 0xfc, 0x07, 0xc0, 0xff,
|
17
|
+
0x1f, 0x00, 0xfc, 0x07, 0xfc, 0x07, 0xf0, 0xff, 0x7f, 0x00, 0xfc, 0x07,
|
18
|
+
0xfc, 0x03, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0x07, 0xfe, 0x03, 0xfc, 0xff,
|
19
|
+
0xff, 0x01, 0xf8, 0x0f, 0xfe, 0x01, 0xfe, 0x8f, 0xff, 0x03, 0xf0, 0x0f,
|
20
|
+
0xfe, 0x01, 0xfe, 0x01, 0xfc, 0x03, 0xf0, 0x0f, 0xff, 0x01, 0xff, 0x00,
|
21
|
+
0xf8, 0x07, 0xf0, 0x1f, 0xff, 0x00, 0x7f, 0x00, 0xf0, 0x07, 0xe0, 0x1f,
|
22
|
+
0xff, 0x80, 0x3f, 0x00, 0xe0, 0x0f, 0xe0, 0x1f, 0xff, 0x80, 0x1f, 0x00,
|
23
|
+
0xc0, 0x0f, 0xe0, 0x1f, 0xff, 0x80, 0x1f, 0x00, 0xc0, 0x0f, 0xe0, 0x1f,
|
24
|
+
0xff, 0x80, 0x1f, 0x00, 0xc0, 0x0f, 0xe0, 0x1f, 0xff, 0x80, 0x0f, 0x00,
|
25
|
+
0x80, 0x0f, 0xe0, 0x1f, 0xff, 0xc0, 0x0f, 0x00, 0x80, 0x1f, 0xe0, 0x1f,
|
26
|
+
0xff, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0xe0, 0x1f, 0xff, 0x80, 0x1f, 0x00,
|
27
|
+
0xc0, 0x0f, 0xe0, 0x1f, 0xff, 0x80, 0x1f, 0x00, 0xc0, 0x0f, 0xe0, 0x1f,
|
28
|
+
0xff, 0x80, 0x1f, 0x00, 0xc0, 0x0f, 0xe0, 0x1f, 0xff, 0x81, 0x3f, 0x00,
|
29
|
+
0xe0, 0x0f, 0xf0, 0x1f, 0xfe, 0x01, 0x7f, 0x00, 0xf0, 0x07, 0xf0, 0x0f,
|
30
|
+
0xfe, 0x01, 0xff, 0x00, 0xf8, 0x07, 0xf0, 0x0f, 0xfe, 0x03, 0xfe, 0x01,
|
31
|
+
0xfc, 0x03, 0xf8, 0x0f, 0xfc, 0x03, 0xfe, 0x8f, 0xff, 0x03, 0xf8, 0x07,
|
32
|
+
0xfc, 0x07, 0xfc, 0xff, 0xff, 0x01, 0xfc, 0x07, 0xfc, 0x07, 0xf8, 0xff,
|
33
|
+
0xff, 0x00, 0xfc, 0x07, 0xf8, 0x0f, 0xf0, 0xff, 0x7f, 0x00, 0xfe, 0x03,
|
34
|
+
0xf8, 0x1f, 0xc0, 0xff, 0x1f, 0x00, 0xff, 0x03, 0xf0, 0x1f, 0x00, 0xff,
|
35
|
+
0x07, 0x00, 0xff, 0x01, 0xf0, 0x3f, 0x00, 0x20, 0x00, 0x80, 0xff, 0x01,
|
36
|
+
0xe0, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x00, 0xc0, 0xff, 0x01, 0x00,
|
37
|
+
0x00, 0xf0, 0x7f, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x3f, 0x00,
|
38
|
+
0x80, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00,
|
39
|
+
0x80, 0xff, 0x1f, 0x00, 0x00, 0xfe, 0xff, 0x01, 0xf0, 0xff, 0x0f, 0x00,
|
40
|
+
0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff,
|
41
|
+
0xff, 0xff, 0x01, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
|
42
|
+
0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
|
43
|
+
0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00,
|
44
|
+
0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
45
|
+
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
46
|
+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
colorselect.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project
|
6
|
+
$Id: colorselect.rb,v 1.5 2005/07/17 16:55:27 mutoh Exp $
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'sample'
|
10
|
+
|
11
|
+
class ColorSelectionSample < Gtk::ColorSelectionDialog
|
12
|
+
include Sample
|
13
|
+
extend SampleClass
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
super("color selection dialog")
|
17
|
+
@destroyed = false
|
18
|
+
signal_connect("destroy"){destroy}
|
19
|
+
|
20
|
+
colorsel.set_has_opacity_control(true)
|
21
|
+
set_window_position(Gtk::Window::POS_MOUSE)
|
22
|
+
|
23
|
+
colorsel.signal_connect("color_changed"){
|
24
|
+
colorsel.current_color
|
25
|
+
}
|
26
|
+
ok_button.signal_connect("clicked"){
|
27
|
+
color = colorsel.current_color
|
28
|
+
colorsel.set_current_color(color)
|
29
|
+
}
|
30
|
+
cancel_button.signal_connect("clicked"){destroy}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
dialog.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
|
6
|
+
$Id: dialog.rb,v 1.6 2005/07/17 16:55:27 mutoh Exp $
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'sample'
|
11
|
+
|
12
|
+
class DialogSample < SampleDialog
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
super("Gtk::Dialog")
|
16
|
+
set_default_size(200, 100)
|
17
|
+
|
18
|
+
button = Gtk::Button.new("OK")
|
19
|
+
button.can_default = true
|
20
|
+
|
21
|
+
action_area.pack_start(button)
|
22
|
+
button.grab_default
|
23
|
+
|
24
|
+
button = Gtk::Button.new("Toggle")
|
25
|
+
button.signal_connect("clicked"){label_toggle}
|
26
|
+
|
27
|
+
button.can_default = true
|
28
|
+
action_area.pack_start(button)
|
29
|
+
|
30
|
+
@label = nil
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
def label_toggle
|
35
|
+
if @label == nil then
|
36
|
+
@label = Gtk::Label.new("Dialog Test")
|
37
|
+
@label.signal_connect("destroy"){@label = nil}
|
38
|
+
@label.set_padding(10, 10)
|
39
|
+
|
40
|
+
vbox.pack_start(@label)
|
41
|
+
@label.show
|
42
|
+
else
|
43
|
+
@label.destroy
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
=begin header
|
2
|
+
|
3
|
+
entry.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
|
6
|
+
|
7
|
+
$Id: entry.rb,v 1.6 2005/07/17 16:55:27 mutoh Exp $
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'sample'
|
12
|
+
|
13
|
+
class EntrySample < SampleWindow
|
14
|
+
def initialize
|
15
|
+
cbitems = [
|
16
|
+
"item0",
|
17
|
+
"item1 item1",
|
18
|
+
"item2 item2 item2",
|
19
|
+
"item3 item3 item3 item3",
|
20
|
+
"item4 item4 item4 item4 item4",
|
21
|
+
"item5 item5 item5 item5 item5 item5",
|
22
|
+
"item6 item6 item6 item6 item6",
|
23
|
+
"item7 item7 item7 item7",
|
24
|
+
"item8 item8 item8",
|
25
|
+
"item9 item9"
|
26
|
+
]
|
27
|
+
|
28
|
+
super("entry")
|
29
|
+
|
30
|
+
box = Gtk::VBox.new(false, 5)
|
31
|
+
add(box)
|
32
|
+
|
33
|
+
entry = Gtk::Entry.new
|
34
|
+
entry.text = "hello world"
|
35
|
+
entry.select_region(0, 5)
|
36
|
+
box.add(entry)
|
37
|
+
|
38
|
+
cb = Gtk::Combo.new
|
39
|
+
cb.set_popdown_strings(cbitems)
|
40
|
+
cb.entry.text = "hello world"
|
41
|
+
cb.entry.select_region(0, -1)
|
42
|
+
box.add(cb)
|
43
|
+
|
44
|
+
editable_check = Gtk::CheckButton.new("Editable")
|
45
|
+
box.add(editable_check)
|
46
|
+
editable_check.signal_connect("toggled"){
|
47
|
+
entry.editable = editable_check.active?
|
48
|
+
}
|
49
|
+
editable_check.active = true
|
50
|
+
|
51
|
+
visible_check = Gtk::CheckButton.new("Visible")
|
52
|
+
box.add(visible_check)
|
53
|
+
visible_check.signal_connect("toggled"){
|
54
|
+
entry.visibility = visible_check.active?
|
55
|
+
}
|
56
|
+
visible_check.active = true
|
57
|
+
|
58
|
+
sensitive_check = Gtk::CheckButton.new("Sensitive")
|
59
|
+
box.add(sensitive_check)
|
60
|
+
sensitive_check.signal_connect("toggled"){
|
61
|
+
entry.sensitive = sensitive_check.active?
|
62
|
+
}
|
63
|
+
sensitive_check.active = true
|
64
|
+
|
65
|
+
box.pack_start(Gtk::HSeparator.new, false, true, 5)
|
66
|
+
|
67
|
+
button = Gtk::Button.new("close")
|
68
|
+
button.signal_connect("clicked"){ destroy }
|
69
|
+
|
70
|
+
box.add(button)
|
71
|
+
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
=begin header
|
2
|
+
|
3
|
+
filesel.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
|
6
|
+
|
7
|
+
$Id: filesel.rb,v 1.6 2005/07/17 16:55:27 mutoh Exp $
|
8
|
+
|
9
|
+
Rewritten by TAKAHASHI Hitoshi <thitoshi@ne.scphys.kyoto-u.ac.jp>
|
10
|
+
|
11
|
+
Original Copyright:
|
12
|
+
|
13
|
+
GTK - The GIMP Toolkit
|
14
|
+
Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
15
|
+
|
16
|
+
This library is free software; you can redistribute it and/or
|
17
|
+
modify it under the terms of the GNU Library General Public
|
18
|
+
License as published by the Free Software Foundation; either
|
19
|
+
version 2 of the License, or (at your option) any later version.
|
20
|
+
|
21
|
+
This library is distributed in the hope that it will be useful,
|
22
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
24
|
+
Library General Public License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU Library General Public
|
27
|
+
License along with this library; if not, write to the
|
28
|
+
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
29
|
+
Boston, MA 02111-1307, USA.
|
30
|
+
|
31
|
+
=end
|
32
|
+
|
33
|
+
require 'sample'
|
34
|
+
|
35
|
+
class FileSelectionSample < Gtk::FileSelection
|
36
|
+
include Sample
|
37
|
+
extend SampleClass
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
super("file selection dialog")
|
41
|
+
@destroyed = false
|
42
|
+
signal_connect("destroy") do destroy end
|
43
|
+
|
44
|
+
set_window_position(Gtk::Window::POS_MOUSE)
|
45
|
+
hide_fileop_buttons
|
46
|
+
|
47
|
+
ok_button.signal_connect("clicked") do
|
48
|
+
puts filename
|
49
|
+
destroy
|
50
|
+
end
|
51
|
+
cancel_button.signal_connect("clicked") do
|
52
|
+
destroy
|
53
|
+
end
|
54
|
+
|
55
|
+
button = Gtk::Button.new("Hide Fileops")
|
56
|
+
button.signal_connect("clicked") do
|
57
|
+
hide_fileop_buttons
|
58
|
+
end
|
59
|
+
action_area.pack_start(button, false, false, 0)
|
60
|
+
|
61
|
+
button = Gtk::Button.new("Show Fileops")
|
62
|
+
button.signal_connect("clicked") do
|
63
|
+
show_fileop_buttons
|
64
|
+
end
|
65
|
+
action_area.pack_start(button, false, false, 0)
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
=begin header
|
2
|
+
|
3
|
+
fontselection.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
|
6
|
+
|
7
|
+
$Id: fontselection.rb,v 1.6 2005/07/17 16:55:27 mutoh Exp $
|
8
|
+
|
9
|
+
Rewritten by Neil Conway <neilconway@rogers.com>
|
10
|
+
|
11
|
+
Original Copyright:
|
12
|
+
|
13
|
+
GTK - The GIMP Toolkit
|
14
|
+
Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
15
|
+
|
16
|
+
This library is free software; you can redistribute it and/or
|
17
|
+
modify it under the terms of the GNU Library General Public
|
18
|
+
License as published by the Free Software Foundation; either
|
19
|
+
version 2 of the License, or (at your option) any later version.
|
20
|
+
|
21
|
+
This library is distributed in the hope that it will be useful,
|
22
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
24
|
+
Library General Public License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU Library General Public
|
27
|
+
License along with this library; if not, write to the
|
28
|
+
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
29
|
+
Boston, MA 02111-1307, USA.
|
30
|
+
|
31
|
+
=end
|
32
|
+
|
33
|
+
require 'sample'
|
34
|
+
|
35
|
+
class FontSelectionSample < Gtk::FontSelectionDialog
|
36
|
+
include Sample
|
37
|
+
extend SampleClass
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
super('Font Selection Dialog')
|
41
|
+
set_window_position(Gtk::Window::POS_MOUSE)
|
42
|
+
|
43
|
+
signal_connect('destroy') {
|
44
|
+
destroy
|
45
|
+
}
|
46
|
+
|
47
|
+
ok_button.signal_connect('clicked') {
|
48
|
+
puts font_name
|
49
|
+
destroy
|
50
|
+
}
|
51
|
+
|
52
|
+
cancel_button.signal_connect('clicked') {
|
53
|
+
destroy
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
=begin header
|
2
|
+
|
3
|
+
gammacurve.rb - a part of testgtk.c rewritten in Ruby/GTK2
|
4
|
+
|
5
|
+
Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
|
6
|
+
|
7
|
+
$Id: gammacurve.rb,v 1.6 2005/07/17 16:55:27 mutoh Exp $
|
8
|
+
|
9
|
+
Rewritten by TAKAHASHI Hitoshi <thitoshi@ne.scphys.kyoto-u.ac.jp>
|
10
|
+
|
11
|
+
Original Copyright:
|
12
|
+
|
13
|
+
GTK - The GIMP Toolkit
|
14
|
+
Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
15
|
+
|
16
|
+
This library is free software; you can redistribute it and/or
|
17
|
+
modify it under the terms of the GNU Library General Public
|
18
|
+
License as published by the Free Software Foundation; either
|
19
|
+
version 2 of the License, or (at your option) any later version.
|
20
|
+
|
21
|
+
This library is distributed in the hope that it will be useful,
|
22
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
24
|
+
Library General Public License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU Library General Public
|
27
|
+
License along with this library; if not, write to the
|
28
|
+
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
29
|
+
Boston, MA 02111-1307, USA.
|
30
|
+
|
31
|
+
=end
|
32
|
+
|
33
|
+
require 'sample'
|
34
|
+
|
35
|
+
class GammaCurveSample < SampleWindow
|
36
|
+
include Math
|
37
|
+
|
38
|
+
def initialize
|
39
|
+
super("Gtk::GammaCurve")
|
40
|
+
set_border_width(10)
|
41
|
+
|
42
|
+
@curve = Gtk::GammaCurve.new
|
43
|
+
add(@curve)
|
44
|
+
@count = 0
|
45
|
+
end
|
46
|
+
|
47
|
+
def update
|
48
|
+
max = 127 + (@count % 2) * 128
|
49
|
+
@curve.curve.set_range(0, max, 0, max)
|
50
|
+
vec = []
|
51
|
+
max.times do |i|
|
52
|
+
vec[i] = (127 / sqrt(max)) * sqrt(i)
|
53
|
+
end
|
54
|
+
@curve.curve.set_vector(max, vec)
|
55
|
+
@count += 1
|
56
|
+
end
|
57
|
+
|
58
|
+
attr_reader :count
|
59
|
+
|
60
|
+
def GammaCurveSample.invoke
|
61
|
+
@singleton = new if @singleton.nil? or @singleton.destroyed?
|
62
|
+
@singleton.update
|
63
|
+
unless @singleton.visible?
|
64
|
+
@singleton.show_all
|
65
|
+
end
|
66
|
+
if @singleton.count == 4
|
67
|
+
@singleton.destroy
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|