├── www-template ├── CNAME ├── robots.txt ├── README ├── a-hrefs.xsl ├── 404.html ├── statcounter.html ├── outline.xsl ├── index-toc.xsl ├── index.html └── style.css ├── q.png ├── widget-examples ├── menu.txt ├── dialog.txt ├── printunixdialog.txt ├── filechooserdialog.txt ├── treeview.txt ├── expander.txt ├── statusbar.txt ├── plug.ui ├── filechooserbutton.ui ├── entry.ui ├── socket.ui ├── drawingarea.ui ├── button.ui ├── progressbar.ui ├── calendar.ui ├── image.ui ├── spinner.ui ├── fontbutton.ui ├── label.ui ├── eventbox.ui ├── colorbutton.ui ├── drawingarea.txt ├── checkbutton.ui ├── window.ui ├── spinbutton.ui ├── comboboxtext.ui ├── menubutton.ui ├── expander.ui ├── scale.ui ├── textview.ui ├── viewport.ui ├── overlay.ui ├── frame.ui ├── printunixdialog.ui ├── paned.ui ├── switch.ui ├── scrolledwindow.ui ├── aspectframe.ui ├── togglebutton.ui ├── statusbar.ui ├── separator.ui ├── box.ui ├── linkbutton.ui ├── buttonbox.ui ├── dialog.ui ├── grid.ui ├── radiobutton.ui ├── notebook.ui ├── infobar.ui ├── filechooserdialog.ui ├── menuitem.ui ├── imagemenuitem.ui ├── separatormenuitem.ui ├── sizegroup.ui ├── menu.ui ├── menubar.ui ├── treeview.ui └── treeviewcolumn.ui ├── .gitignore ├── bad_window.ui ├── echo.sh ├── clock.ui ├── LICENSE ├── README ├── clock.sh ├── simple_open.ui ├── simple_dialog.ui ├── Makefile ├── NEWS ├── Makefile.publish └── calc.sh /www-template/CNAME: -------------------------------------------------------------------------------- 1 | pipeglade.boundp.org 2 | -------------------------------------------------------------------------------- /www-template/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trebb/pipeglade/HEAD/q.png -------------------------------------------------------------------------------- /widget-examples/menu.txt: -------------------------------------------------------------------------------- 1 | menu1:popup 2 | menu1:snapshot gh-pages/GtkMenu.svg 3 | _:main_quit 4 | -------------------------------------------------------------------------------- /widget-examples/dialog.txt: -------------------------------------------------------------------------------- 1 | dialog1:set_visible 1 2 | dialog1:snapshot gh-pages/GtkDialog.svg 3 | _:main_quit 4 | 5 | -------------------------------------------------------------------------------- /widget-examples/printunixdialog.txt: -------------------------------------------------------------------------------- 1 | printunixdialog1:set_visible 1 2 | printunixdialog1:snapshot gh-pages/GtkPrintUnixDialog.svg 3 | _:main_quit 4 | 5 | -------------------------------------------------------------------------------- /widget-examples/filechooserdialog.txt: -------------------------------------------------------------------------------- 1 | filechooserdialog1:set_visible 1 2 | filechooserdialog1:snapshot gh-pages/GtkFileChooserDialog.svg 3 | _:main_quit 4 | 5 | -------------------------------------------------------------------------------- /widget-examples/treeview.txt: -------------------------------------------------------------------------------- 1 | treeview1:set_cursor 2 2 | 3 | main:set_visible 0 4 | main:set_visible 1 5 | 6 | treeview1:snapshot gh-pages/GtkTreeView.svg 7 | 8 | _:main_quit 9 | -------------------------------------------------------------------------------- /widget-examples/expander.txt: -------------------------------------------------------------------------------- 1 | expander1:force 2 | 3 | # trying to overcome a timing problem: 4 | main:set_visible 0 5 | main:set_visible 1 6 | 7 | main:snapshot gh-pages/GtkExpander.svg 8 | _:main_quit 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.core 2 | *.eps 3 | *.epsf 4 | *.err 5 | *.gmon 6 | *.gprof 7 | *.jpg 8 | *.log 9 | *.pdf 10 | *.ps 11 | *.svg 12 | *fifo 13 | *~ 14 | \#*# 15 | gh-pages/ 16 | output.pdf 17 | pipeglade 18 | test_dir/ 19 | -------------------------------------------------------------------------------- /www-template/README: -------------------------------------------------------------------------------- 1 | If you are reading this on github.com/trebb/pipeglade you probably 2 | want to switch to the master branch. This branch (gh-pages) only 3 | exists to populate the project homepage, http://pipeglade.boundp.org. 4 | -------------------------------------------------------------------------------- /widget-examples/statusbar.txt: -------------------------------------------------------------------------------- 1 | statusbar1:push please wait... 2 | 3 | # trying to do something about a timing problem we seem to have: 4 | main:set_visible 0 5 | main:set_visible 1 6 | 7 | main:snapshot gh-pages/GtkStatusbar.svg 8 | _:main_quit 9 | -------------------------------------------------------------------------------- /bad_window.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /echo.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | export LC_ALL=C 4 | 5 | FIN=to-g.fifo 6 | FOUT=from-g.fifo 7 | 8 | rm -f $FIN $FOUT # in case these aren't fifos 9 | 10 | ./pipeglade -i $FIN -o $FOUT -b 11 | 12 | while test -e $FIN -a -e $FOUT; do 13 | read line <$FOUT 14 | echo "textview2:insert_at_cursor $line\\n" >$FIN 15 | echo "textview2:scroll_to_cursor\\n" >$FIN 16 | done 17 | -------------------------------------------------------------------------------- /widget-examples/plug.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 20 8 | 20 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /widget-examples/filechooserbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /widget-examples/entry.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | type here... 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /www-template/a-hrefs.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /widget-examples/socket.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 20 8 | 20 9 | 10 | 11 | True 12 | True 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /widget-examples/drawingarea.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | 150 10 | 150 11 | True 12 | False 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /widget-examples/button.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | button 10 | True 11 | True 12 | True 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /widget-examples/progressbar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 0.23000000000000001 12 | True 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /widget-examples/calendar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | 2016 12 | 5 13 | 5 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/image.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 125 12 | system-help 13 | 3 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/spinner.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 40 8 | 30 9 | 10 | 11 | True 12 | False 13 | True 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/fontbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | True 12 | Sans 12 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/label.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 70 8 | 30 9 | 10 | 11 | True 12 | False 13 | label 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/eventbox.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 150 8 | 100 9 | 10 | 11 | True 12 | False 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /clock.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | pipeglade-clock 8 | 440 9 | 440 10 | dialog 11 | 12 | 13 | True 14 | False 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /www-template/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PIPEGLADE: 404 6 | 7 | 8 | 9 | 10 |
11 |
12 |

PIPEGLADE
13 | Graphical User Interfaces, The UNIX Way

14 |

15 | The page you requested doesn't seem to exist. You may wish to visit 16 | http://pipeglade.boundp.org 17 | You will be redirected there. 18 |

19 | 20 | 21 | -------------------------------------------------------------------------------- /widget-examples/colorbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | 150 10 | True 11 | True 12 | True 13 | True 14 | rgba(54,210,43,0.630435) 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /widget-examples/drawingarea.txt: -------------------------------------------------------------------------------- 1 | drawingarea1:move_to 1 5 50 2 | drawingarea1:curve_to 1 -10 300 200 -100 120 80 3 | drawingarea1:set_source_rgba 1 red 4 | drawingarea1:set_line_width 1 6 5 | drawingarea1:set_line_cap 1 round 6 | drawingarea1:stroke 1 7 | 8 | drawingarea1:rotate 1 3 9 | drawingarea1:rectangle 1 50 50 90 70 10 | drawingarea1:set_source_rgba 1 rgba(50,50,50,.5) 11 | drawingarea1:fill 1 12 | 13 | drawingarea1:rotate 1 -50 14 | drawingarea1:move_to 1 -50 100 15 | drawingarea1:rel_move_for 1 w Pipeglade! 16 | drawingarea1:set_font_face 1 italic normal STIXGeneral 17 | drawingarea1:set_font_size 1 24 18 | drawingarea1:set_source_rgba 1 darkblue 19 | drawingarea1:show_text 1 Pipeglade! 20 | 21 | main:snapshot gh-pages/GtkDrawingArea.svg 22 | _:main_quit 23 | -------------------------------------------------------------------------------- /www-template/statcounter.html: -------------------------------------------------------------------------------- 1 | 2 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /widget-examples/checkbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | checkbutton 10 | True 11 | True 12 | False 13 | 0 14 | True 15 | True 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /widget-examples/window.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 150 7 | 100 8 | False 9 | 5 10 | 11 | 12 | True 13 | False 14 | 3 15 | 3 16 | 3 17 | 3 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /widget-examples/spinbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 100 7 | 42 8 | 1 9 | 10 10 | 11 | 12 | False 13 | 14 | 15 | True 16 | True 17 | adjustment1 18 | True 19 | 8.1699999999999999 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /widget-examples/comboboxtext.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 1 12 | True 13 | 14 | item one 15 | item two 16 | 17 | 18 | 19 | False 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /widget-examples/menubutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | 9 | 10 | False 11 | 12 | 13 | True 14 | True 15 | True 16 | 4 17 | 4 18 | 4 19 | 4 20 | menu1 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /widget-examples/expander.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | 12 | 13 | True 14 | False 15 | label 16 | 17 | 18 | 19 | 20 | True 21 | False 22 | expander 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /widget-examples/scale.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 100 7 | 56 8 | 1 9 | 10 10 | 11 | 12 | False 13 | 14 | 15 | 150 16 | True 17 | True 18 | adjustment1 19 | True 20 | False 21 | 76.030000000000001 22 | 4 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2017 Bert Burgemeister 2 | 3 | The MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /widget-examples/textview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 7 | 8 | 9 | False 10 | 11 | 12 | True 13 | True 14 | word 15 | textbuffer1 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /widget-examples/viewport.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | always 12 | in 13 | False 14 | 15 | 16 | True 17 | False 18 | 19 | 20 | True 21 | False 22 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /widget-examples/overlay.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | 150 10 | 100 11 | True 12 | False 13 | 14 | 15 | True 16 | False 17 | label one 18 | 19 | 20 | -1 21 | 22 | 23 | 24 | 25 | True 26 | False 27 | label two 28 | 90 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /www-template/outline.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /www-template/index-toc.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |

10 | 11 | 12 | 13 | 14 |

15 |
16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | # 25 | 26 | 27 | 28 | 29 | 30 | 31 | · 32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /widget-examples/frame.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 0 12 | 13 | 14 | True 15 | False 16 | 12 17 | 18 | 19 | 80 20 | 50 21 | True 22 | False 23 | label 24 | 25 | 26 | 27 | 28 | 29 | 30 | True 31 | False 32 | frame1 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /widget-examples/printunixdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | False 8 | 9 | 10 | True 11 | False 12 | label 13 | 14 | 15 | 16 | 17 | False 18 | dialog 19 | main 20 | 21 | 22 | False 23 | vertical 24 | 2 25 | 26 | 27 | False 28 | end 29 | 30 | 31 | False 32 | False 33 | 0 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /widget-examples/paned.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 250 7 | 50 8 | False 9 | 10 | 11 | True 12 | True 13 | 4 14 | 4 15 | 4 16 | True 17 | 18 | 19 | True 20 | False 21 | label 22 | 23 | 24 | False 25 | True 26 | 27 | 28 | 29 | 30 | True 31 | False 32 | label 33 | 34 | 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /widget-examples/switch.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 4 12 | 4 13 | 4 14 | 4 15 | 8 16 | 17 | 18 | True 19 | True 20 | True 21 | True 22 | 23 | 24 | False 25 | True 26 | 0 27 | 28 | 29 | 30 | 31 | True 32 | True 33 | 34 | 35 | False 36 | True 37 | 1 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /widget-examples/scrolledwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 100 7 | 45 8 | 1 9 | 10 10 | 11 | 12 | False 13 | 14 | 15 | True 16 | True 17 | adjustment1 18 | always 19 | in 20 | False 21 | False 22 | 23 | 24 | True 25 | False 26 | 27 | 28 | True 29 | False 30 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /widget-examples/aspectframe.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | vertical 12 | 13 | 14 | 15 | 16 | 17 | 200 18 | True 19 | False 20 | 0 21 | 7 22 | False 23 | 24 | 25 | True 26 | False 27 | 5 28 | 5 29 | 7 : 1 30 | 31 | 32 | 33 | 34 | False 35 | True 36 | 1 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /widget-examples/togglebutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 4 12 | 4 13 | 4 14 | 4 15 | 8 16 | 17 | 18 | on/off 19 | True 20 | True 21 | True 22 | True 23 | 24 | 25 | False 26 | True 27 | 0 28 | 29 | 30 | 31 | 32 | on/off 33 | True 34 | True 35 | True 36 | 37 | 38 | False 39 | True 40 | 1 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /widget-examples/statusbar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 200 8 | 100 9 | 10 | 11 | True 12 | False 13 | vertical 14 | 15 | 16 | True 17 | False 18 | 19 | 20 | True 21 | True 22 | 0 23 | 24 | 25 | 26 | 27 | True 28 | False 29 | 10 30 | 10 31 | 10 32 | 10 33 | 6 34 | 6 35 | vertical 36 | 2 37 | 38 | 39 | False 40 | True 41 | 1 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /widget-examples/separator.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | vertical 12 | 13 | 14 | 200 15 | True 16 | False 17 | label 18 | 0.87999999523162842 19 | 20 | 21 | True 22 | True 23 | 0 24 | 25 | 26 | 27 | 28 | True 29 | False 30 | 31 | 32 | False 33 | True 34 | 1 35 | 36 | 37 | 38 | 39 | True 40 | False 41 | label 42 | 0.11999999731779099 43 | 44 | 45 | True 46 | True 47 | 2 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /widget-examples/box.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | True 12 | 13 | 14 | True 15 | False 16 | label 17 | 18 | 19 | False 20 | True 21 | 0 22 | 23 | 24 | 25 | 26 | button 27 | True 28 | True 29 | True 30 | 31 | 32 | False 33 | True 34 | 1 35 | 36 | 37 | 38 | 39 | True 40 | False 41 | 50 42 | audio-x-generic 43 | 3 44 | 45 | 46 | False 47 | True 48 | 2 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /widget-examples/linkbutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 4 12 | 4 13 | 4 14 | 4 15 | 4 16 | 17 | 18 | button 19 | True 20 | True 21 | True 22 | none 23 | http://glade.gnome.org 24 | 25 | 26 | False 27 | True 28 | 0 29 | 30 | 31 | 32 | 33 | button 34 | True 35 | True 36 | True 37 | none 38 | http://pipeglade.boundp.org 39 | True 40 | 41 | 42 | False 43 | True 44 | 1 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Graphical User Interfaces, The UNIX Way 2 | ======================================= 3 | 4 | Pipeglade is a helper program that displays graphical user interfaces 5 | for other programs. It renders the GUI definition found in a 6 | GtkBuilder file (created using the Glade Interface Designer), and 7 | communicates with the main program solely via pipes or fifos. 8 | 9 | Visit http://pipeglade.boundp.org 10 | 11 | 12 | INSTALLATION 13 | ============ 14 | 15 | GTK+ v3.2 or newer and libxml2 are required. Prerequisite Debian 16 | packages are pkg-config, libgtk-3-dev, and libxml2-dev. 17 | 18 | make 19 | 20 | should build a usable binary. 21 | 22 | make prefix=/some/dir mandir=/another/dir install 23 | 24 | installs the pipeglade binary in /some/dir/bin/ and its manual page in 25 | /another/dir/man1/. Default prefix is /usr/local/. Default mandir is 26 | $(prefix)/man. 27 | 28 | To get rid of the installation, call 29 | 30 | make uninstall 31 | 32 | or 33 | 34 | make prefix=/some/dir mandir=/another/dir uninstall 35 | 36 | respectively. 37 | 38 | 39 | TESTS AND FIRST STEPS 40 | ===================== 41 | 42 | ./pipegladetest.sh 43 | 44 | runs all of pipeglade's tests, some of which require human 45 | assistance. Subsets of these tests can be run by 46 | 47 | ./pipegladetest.sh automatic 48 | 49 | or 50 | 51 | ./pipegladetest.sh interactive 52 | 53 | The GtkBuilder file for the test GUI, pipeglade.ui, is also used in 54 | the demonstration script 55 | 56 | ./echo.sh, 57 | 58 | which redirects the messages initiated by user activity on the GUI 59 | back into a text area of the same GUI. Another example, 60 | 61 | ./clock.sh, 62 | 63 | uses the GtkBuilder file clock.ui to display an analog clock, and 64 | 65 | ./calc.sh 66 | 67 | harnesses dc(1) to provide an RPN desk calculator. 68 | 69 | There are three other example GtkBuilder files. To see how they look 70 | like, call 71 | 72 | ./pipeglade -u simple_dialog.ui 73 | 74 | or 75 | 76 | ./pipeglade -u simple_open.ui. 77 | 78 | The third one, bad_window.ui, is for testing, and is intentionally 79 | broken. 80 | 81 | 82 | SUCCESSFUL BUILDS 83 | ================= 84 | 85 | Debian wheezy, GTK+ 3.4.2 86 | Debian Jessie, GTK+ 3.14.5 87 | Debian Stretch, GTK+ 3.22.11 88 | FreeBSD 10.1, GTK+ 3.14.5 89 | FreeBSD 10.2, GTK+ 3.16.6 90 | FreeBSD 10.3, GTK+ 3.18.8 91 | Arch Linux, GTK+ 3.18.5 92 | -------------------------------------------------------------------------------- /widget-examples/buttonbox.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 2 12 | start 13 | 14 | 15 | button 16 | True 17 | True 18 | True 19 | 20 | 21 | True 22 | True 23 | 0 24 | 25 | 26 | 27 | 28 | button 29 | True 30 | True 31 | True 32 | 33 | 34 | True 35 | True 36 | 1 37 | 38 | 39 | 40 | 41 | button 42 | True 43 | True 44 | True 45 | 46 | 47 | True 48 | True 49 | 2 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /widget-examples/dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | label 12 | 13 | 14 | 15 | 16 | False 17 | dialog 18 | 19 | 20 | False 21 | vertical 22 | 2 23 | 24 | 25 | False 26 | end 27 | 28 | 29 | button 30 | True 31 | True 32 | True 33 | 34 | 35 | True 36 | True 37 | 0 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | False 46 | False 47 | 0 48 | 49 | 50 | 51 | 52 | True 53 | False 54 | label 55 | 56 | 57 | False 58 | True 59 | 1 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /clock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMG=$1 # optional image file; exit when written 4 | 5 | ( 6 | HRLN=100 7 | MNLN=195 8 | SCLN=195 9 | R=215 10 | ## drawing a clock face 11 | echo "drawingarea1:translate 10000 220 220" 12 | echo "drawingarea1:set_line_cap 10000 round" 13 | echo "drawingarea1:set_source_rgba 10000 black" 14 | echo "drawingarea1:arc 10000 0 0 $R 0 360" 15 | echo "drawingarea1:fill 10000" 16 | # date 17 | echo "drawingarea1:set_font_face 10000 normal bold" 18 | echo "drawingarea1:set_font_size 10000 25" 19 | echo "drawingarea1:set_source_rgba 10000 white" 20 | echo "drawingarea1:move_to 10000 0 30" 21 | echo "drawingarea1:rel_move_for 10010 n Today" 22 | echo "drawingarea1:show_text 10020 Today" 23 | # hour hand 24 | echo "drawingarea1:set_source_rgba 10000 rgba(255,255,0,.8)" 25 | echo "drawingarea1:set_dash 10000" 26 | echo "drawingarea1:set_line_width 10000 30" 27 | echo "drawingarea1:move_to 10000 0 0" 28 | echo "drawingarea1:arc 10030 0 0 $HRLN -90 -90" 29 | echo "drawingarea1:stroke 10000" 30 | # minute hand 31 | echo "drawingarea1:set_source_rgba 10000 rgba(0,255,0,.7)" 32 | echo "drawingarea1:set_dash 10000" 33 | echo "drawingarea1:set_line_width 10000 25" 34 | echo "drawingarea1:move_to 10000 0 0" 35 | echo "drawingarea1:arc 10040 0 0 $MNLN -90 -90" 36 | echo "drawingarea1:stroke 10000" 37 | # second hand 38 | echo "drawingarea1:set_source_rgba 10000 cyan" 39 | echo "drawingarea1:set_dash 10000 4 4" 40 | echo "drawingarea1:set_line_width 10000 2" 41 | echo "drawingarea1:move_to 10000 0 0" 42 | echo "drawingarea1:arc 10050 0 0 $SCLN -90 -90" 43 | echo "drawingarea1:stroke 10000" 44 | ## now turning the hands by replacing some of the commands above 45 | HR0=0 46 | MN0=0 47 | SC0=0 48 | while true; do 49 | D=`date +%F` 50 | HR=$(((`date +"%s"`/1200%72*10)+270+720)) 51 | MN=$(((`date +"%s"`/20%180*2)+270+360)) 52 | SC=$((((`date +"%s"`%60)*6)+270)) 53 | # date and hour hand 54 | if [[ HR -ne HR0 ]]; then 55 | echo "drawingarea1:rel_move_for =10010 n $D" 56 | echo "drawingarea1:show_text =10020 $D" 57 | echo "drawingarea1:arc =10030 0 0 $HRLN $HR $HR" 58 | HR0=$H 59 | fi 60 | # minute hand 61 | if [[ MN -ne MN0 ]]; then 62 | echo "drawingarea1:arc =10040 0 0 $MNLN $MN $MN" 63 | MN0=$MN 64 | fi 65 | # second hand 66 | echo "drawingarea1:arc =10050 0 0 $SCLN $SC $SC" 67 | SC0=$SC 68 | if [ -z "$IMG" ]; then # running clock 69 | sleep 1 70 | else # write image file and exit 71 | echo "main:snapshot $IMG" 72 | echo "_:main_quit" 73 | fi 74 | done 75 | ) | ./pipeglade -u clock.ui 76 | -------------------------------------------------------------------------------- /widget-examples/grid.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | True 12 | True 13 | 14 | 15 | button 16 | True 17 | True 18 | True 19 | 20 | 21 | 2 22 | 2 23 | 24 | 25 | 26 | 27 | True 28 | False 29 | label 30 | 31 | 32 | 1 33 | 1 34 | 35 | 36 | 37 | 38 | True 39 | False 40 | label 41 | 42 | 43 | 0 44 | 0 45 | 46 | 47 | 48 | 49 | button 50 | True 51 | True 52 | True 53 | 54 | 55 | 0 56 | 2 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /widget-examples/radiobutton.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | vertical 12 | start 13 | 14 | 15 | radiobutton 16 | True 17 | True 18 | False 19 | 0 20 | True 21 | radiobutton2 22 | 23 | 24 | True 25 | True 26 | 0 27 | 28 | 29 | 30 | 31 | radiobutton 32 | True 33 | True 34 | False 35 | 0 36 | True 37 | True 38 | radiobutton3 39 | 40 | 41 | True 42 | True 43 | 1 44 | 45 | 46 | 47 | 48 | radiobutton 49 | True 50 | True 51 | False 52 | 0 53 | True 54 | True 55 | radiobutton2 56 | 57 | 58 | True 59 | True 60 | 2 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /widget-examples/notebook.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | 12 | 13 | True 14 | False 15 | label 16 | 17 | 18 | 19 | 20 | True 21 | False 22 | page 1 23 | 24 | 25 | False 26 | 27 | 28 | 29 | 30 | button 31 | True 32 | True 33 | True 34 | 35 | 36 | 1 37 | 38 | 39 | 40 | 41 | True 42 | False 43 | page 2 44 | 45 | 46 | 1 47 | False 48 | 49 | 50 | 51 | 52 | True 53 | False 54 | label 55 | 56 | 57 | 2 58 | 59 | 60 | 61 | 62 | True 63 | False 64 | page 3 65 | 66 | 67 | 2 68 | False 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /widget-examples/infobar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | True 11 | False 12 | 13 | 14 | False 15 | 6 16 | end 17 | 18 | 19 | 20 | 21 | 22 | button 23 | True 24 | True 25 | True 26 | 27 | 28 | True 29 | True 30 | 1 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | False 39 | False 40 | 0 41 | 42 | 43 | 44 | 45 | False 46 | 16 47 | 48 | 49 | 50 | 51 | 52 | True 53 | False 54 | label 55 | 56 | 57 | False 58 | True 59 | 1 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | False 68 | False 69 | 0 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /simple_open.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | dialog 8 | 9 | 10 | False 11 | vertical 12 | 2 13 | 14 | 15 | False 16 | end 17 | 18 | 19 | gtk-cancel 20 | True 21 | True 22 | True 23 | True 24 | 25 | 26 | True 27 | True 28 | 0 29 | 30 | 31 | 32 | 33 | gtk-ok 34 | True 35 | True 36 | True 37 | True 38 | 39 | 40 | True 41 | True 42 | 1 43 | 44 | 45 | 46 | 47 | gtk-apply 48 | True 49 | True 50 | True 51 | True 52 | 53 | 54 | True 55 | True 56 | 2 57 | 58 | 59 | 60 | 61 | False 62 | False 63 | 0 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /widget-examples/filechooserdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | label 12 | 13 | 14 | 15 | 16 | False 17 | dialog 18 | 19 | 20 | False 21 | vertical 22 | 2 23 | 24 | 25 | False 26 | end 27 | 28 | 29 | gtk-cancel 30 | True 31 | True 32 | True 33 | True 34 | 35 | 36 | True 37 | True 38 | 0 39 | 40 | 41 | 42 | 43 | gtk-ok 44 | True 45 | True 46 | True 47 | True 48 | 49 | 50 | True 51 | True 52 | 1 53 | 54 | 55 | 56 | 57 | gtk-apply 58 | True 59 | True 60 | True 61 | True 62 | 63 | 64 | True 65 | True 66 | 2 67 | 68 | 69 | 70 | 71 | False 72 | False 73 | 0 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /www-template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PIPEGLADE 6 | 7 | 8 | 9 |
10 |
11 |

PIPEGLADE
12 | Graphical User Interfaces, The UNIX Way

13 |

14 |

15 | 16 |
17 |

18 | Pipeglade is a helper program that displays graphical user 19 | interfaces for other programs. It renders the GUI definition 20 | found in a GtkBuilder file (created using 21 | the 22 | Glade Interface 23 | Designer), and communicates with the main program solely 24 | via pipes or fifos. 25 |

26 | To have its GUI rendered by pipeglade, a program must be able to 27 |

    28 |
  • 29 | send plain text commands to standard output or a named 30 | pipe and/or 31 |
  • 32 | receive and parse simple plain text messages from standard 33 | input or a named pipe. 34 |
35 | Pipeglade strives for simplicity; it provides access to a 36 | subset of the features available in GTK+ v3.2. 37 |

38 | See below for the set of widgets accessible via pipeglade. 39 | (Widgets 40 | of any kind can grab focus and change visibility, 41 | sensitivity, style, 42 | size, and tooltip.) 43 |

44 |

45 |

DOCUMENTATION

46 | Pipeglade has a manual page: 47 | pipeglade(1)[HTML], 48 | pipeglade(1)[PDF] 49 |
50 |
51 |

WIDGET GALLERY

52 | 53 |
54 |
55 |

EXAMPLE

56 | The shell script clock.sh uses 57 | pipeglade to display an analog clock on the interface 58 | defined in the GtkBuilder 59 | file clock.ui. The script was 60 | also used to generate the image below. 61 |

62 | 63 |

64 |
65 |

SOURCE CODE

66 | 74 |
75 |
76 |

LICENSE

77 | 78 |
79 |
80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /widget-examples/menuitem.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | True 14 | False 15 | _File 16 | True 17 | 18 | 19 | True 20 | False 21 | 22 | 23 | gtk-new 24 | True 25 | False 26 | True 27 | True 28 | 29 | 30 | 31 | 32 | gtk-open 33 | True 34 | False 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | gtk-save 42 | True 43 | False 44 | True 45 | True 46 | 47 | 48 | 49 | 50 | gtk-save-as 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | 58 | 59 | True 60 | False 61 | 62 | 63 | 64 | 65 | gtk-quit 66 | True 67 | False 68 | True 69 | True 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /widget-examples/imagemenuitem.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | True 14 | False 15 | _File 16 | True 17 | 18 | 19 | True 20 | False 21 | 22 | 23 | gtk-new 24 | True 25 | False 26 | True 27 | True 28 | 29 | 30 | 31 | 32 | gtk-open 33 | True 34 | False 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | gtk-save 42 | True 43 | False 44 | True 45 | True 46 | 47 | 48 | 49 | 50 | gtk-save-as 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | 58 | 59 | True 60 | False 61 | 62 | 63 | 64 | 65 | gtk-quit 66 | True 67 | False 68 | True 69 | True 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /widget-examples/separatormenuitem.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | True 14 | False 15 | _File 16 | True 17 | 18 | 19 | True 20 | False 21 | 22 | 23 | gtk-new 24 | True 25 | False 26 | True 27 | True 28 | 29 | 30 | 31 | 32 | gtk-open 33 | True 34 | False 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | gtk-save 42 | True 43 | False 44 | True 45 | True 46 | 47 | 48 | 49 | 50 | gtk-save-as 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | 58 | 59 | True 60 | False 61 | 62 | 63 | 64 | 65 | gtk-quit 66 | True 67 | False 68 | True 69 | True 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /simple_dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | dialog 8 | 9 | 10 | False 11 | vertical 12 | 2 13 | 14 | 15 | False 16 | end 17 | 18 | 19 | generic button 20 | True 21 | True 22 | True 23 | 24 | 25 | True 26 | True 27 | 0 28 | 29 | 30 | 31 | 32 | gtk-close 33 | True 34 | True 35 | True 36 | True 37 | 38 | 39 | True 40 | True 41 | 1 42 | 43 | 44 | 45 | 46 | gtk-apply 47 | True 48 | True 49 | True 50 | True 51 | 52 | 53 | True 54 | True 55 | 2 56 | 57 | 58 | 59 | 60 | gtk-ok 61 | True 62 | True 63 | True 64 | True 65 | 66 | 67 | True 68 | True 69 | 3 70 | 71 | 72 | 73 | 74 | False 75 | False 76 | 0 77 | 78 | 79 | 80 | 81 | True 82 | False 83 | dummy text 84 | 85 | 86 | True 87 | True 88 | 1 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2017 Bert Burgemeister 2 | 3 | # Permission is hereby granted, free of charge, to any person 4 | # obtaining a copy of this software and associated documentation files 5 | # (the "Software"), to deal in the Software without restriction, 6 | # including without limitation the rights to use, copy, modify, merge, 7 | # publish, distribute, sublicense, and/or sell copies of the Software, 8 | # and to permit persons to whom the Software is furnished to do so, 9 | # subject to the following conditions: 10 | 11 | # The above copyright notice and this permission notice shall be 12 | # included in all copies or substantial portions of the Software. 13 | 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 18 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | prefix ?= /usr/local 24 | bindir ?= $(prefix)/bin 25 | mandir ?= $(prefix)/man 26 | man1dir ?= $(mandir)/man1 27 | CCFLAGS += -Wall -Wextra -pedantic -g 28 | # FreeBSD: 29 | # Suppressing warning: named variadic macros are a GNU extension 30 | # in /usr/local/include/X11/Xfuncproto.h:157:24: 31 | CCFLAGS += -Wno-variadic-macros 32 | CCFLAGS += -std=c99 33 | CCFLAGS += -D_POSIX_C_SOURCE=200809L 34 | CCFLAGS += -D_XOPEN_SOURCE=700 35 | CCFLAGS += `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` 36 | CCFLAGS += `pkg-config --cflags --libs gtk+-unix-print-3.0` 37 | CCFLAGS += `pkg-config --cflags --libs libxml-2.0` 38 | CC != which cc 39 | 40 | 41 | all: pipeglade 42 | 43 | pipeglade: pipeglade.c Makefile 44 | $(CC) $< -o $@ $(CCFLAGS) 45 | 46 | install: pipeglade pipeglade.1 47 | install -d $(bindir) $(man1dir) 48 | install pipeglade $(bindir) 49 | install -m644 pipeglade.1 $(man1dir) 50 | 51 | uninstall: 52 | rm -f $(bindir)/pipeglade 53 | rm -f $(man1dir)/pipeglade.1.gz 54 | 55 | clean: 56 | rm -f pipeglade 57 | rm -rf gh-pages 58 | 59 | .PHONY: install uninstall clean 60 | 61 | 62 | 63 | # Build targets end here. The rest of this Makefile is only useful 64 | # for project maintenance. 65 | # 66 | # It works with FreeBSD's version of make (aka pmake). It won't work 67 | # with GNU make. 68 | ###################################################################### 69 | VERSION != (which git >/dev/null && git describe --tags || echo "NONE") | cut -d "-" -f 1 70 | 71 | CODE_VERSION != awk '/\#define VERSION/{print $$3}' pipeglade.c | tr -d '"' 72 | NEWS_VERSION != awk '/^[0-9]+\.[0-9]+\.[0-9]+ .*([0-9]+-[01][0-9]-[0-3][0-9])/{print $$1}' NEWS | head -n1 73 | NEWS_DATE != awk '/^[0-9]+\.[0-9]+\.[0-9]+ .*([0-9]+-[01][0-9]-[0-3][0-9])/{print substr($$2, 2, 10)}' NEWS | head -n1 74 | TODAY != date +%F 75 | MANPAGE_DATE != grep "^\.Dd " pipeglade.1 76 | MANPAGE_TODAY != date '+.Dd %B %e, %Y' | awk '{print $$1, $$2, $$3, $$4}' 77 | .SUFFIXES: .ui .svg .jpg 78 | 79 | 80 | # Create a new git tag only if there is a NEWS headline in the format 81 | # 1.2.3 (2015-03-22) 82 | 83 | # where 1.2.3 matches the current pipeglade version and the date is of 84 | # today, and if pipeglade.1 has today's date in its .Dd line. 85 | # (NEWS headlines are lines that start at column 0.) 86 | git-tag: 87 | @if test "$(NEWS_DATE)" != "$(TODAY)"; then \ 88 | echo "NEWS: $(NEWS_DATE) != $(TODAY)"; false; \ 89 | fi 90 | @if test "$(NEWS_VERSION)" != "$(CODE_VERSION)"; then \ 91 | echo "NEWS: $(NEWS_VERSION) != $(CODE_VERSION)"; false; \ 92 | fi 93 | @if test "$(MANPAGE_DATE)" != "$(MANPAGE_TODAY)"; then \ 94 | echo "MANPAGE: $(MANPAGE_DATE) != $(MANPAGE_TODAY)"; false; \ 95 | fi 96 | git tag $(CODE_VERSION); 97 | 98 | 99 | # Extract a list of actions from source code... 100 | prog-actions: 101 | @awk -F\" '/eql\((ud->)?action, \"[a-zA-Z0-9_-]+\"/{print $$2}' pipeglade.c | sort -u 102 | 103 | # ... and from manual page 104 | man-actions: 105 | @awk -F: '/Cm :[a-zA-Z0-9_-]+/{print $$2}' pipeglade.1 | awk '{print $$1}' | sort -u 106 | 107 | # Extract from manual page a list of subsections on widgets... 108 | man-widgets: 109 | @awk '/\.Ss Gtk[A-Z][a-zA-Z]+$$/{print $$2}' pipeglade.1 | sort -u 110 | 111 | # ... and the respective TOC entries 112 | man-toc: 113 | @awk '/BEGIN_TOC/,/END_TOC/' pipeglade.1 | awk '/\.Sx Gtk[A-Z][a-zA-Z]+ [,.]$$/{print $$2}' 114 | 115 | # Extract from manual page an outline of the headings 116 | man-outline: www-template/outline.xsl gh-pages/pipeglade.1.html 117 | @xsltproc --html ${.ALLSRC} 118 | 119 | # Items marked done in list of all widgets 120 | done-list: 121 | @awk '!/^#/&&/Gtk[A-Z][a-zA-Z]/&&/done/{print $$1}' buildables.txt 122 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | 5.0.0 (not yet implemented) 2 | ------------------ 3 | * API change, GtkSpinButton: rename action :set_text to :set_value; 4 | rename response tag :text to :value. 5 | * API change, GtkStatusbar: rename actions :push_id, :pop_id, and 6 | :remove_all_id to :push, :pop, and :remove_all, respectively. 7 | Remove the original functionality of :push, :pop, and :remove_all. 8 | * API change, GtkSocket: rename response tags :plug-added and 9 | :plug-removed to :plug_added and :plug_removed, respectively. 10 | 11 | 4.8.0 (2017-10-11) 12 | ------------------ 13 | * Add support for GtkAspectFrame, GtkLinkButton, and GtkMenu. 14 | * Add documentation for GtkMenuBar, GtkMenuButton, GtkPaned, and 15 | GtkSizeGroup. 16 | * Improve and document previously undocumented :ping command. 17 | 18 | 4.7.0 (2016-06-24) 19 | ------------------ 20 | * Add command line option -b for sending pipeglade to background. 21 | * Add command line option -l for logging duration of pipeglade 22 | command execution. 23 | * Add command line option -O for redirecting stderr. 24 | * Widget names are alphanumeric including underscores and (new) 25 | hyphens. 26 | * Reject commands with excess arguments. 27 | * Support temporary blocking of feedback messages. 28 | * GtkDialog and GtkFileChooserDialog now respond to the commands 29 | that work for GtkWindow. 30 | * Toplevel windows report 'name:closed' when closed by the window 31 | manager. 32 | * GtkStatusbar commands take non-whitespace strings as context id, 33 | not just integers. 34 | * Add missing GtkStatusbar command remove_all_id. 35 | * Support saving snapshots of widgets into image files (eps, ps, 36 | pdf, svg). 37 | * Support coordinate transformation in GtkDrawingArea. 38 | * New ability for GtkDrawingArea commands to insert themselves at 39 | arbitrary positions in the current list of drawing operations, not 40 | just at the end. 41 | * Remove GtkDrawingArea command refresh; refreshing happens 42 | automatically. 43 | * Add GtkDrawingArea command set_font_face. 44 | * Add GtkDrawingArea command rel_move_for supporting text placement 45 | with respect to center, upper left corner, etc., of the text. 46 | * Add GtkScale and GtkSpinButton commands set_range, set_increments, 47 | and (GtkScale only) set_fill_level. 48 | * Command execution time improved by a factor of about 20. 49 | * Avoid silly precision on mouse coordinates emitted from GtkEventBox. 50 | * Floating point format in commands and messages is now independent 51 | of the current locale. 52 | 53 | 4.6.0 (2016-03-27) 54 | ------------------ 55 | * Make sure fifos are set to mode 0600 before being used. 56 | * Add support for creating tooltips. 57 | * Add support for GtkEventBox which reports keyboard and pointer 58 | device activity. 59 | * Add support for widgets grabbing focus. 60 | 61 | 4.5.0 (2016-03-25) 62 | ------------------ 63 | * Add GtkStatusbar commands that take a context id argument. 64 | * Add support for changing widget size. 65 | * Add support for GtkScrolledWindow. 66 | 67 | 4.4.0 (2015-12-12) 68 | ------------------ 69 | * Fix a subtle GTK-related bug where freshly created fifos vanished. 70 | * Fix a bug involving GTK+ 3.14 and GtkTreeView. 71 | * Add a --display option. 72 | 73 | 4.3.0 (2015-11-30) 74 | ------------------ 75 | * Support GtkTreeStore. 76 | * Support editing in GtkTreeView. 77 | * Data behind GtkTextView and GtkTreeView can be saved into files 78 | where they are stored as a sequence of ordinary pipeglade commands. 79 | * Arbitrary commands can be read from files. 80 | * Setting fields of a non-existing GtkTreeStore/GtkListStore row 81 | automatically creates any nodes necessary in the supporting tree 82 | structure. 83 | 84 | 4.2.0 (2015-11-08) 85 | ------------------ 86 | * Support GtkWindow moving and resizing. 87 | * Eliminate any use of sleep(), avoiding spinning. 88 | 89 | 4.1.0 (2015-10-02) 90 | ------------------ 91 | * Add support for the XEmbed protocol, both as a GtkPlug and a 92 | GtkSocket. 93 | * Add support for GtkPrintUnixDialog. 94 | * Improve build process. 95 | 96 | 4.0.0 (2015-09-23) 97 | ------------------ 98 | * Change API: Remove deprecated commands override_color, 99 | override_background_color, and override_font. 100 | * Disable runtime GLIB deprecation warnings. 101 | 102 | 3.1.1 (2015-09-22) 103 | ------------------ 104 | * Fix 3.1.0 which lacked most of the advertised changes. 105 | 106 | 3.1.0 (2015-09-22) 107 | ------------------ 108 | * Code cleanup. 109 | * Add command for changing widget style properties. 110 | * Deprecate commands override_color, override_background_color, and 111 | override_font. 112 | 113 | 3.0.0 (2015-02-27) 114 | ------------------ 115 | * Change API: No user-visible callbacks anymore, simplifying UI 116 | creation. (There are a few additional naming conventions, though.) 117 | * Change API: Changed feedback messages for a couple of widgets. 118 | * Synthetically fired events have become a bit more useful. 119 | * Improve handling of GtkProgressBar and GtkStatusbar. 120 | 121 | 2.2.0 (2015-02-20) 122 | ------------------ 123 | * Add support for GtkDrawingArea. 124 | 125 | 2.1.0 (2015-01-26) 126 | ------------------ 127 | * Add support for GtkExpander, GtkFrame, GtkNotebook, and 128 | GtkSwitch. 129 | * Add support for changing of GUI fonts and colors. 130 | * Rewrite parts of manual page. 131 | 132 | 2.0.1 (2015-01-18) 133 | ------------------ 134 | * Bug fix in the echo.sh example script. 135 | 136 | 2.0.0 (2015-01-16) 137 | ------------------ 138 | * Change output of GtkToggleButton, GtkCheckButton, and 139 | GtkRadioButton. 140 | 141 | 1.2.1 (2015-01-11) 142 | ------------------ 143 | * Change capitalization of a few error messages. 144 | * Bug fix in manual page. 145 | 146 | 1.2.0 (2015-01-08) 147 | ------------------ 148 | * Add a command for firing GUI callbacks synthetically. 149 | 150 | 1.1.0 (2015-01-06) 151 | ------------------ 152 | * Change response of GtkTreeView which now reports an additional 153 | 'clicked' message and the values of all selected rows. 154 | 155 | 1.0.0 (2015-01-04) 156 | ------------------ 157 | * Change API: commands now look like "name:action data" rather than 158 | "name:widget:action data". 159 | 160 | 0.3.1 (2015-01-03) 161 | ------------------ 162 | * Start a NEWS file 163 | 164 | 0.3.0 (2015-01-02) 165 | ------------------ 166 | * Added support GtkColorButton, GtkFontButton, and for graying out 167 | and hiding of arbitrary widgets. 168 | -------------------------------------------------------------------------------- /Makefile.publish: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2017 Bert Burgemeister 2 | 3 | # Permission is hereby granted, free of charge, to any person 4 | # obtaining a copy of this software and associated documentation files 5 | # (the "Software"), to deal in the Software without restriction, 6 | # including without limitation the rights to use, copy, modify, merge, 7 | # publish, distribute, sublicense, and/or sell copies of the Software, 8 | # and to permit persons to whom the Software is furnished to do so, 9 | # subject to the following conditions: 10 | 11 | # The above copyright notice and this permission notice shall be 12 | # included in all copies or substantial portions of the Software. 13 | 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 18 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | 24 | # Prepare the www directory 25 | 26 | clean: 27 | rm -rf gh-pages 28 | 29 | VERSION != (which git >/dev/null && git describe --tags || echo "NONE") | cut -d "-" -f 1 30 | GH_PAGES_SIMPLE = style.css CNAME README robots.txt 31 | GH_PAGES_PUBLIC = ${GH_PAGES_SIMPLE} pipeglade.1.html pipeglade.1.pdf clock.jpg clock.ui.txt clock.sh.txt 404.html 32 | GH_PAGES_TEMP = LICENSE gallery.html index-hrefs 33 | .if ${.MAKE.LEVEL} == 0 34 | WIDGETS != make man-widgets 35 | .endif 36 | WIDGET_TXTS != ls -1 widget-examples | grep "\.txt$$" 37 | SNAPSHOTS = ${WIDGETS:C|(.*)|gh-pages/\1.jpg|} 38 | 39 | gh-pages: gh-pages-untested test-index-hrefs 40 | rm -f ${GH_PAGES_TEMP:S|^|gh-pages/|} 41 | 42 | gh-pages-untested: ${GH_PAGES_PUBLIC:S|^|gh-pages/|} $(SNAPSHOTS) gh-pages/index.html 43 | 44 | .for FILE in ${GH_PAGES_SIMPLE} 45 | gh-pages/${FILE}: www-template/${FILE} 46 | @mkdir -p gh-pages 47 | cp ${.ALLSRC} ${.TARGET} 48 | .endfor 49 | 50 | gh-pages/index.html: pipeglade gh-pages/pipeglade.1.html www-template/index.html \ 51 | gh-pages/gallery.html gh-pages/LICENSE \ 52 | www-template/statcounter.html www-template/index-toc.xsl Makefile 53 | xsltproc --html -o ${.TARGET} www-template/index-toc.xsl www-template/index.html 54 | echo -e '//d\n-r gh-pages/gallery.html\nwq' | ed -s gh-pages/index.html 55 | echo -e '//d\n-r gh-pages/LICENSE\nwq' | ed -s gh-pages/index.html 56 | echo -e ',s/_PUT_VERSION_HERE_/$(VERSION)/g\nwq' | ed -s gh-pages/index.html 57 | echo -e '/<\/body>/-r www-template/statcounter.html\nwq' | ed -s gh-pages/index.html 58 | 59 | gh-pages/LICENSE: LICENSE Makefile Makefile.publish 60 | @mkdir -p gh-pages 61 | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g; s|^$$|

|g' ${.TARGET} 62 | 63 | gh-pages/404.html: gh-pages/pipeglade.1.html Makefile www-template/statcounter.html 64 | @mkdir -p gh-pages 65 | cp www-template/404.html gh-pages/ 66 | echo -e '/<\/body>/-r www-template/statcounter.html\nwq' | ed -s gh-pages/404.html 67 | 68 | gh-pages/clock.sh.txt gh-pages/clock.ui.txt: clock.sh clock.ui 69 | @mkdir -p gh-pages 70 | cp clock.sh gh-pages/clock.sh.txt 71 | cp clock.ui gh-pages/clock.ui.txt 72 | 73 | gh-pages/pipeglade.1.html gh-pages/pipeglade.1.pdf: pipeglade.1 Makefile www-template/statcounter.html 74 | @mkdir -p gh-pages 75 | mandoc -Wall -T xhtml -O style=style.css pipeglade.1 > gh-pages/pipeglade.1.html 76 | mandoc -Wall -T pdf -O paper=a4 pipeglade.1 > gh-pages/pipeglade.1.pdf 77 | echo -e '/<\/body>/-r www-template/statcounter.html\nwq' | ed -s gh-pages/pipeglade.1.html 78 | 79 | gh-pages/clock.jpg: clock.svg 80 | @mkdir -p gh-pages 81 | convert "${.ALLSRC}" -frame 2 "${.TARGET}" 82 | 83 | clock.svg: clock.sh clock.ui pipeglade 84 | ./clock.sh ${.TARGET} 85 | 86 | # Our collection of simple test widgets 87 | examples-list: 88 | @ls -1 widget-examples | grep "\.ui$$" 89 | 90 | # Screenshots of the widget examples 91 | 92 | .for W in ${WIDGETS} 93 | .if exists(widget-examples/${W:S/Gtk//:tl}.txt) 94 | gh-pages/${W:S/$/.jpg/}: widget-examples/${W:S/Gtk//:tl}.ui widget-examples/${W:S/Gtk//:tl}.txt 95 | @echo "creating widget snapshot ${.TARGET}" 96 | @mkdir -p gh-pages 97 | @echo "_:load widget-examples/${W:S/Gtk//:tl}.txt" | \ 98 | ./pipeglade -u widget-examples/${W:S/Gtk//:tl}.ui >/dev/null 99 | @convert "${.TARGET:R}.svg" -resize 80% -frame 2 "${.TARGET}" && rm "${.TARGET:R}.svg" 100 | .else 101 | gh-pages/${W:S/$/.jpg/}: widget-examples/${W:S/Gtk//:tl}.ui 102 | @echo "creating widget snapshot ${.TARGET}" 103 | @mkdir -p gh-pages 104 | @(echo "main:snapshot ${.TARGET:R}.svg"; echo "_:main_quit") | \ 105 | ./pipeglade -u ${.ALLSRC} >/dev/null 106 | @convert "${.TARGET:R}.svg" -resize 80% -frame 2 "${.TARGET}" && rm "${.TARGET:R}.svg" 107 | .endif 108 | .endfor 109 | 110 | gh-pages/gallery.html: ${SNAPSHOTS} 111 | @echo "writing html for widget snapshots: ${SNAPSHOTS:T:R}" 112 | @for i in ${.ALLSRC:T:R}; do \ 113 | echo "

"; \ 114 | echo "

"; \ 115 | echo " "; \ 116 | echo -n " $${i}"; \ 119 | echo " "; \ 120 | echo " (cf. GTK+ 3 Reference Manual)"; \ 121 | echo "
"; \ 122 | echo " "; \ 123 | echo "
"; \ 124 | done > ${.TARGET} 125 | 126 | 127 | # Do we have dead links? 128 | gh-pages/index-hrefs: gh-pages/index.html www-template/a-hrefs.xsl 129 | xsltproc --html www-template/a-hrefs.xsl gh-pages/index.html | grep -E "^http.?://" | grep -v "../github.com/trebb/pipeglade" > ${.TARGET} 130 | 131 | test-index-hrefs: gh-pages/index-hrefs 132 | @echo "checking for dead links..." 133 | @for i in `cat ${.ALLSRC}`; do \ 134 | if curl -w %{http_code} -s -o /dev/null $$i | grep -q 200; then \ 135 | echo -n "$$i "; \ 136 | else \ 137 | echo; echo "dead link: $$i"; \ 138 | break; \ 139 | fi; \ 140 | done 141 | @echo 142 | 143 | 144 | # Push the www directory to Github Pages 145 | publish: gh-pages 146 | (cd gh-pages; \ 147 | git init; \ 148 | git add ./; \ 149 | git commit -a -m "gh-pages pseudo commit"; \ 150 | git push git@github.com:trebb/pipeglade.git +master:gh-pages) 151 | -------------------------------------------------------------------------------- /www-template/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is an example style-sheet provided for mandoc(1) and the -Thtml 3 | * or -Txhtml output mode. 4 | * It mimics the appearance of the legacy man.cgi output. 5 | * See mdoc(7) and man(7) for macro explanations. 6 | */ 7 | 8 | div.mandoc { min-width: 80ex; 9 | max-width: 102ex; 10 | width: 100%; 11 | font-family: monospace; } /* This is the outer node of all mandoc -T[x]html documents. */ 12 | div.mandoc h1 { margin-bottom: 0ex; font-size: inherit; margin-left: -4ex; } /* Section header (Sh, SH). */ 13 | div.mandoc h2 { margin-bottom: 0ex; font-size: inherit; margin-left: -2ex; } /* Sub-section header (Ss, SS). */ 14 | div.mandoc table { width: 100%; margin-top: 0ex; margin-bottom: 0ex; } /* All tables. */ 15 | div.mandoc td { vertical-align: top; } /* All table cells. */ 16 | div.mandoc p { } /* Paragraph: Pp, Lp. */ 17 | div.mandoc blockquote { margin-left: 5ex; margin-top: 0ex; margin-bottom: 0ex; } /* D1, Dl. */ 18 | div.mandoc div.section { margin-bottom: 2ex; margin-left: 5ex; } /* Sections (Sh, SH). */ 19 | div.mandoc div.subsection { margin-bottom: 4ex; } /* Sub-sections (Ss, SS). */ 20 | div.mandoc table.synopsis { } /* SYNOPSIS section table. */ 21 | div.mandoc table.foot { } /* Document footer. */ 22 | div.mandoc td.foot-date { width: 50%; } /* Document footer: date. */ 23 | div.mandoc td.foot-os { width: 50%; text-align: right; } /* Document footer: OS/source. */ 24 | div.mandoc table.head { } /* Document header. */ 25 | div.mandoc td.head-ltitle { width: 10%; } /* Document header: left-title. */ 26 | div.mandoc td.head-vol { width: 80%; text-align: center; } /* Document header: volume. */ 27 | div.mandoc td.head-rtitle { width: 10%; text-align: right; } /* Document header: right-title. */ 28 | div.mandoc .display { } /* All Bd, D1, Dl. */ 29 | div.mandoc .list { } /* All Bl. */ 30 | div.mandoc i { } /* Italic: BI, IB, I, (implicit). */ 31 | div.mandoc b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */ 32 | div.mandoc small { } /* Small: SB, SM. */ 33 | div.mandoc .emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */ 34 | div.mandoc .symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */ 35 | div.mandoc .lit { font-style: normal; font-weight: normal; font-family: monospace; } /* Literal: Dl, Li, Ql, Bf -literal, Bl -literal, Bl -unfilled. */ 36 | div.mandoc i.addr { font-weight: normal; } /* Address (Ad). */ 37 | div.mandoc i.arg { font-weight: normal; } /* Command argument (Ar). */ 38 | div.mandoc span.author { } /* Author name (An). */ 39 | div.mandoc b.cmd { font-style: normal; } /* Command (Cm). */ 40 | div.mandoc b.config { font-style: normal; } /* Config statement (Cd). */ 41 | div.mandoc span.define { } /* Defines (Dv). */ 42 | div.mandoc span.desc { } /* Nd. After em-dash. */ 43 | div.mandoc b.diag { font-style: normal; } /* Diagnostic (Bl -diag). */ 44 | div.mandoc span.env { } /* Environment variables (Ev). */ 45 | div.mandoc span.errno { } /* Error string (Er). */ 46 | div.mandoc i.farg { font-weight: normal; } /* Function argument (Fa, Fn). */ 47 | div.mandoc i.file { font-weight: normal; } /* File (Pa). */ 48 | div.mandoc b.flag { font-style: normal; } /* Flag (Fl, Cm). */ 49 | div.mandoc b.fname { font-style: normal; } /* Function name (Fa, Fn, Rv). */ 50 | div.mandoc i.ftype { font-weight: normal; } /* Function types (Ft, Fn). */ 51 | div.mandoc b.includes { font-style: normal; } /* Header includes (In). */ 52 | div.mandoc span.lib { } /* Library (Lb). */ 53 | div.mandoc i.link-sec { font-weight: normal; } /* Section links (Sx). */ 54 | div.mandoc b.macro { font-style: normal; } /* Macro-ish thing (Fd). */ 55 | div.mandoc b.name { font-style: normal; } /* Name of utility (Nm). */ 56 | div.mandoc span.opt { } /* Options (Op, Oo/Oc). */ 57 | div.mandoc span.ref { } /* Citations (Rs). */ 58 | div.mandoc span.ref-auth { } /* Reference author (%A). */ 59 | div.mandoc i.ref-book { font-weight: normal; } /* Reference book (%B). */ 60 | div.mandoc span.ref-city { } /* Reference city (%C). */ 61 | div.mandoc span.ref-date { } /* Reference date (%D). */ 62 | div.mandoc i.ref-issue { font-weight: normal; } /* Reference issuer/publisher (%I). */ 63 | div.mandoc i.ref-jrnl { font-weight: normal; } /* Reference journal (%J). */ 64 | div.mandoc span.ref-num { } /* Reference number (%N). */ 65 | div.mandoc span.ref-opt { } /* Reference optionals (%O). */ 66 | div.mandoc span.ref-page { } /* Reference page (%P). */ 67 | div.mandoc span.ref-corp { } /* Reference corporate/foreign author (%Q). */ 68 | div.mandoc span.ref-rep { } /* Reference report (%R). */ 69 | div.mandoc span.ref-title { text-decoration: underline; } /* Reference title (%T). */ 70 | div.mandoc span.ref-vol { } /* Reference volume (%V). */ 71 | div.mandoc span.type { font-style: italic; font-weight: normal; } /* Variable types (Vt). */ 72 | div.mandoc span.unix { } /* Unices (Ux, Ox, Nx, Fx, Bx, Bsx, Dx). */ 73 | div.mandoc b.utility { font-style: normal; } /* Name of utility (Ex). */ 74 | div.mandoc b.var { font-style: normal; } /* Variables (Rv). */ 75 | div.mandoc a.link-ext { } /* Off-site link (Lk). */ 76 | div.mandoc a.link-includes { } /* Include-file link (In). */ 77 | div.mandoc a.link-mail { } /* Mailto links (Mt). */ 78 | div.mandoc a.link-man { } /* Manual links (Xr). */ 79 | div.mandoc a.link-ref { } /* Reference section links (%Q). */ 80 | div.mandoc a.link-sec { } /* Section links (Sx). */ 81 | div.mandoc dl.list-diag { } /* Formatting for lists. See mdoc(7). */ 82 | div.mandoc dt.list-diag { } 83 | div.mandoc dd.list-diag { } 84 | div.mandoc dl.list-hang { } 85 | div.mandoc dt.list-hang { } 86 | div.mandoc dd.list-hang { } 87 | div.mandoc dl.list-inset { } 88 | div.mandoc dt.list-inset { } 89 | div.mandoc dd.list-inset { } 90 | div.mandoc dl.list-ohang { } 91 | div.mandoc dt.list-ohang { } 92 | div.mandoc dd.list-ohang { margin-left: 0ex; } 93 | div.mandoc dl.list-tag { } 94 | div.mandoc dt.list-tag { } 95 | div.mandoc dd.list-tag { } 96 | div.mandoc table.list-col { } 97 | div.mandoc tr.list-col { } 98 | div.mandoc td.list-col { } 99 | div.mandoc ul.list-bul { list-style-type: disc; padding-left: 1em; } 100 | div.mandoc li.list-bul { } 101 | div.mandoc ul.list-dash { list-style-type: none; padding-left: 0em; margin-left:5.00ex; } 102 | div.mandoc li.list-dash:before { content: "\2014 "; } 103 | div.mandoc ul.list-hyph { list-style-type: none; padding-left: 0em; } 104 | div.mandoc li.list-hyph:before { content: "\2013 "; } 105 | div.mandoc ul.list-item { list-style-type: none; padding-left: 0em; } 106 | div.mandoc li.list-item { } 107 | div.mandoc ol.list-enum { padding-left: 2em; } 108 | div.mandoc li.list-enum { } 109 | div.mandoc span.eqn { } /* Equation modes. See eqn(7). */ 110 | div.mandoc table.tbl { } /* Table modes. See tbl(7). */ 111 | -------------------------------------------------------------------------------- /widget-examples/sizegroup.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 4 12 | 4 13 | 4 14 | 4 15 | vertical 16 | 17 | 18 | True 19 | False 20 | 21 | 22 | King Button 23 | 150 24 | 70 25 | True 26 | True 27 | True 28 | 29 | 30 | False 31 | True 32 | 0 33 | 34 | 35 | 36 | 37 | button 38 | True 39 | True 40 | True 41 | 42 | 43 | False 44 | True 45 | 1 46 | 47 | 48 | 49 | 50 | button 51 | True 52 | True 53 | True 54 | 55 | 56 | False 57 | True 58 | 2 59 | 60 | 61 | 62 | 63 | False 64 | True 65 | 0 66 | 67 | 68 | 69 | 70 | button 71 | True 72 | True 73 | True 74 | 75 | 76 | False 77 | True 78 | 1 79 | 80 | 81 | 82 | 83 | True 84 | False 85 | 86 | 87 | button 88 | True 89 | True 90 | True 91 | 92 | 93 | False 94 | True 95 | 0 96 | 97 | 98 | 99 | 100 | Subject 101 | Button 102 | True 103 | True 104 | True 105 | 106 | 107 | False 108 | True 109 | 1 110 | 111 | 112 | 113 | 114 | True 115 | False 116 | 0 117 | none 118 | 119 | 120 | True 121 | False 122 | 12 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | True 131 | False 132 | Subject Frame 133 | 134 | 135 | 136 | 137 | False 138 | True 139 | 2 140 | 141 | 142 | 143 | 144 | False 145 | True 146 | 2 147 | 148 | 149 | 150 | 151 | 152 | 153 | both 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /widget-examples/menu.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | True 14 | False 15 | _File 16 | True 17 | 18 | 19 | True 20 | False 21 | 22 | 23 | gtk-new 24 | True 25 | False 26 | True 27 | True 28 | 29 | 30 | 31 | 32 | gtk-open 33 | True 34 | False 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | gtk-save 42 | True 43 | False 44 | True 45 | True 46 | 47 | 48 | 49 | 50 | gtk-save-as 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | 58 | 59 | True 60 | False 61 | 62 | 63 | 64 | 65 | gtk-quit 66 | True 67 | False 68 | True 69 | True 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | True 79 | False 80 | _Edit 81 | True 82 | 83 | 84 | True 85 | False 86 | 87 | 88 | gtk-cut 89 | True 90 | False 91 | True 92 | True 93 | 94 | 95 | 96 | 97 | gtk-copy 98 | True 99 | False 100 | True 101 | True 102 | 103 | 104 | 105 | 106 | gtk-paste 107 | True 108 | False 109 | True 110 | True 111 | 112 | 113 | 114 | 115 | gtk-delete 116 | True 117 | False 118 | True 119 | True 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | True 129 | False 130 | _View 131 | True 132 | 133 | 134 | 135 | 136 | True 137 | False 138 | _Help 139 | True 140 | 141 | 142 | True 143 | False 144 | 145 | 146 | gtk-about 147 | True 148 | False 149 | True 150 | True 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /widget-examples/menubar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | 12 | 13 | True 14 | False 15 | _File 16 | True 17 | 18 | 19 | True 20 | False 21 | 22 | 23 | gtk-new 24 | True 25 | False 26 | True 27 | True 28 | 29 | 30 | 31 | 32 | gtk-open 33 | True 34 | False 35 | True 36 | True 37 | 38 | 39 | 40 | 41 | gtk-save 42 | True 43 | False 44 | True 45 | True 46 | 47 | 48 | 49 | 50 | gtk-save-as 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | 58 | 59 | True 60 | False 61 | 62 | 63 | 64 | 65 | gtk-quit 66 | True 67 | False 68 | True 69 | True 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | True 79 | False 80 | _Edit 81 | True 82 | 83 | 84 | True 85 | False 86 | 87 | 88 | gtk-cut 89 | True 90 | False 91 | True 92 | True 93 | 94 | 95 | 96 | 97 | gtk-copy 98 | True 99 | False 100 | True 101 | True 102 | 103 | 104 | 105 | 106 | gtk-paste 107 | True 108 | False 109 | True 110 | True 111 | 112 | 113 | 114 | 115 | gtk-delete 116 | True 117 | False 118 | True 119 | True 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | True 129 | False 130 | _View 131 | True 132 | 133 | 134 | 135 | 136 | True 137 | False 138 | _Help 139 | True 140 | 141 | 142 | True 143 | False 144 | 145 | 146 | gtk-about 147 | True 148 | False 149 | True 150 | True 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /widget-examples/treeview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | False 33 | 0 34 | 0 35 | 0 36 | 0 37 | 0 38 | 0 39 | 0 40 | 0 41 | abc 42 | magenta 43 | 44 | 45 | True 46 | 1 47 | 0 48 | 0 49 | 0 50 | 0 51 | 0 52 | 0 53 | 0 54 | def 55 | 56 | blue 57 | 58 | 59 | False 60 | 2 61 | 0 62 | 0 63 | 0 64 | 0 65 | 0 66 | 0 67 | 0 68 | ghi 69 | cyan 70 | 71 | 72 | False 73 | 3 74 | 0 75 | 0 76 | 0 77 | 0 78 | 0 79 | 0 80 | 0 81 | jkl 82 | green 83 | 84 | 85 | 86 | 87 | False 88 | 89 | 90 | True 91 | True 92 | liststore1 93 | 0 94 | 95 | 96 | multiple 97 | 98 | 99 | 100 | 101 | col1 102 | True 103 | 104 | 105 | 106 | 2 107 | 108 | 109 | 110 | 111 | True 112 | 113 | 114 | 9 115 | 116 | 117 | 118 | 119 | True 120 | 121 | 122 | 10 123 | 10 124 | 125 | 126 | 127 | 128 | 129 | 130 | col2 131 | True 132 | 133 | 134 | True 135 | 136 | 137 | 9 138 | 139 | 140 | 141 | 142 | 143 | 144 | col3 145 | True 146 | 147 | 148 | 149 | 0 150 | 151 | 152 | 153 | 154 | 155 | 156 | col4 157 | True 158 | 159 | 160 | True 161 | 162 | 163 | 1 164 | 165 | 166 | 167 | 168 | 169 | 170 | col5 171 | True 172 | 173 | 174 | True 175 | 176 | 177 | 3 178 | 179 | 180 | 181 | 182 | 183 | 184 | col6 185 | True 186 | 187 | 188 | True 189 | 190 | 191 | 4 192 | 193 | 194 | 195 | 196 | 197 | 198 | col7 199 | True 200 | 201 | 202 | True 203 | 204 | 205 | 5 206 | 207 | 208 | 209 | 210 | 211 | 212 | col8 213 | True 214 | 215 | 216 | True 217 | 218 | 219 | 6 220 | 221 | 222 | 223 | 224 | 225 | 226 | col9 227 | True 228 | 229 | 230 | True 231 | 232 | 233 | 7 234 | 235 | 236 | 237 | 238 | 239 | 240 | col10 241 | True 242 | 243 | 244 | True 245 | 246 | 247 | 8 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | -------------------------------------------------------------------------------- /widget-examples/treeviewcolumn.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | False 33 | 0 34 | 0 35 | 0 36 | 0 37 | 0 38 | 0 39 | 0 40 | 0 41 | abc 42 | magenta 43 | 44 | 45 | True 46 | 1 47 | 0 48 | 0 49 | 0 50 | 0 51 | 0 52 | 0 53 | 0 54 | def 55 | 56 | blue 57 | 58 | 59 | False 60 | 2 61 | 0 62 | 0 63 | 0 64 | 0 65 | 0 66 | 0 67 | 0 68 | ghi 69 | cyan 70 | 71 | 72 | False 73 | 3 74 | 0 75 | 0 76 | 0 77 | 0 78 | 0 79 | 0 80 | 0 81 | jkl 82 | green 83 | 84 | 85 | 86 | 87 | False 88 | 89 | 90 | True 91 | True 92 | liststore1 93 | 0 94 | 95 | 96 | multiple 97 | 98 | 99 | 100 | 101 | col1 102 | True 103 | 104 | 105 | 106 | 2 107 | 108 | 109 | 110 | 111 | True 112 | 113 | 114 | 9 115 | 116 | 117 | 118 | 119 | True 120 | 121 | 122 | 10 123 | 10 124 | 125 | 126 | 127 | 128 | 129 | 130 | col2 131 | True 132 | 133 | 134 | True 135 | 136 | 137 | 9 138 | 139 | 140 | 141 | 142 | 143 | 144 | col3 145 | True 146 | 147 | 148 | 149 | 0 150 | 151 | 152 | 153 | 154 | 155 | 156 | col4 157 | True 158 | 159 | 160 | True 161 | 162 | 163 | 1 164 | 165 | 166 | 167 | 168 | 169 | 170 | col5 171 | True 172 | 173 | 174 | True 175 | 176 | 177 | 3 178 | 179 | 180 | 181 | 182 | 183 | 184 | col6 185 | True 186 | 187 | 188 | True 189 | 190 | 191 | 4 192 | 193 | 194 | 195 | 196 | 197 | 198 | col7 199 | True 200 | 201 | 202 | True 203 | 204 | 205 | 5 206 | 207 | 208 | 209 | 210 | 211 | 212 | col8 213 | True 214 | 215 | 216 | True 217 | 218 | 219 | 6 220 | 221 | 222 | 223 | 224 | 225 | 226 | col9 227 | True 228 | 229 | 230 | True 231 | 232 | 233 | 7 234 | 235 | 236 | 237 | 238 | 239 | 240 | col10 241 | True 242 | 243 | 244 | True 245 | 246 | 247 | 8 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | -------------------------------------------------------------------------------- /calc.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | coproc dc 2>&1 4 | ./pipeglade -i calc.in -o calc.out -b -u calc.ui -O calc.err -l calc.log >/dev/null 5 | 6 | NUMKEYS=(0 1 2 3 4 5 6 7 8 9 A B C D E F) 7 | NUMPAD=("${NUMKEYS[@]}" neg point div mul minus plus squareroot power) 8 | STORAGEKEYS=(recall store) 9 | OTHERKEYS=(enter edit swap clear drop cancel) 10 | VARKEYS=(var_2 var_3 var_a var_b var_c var_d var_e var_f var_g var_h var_i \ 11 | var_j var_k var_l var_m var_n var_o var_p var_q var_r var_s \ 12 | var_t var_u var_v var_w var_x var_y var_z) 13 | 14 | varkeys_set_visible() 15 | # expose second keybord level 16 | { 17 | for i in "${VARKEYS[@]}"; do 18 | echo "$i:set_visible $1" >calc.in 19 | done 20 | } 21 | 22 | printstack() 23 | { 24 | echo "entry:set_placeholder_text" >calc.in 25 | # tell dc to print its stack 26 | echo "f" 27 | i=0 28 | unset DC_OUT 29 | # read dc's response, which may include error messages 30 | while read -t .1 DC_OUT[$i]; do (( i++ )); done 31 | # check for specific errors 32 | if [[ "${DC_OUT[0]}" =~ "stack" || "${DC_OUT[0]}" =~ "zero" ]]; then 33 | echo "entry:set_placeholder_text ${DC_OUT[0]}" 34 | echo "stack:grab_focus" # unfocussing entry 35 | else 36 | # display stack in a GtkTreeView 37 | echo "stack:clear" 38 | echo "stack:set 5 1" 39 | ROW=4 40 | while [[ $i -gt 0 ]]; do 41 | (( i-- )) 42 | (( ROW++ )) 43 | echo "stack:set $ROW 0 $i" 44 | echo "stack:set $ROW 1 ${DC_OUT[$i]}" 45 | done 46 | echo "stack:scroll $ROW 1" 47 | fi >calc.in 48 | } 49 | 50 | edittop() 51 | # put top of stack into GtkEntry 52 | { 53 | echo "p s!" # talking to dc, 54 | read -t .1 DC_OUT # reading dc's response, 55 | # and sending it to pipeglade 56 | echo "entry:set_text $DC_OUT" >calc.in 57 | } 58 | 59 | 60 | # initial window dressing 61 | echo "precision:set_value 5" >calc.in 62 | for i in "${NUMPAD[@]}"; do 63 | echo "$i:style border-radius:20px; border-color:darkblue; font-weight:bold; font-size:16px" 64 | done >calc.in 65 | for i in "${OTHERKEYS[@]}"; do 66 | echo "$i:style border-radius:20px; font-weight:bold" 67 | done >calc.in 68 | for i in "${STORAGEKEYS[@]}"; do 69 | echo "$i:style border-radius:20px; border-color:darkgreen; font-weight:bold" 70 | done >calc.in 71 | for i in "${VARKEYS[@]}"; do 72 | echo "$i:style border-radius:10px; border-color:darkgreen; font-style:italic; font-size:16px" 73 | done >calc.in 74 | echo "off:style color:darkred; border-radius:20px; border-color:darkred; font-weight:bold" >calc.in 75 | echo "entry:style font:monospace 12" >calc.in 76 | echo "main:style border-radius:20px" >calc.in 77 | 78 | 79 | { 80 | # main loop; stdin and stdout are connected to the dc coprocess 81 | printstack 82 | while true; do 83 | # receive feedback from GUI 84 | read IN calc.in 93 | elif [[ "$IN" =~ "entry:text " ]]; then 94 | # feedback from our GtkEntry 95 | CURRENT_ENTRY="${IN#entry:text }" 96 | NUM="$CURRENT_ENTRY" 97 | # dc uses '_' as a negative sign 98 | CURRENT_ENTRY="${CURRENT_ENTRY//-/_}" 99 | elif [[ "$IN" =~ "var_" ]]; then 100 | # freedback from variable buttons 101 | VAR="${IN#var_}" 102 | VAR="${VAR%:clicked}" 103 | if [[ "$VARMODE" == "recall" ]]; then 104 | echo "L$VAR" 105 | elif [[ "$VARMODE" == "store" ]]; then 106 | echo "S$VAR" 107 | fi 108 | printstack 109 | varkeys_set_visible 0 110 | elif [[ "$IN" =~ "radix:value " ]]; then 111 | # feedback from the radix scale 112 | RADIX="${IN#radix:value }" 113 | RADIX="${RADIX/.[0-9]*}" 114 | # telling dc what to do 115 | echo "A i $RADIX o $RADIX i" 116 | printstack 117 | # graying out meaningless digit keys 118 | for i in "${NUMKEYS[@]:2:(( $RADIX - 1 ))}"; do 119 | echo "$i:set_sensitive 1" >calc.in 120 | done 121 | for i in "${NUMKEYS[@]:$RADIX}"; do 122 | echo "$i:set_sensitive 0" >calc.in 123 | done 124 | elif [[ $IN =~ "precision:value " ]]; then 125 | # feedback from the precision scale 126 | PRECISION="${IN#precision:value }" 127 | PRECISION="${PRECISION/.[0-9]*}" 128 | echo "$PRECISION k" 129 | elif [[ $IN == "main:closed" ]]; then 130 | # exit gracefully when GUI gets killed by window manager 131 | exit 132 | elif [[ -n $C ]]; then 133 | # here, $C is a multi-character button name that doesn't look like "var_x" 134 | case "$C" in 135 | point) 136 | NUM="$NUM." 137 | echo "entry:set_text $NUM" >calc.in 138 | ;; 139 | neg) 140 | if [[ -n "$CURRENT_ENTRY" ]]; then 141 | echo "$CURRENT_ENTRY _1 *" 142 | edittop 143 | else 144 | echo "_1 *" 145 | unset NUM 146 | unset CURRENT_ENTRY 147 | printstack 148 | fi 149 | ;; 150 | edit) 151 | edittop 152 | printstack 153 | ;; 154 | enter) 155 | if [[ -n "$CURRENT_ENTRY" ]]; then 156 | echo "$CURRENT_ENTRY" 157 | echo "entry:set_text" >calc.in 158 | else 159 | echo "d" 160 | fi 161 | unset NUM 162 | unset CURRENT_ENTRY 163 | printstack 164 | ;; 165 | div) 166 | if [[ -n "$CURRENT_ENTRY" ]]; then 167 | echo "$CURRENT_ENTRY" 168 | echo "entry:set_text" >calc.in 169 | fi 170 | echo "/" 171 | unset NUM 172 | unset CURRENT_ENTRY 173 | printstack 174 | ;; 175 | mul) 176 | if [[ -n "$CURRENT_ENTRY" ]]; then 177 | echo "$CURRENT_ENTRY" 178 | echo "entry:set_text" >calc.in 179 | fi 180 | echo "*" 181 | unset NUM 182 | unset CURRENT_ENTRY 183 | printstack 184 | ;; 185 | minus) 186 | if [[ -n "$CURRENT_ENTRY" ]]; then 187 | echo "$CURRENT_ENTRY" 188 | echo "entry:set_text" >calc.in 189 | fi 190 | echo "-" 191 | unset NUM 192 | unset CURRENT_ENTRY 193 | printstack 194 | ;; 195 | plus) 196 | if [[ -n "$CURRENT_ENTRY" ]]; then 197 | echo "$CURRENT_ENTRY" 198 | echo "entry:set_text" >calc.in 199 | fi 200 | echo "+" 201 | unset NUM 202 | unset CURRENT_ENTRY 203 | printstack 204 | ;; 205 | power) 206 | if [[ -n "$CURRENT_ENTRY" ]]; then 207 | echo "$CURRENT_ENTRY" 208 | echo "entry:set_text" >calc.in 209 | fi 210 | echo "^" 211 | unset NUM 212 | unset CURRENT_ENTRY 213 | printstack 214 | ;; 215 | squareroot) 216 | if [[ -n "$CURRENT_ENTRY" ]]; then 217 | echo "$CURRENT_ENTRY" 218 | echo "entry:set_text" >calc.in 219 | fi 220 | echo "v" 221 | unset NUM 222 | unset CURRENT_ENTRY 223 | printstack 224 | ;; 225 | swap) 226 | if [[ -n "$CURRENT_ENTRY" ]]; then 227 | echo "$CURRENT_ENTRY" 228 | echo "entry:set_text" >calc.in 229 | fi 230 | # portability kludge. The parentheses are dc variable names 231 | echo "s(s)L(L)" 232 | unset NUM 233 | unset CURRENT_ENTRY 234 | printstack 235 | ;; 236 | drop) 237 | if [[ -z "$CURRENT_ENTRY" ]]; then 238 | # portabilty kludge (and memory leak) 239 | echo "s!" 240 | fi 241 | echo "entry:set_text" >calc.in 242 | unset NUM 243 | unset CURRENT_ENTRY 244 | printstack 245 | ;; 246 | clear) 247 | echo "c" 248 | echo "entry:set_text" >calc.in 249 | unset NUM 250 | unset CURRENT_ENTRY 251 | printstack 252 | ;; 253 | cancel) 254 | varkeys_set_visible 0 255 | echo "entry:set_text" >calc.in 256 | unset NUM 257 | unset CURRENT_ENTRY 258 | printstack 259 | ;; 260 | recall) 261 | VARMODE="recall" 262 | varkeys_set_visible 1 263 | ;; 264 | store) 265 | VARMODE="store" 266 | if [[ -n "$CURRENT_ENTRY" ]]; then 267 | echo "LE: $CURRENT_ENTRY" >>ttt 268 | echo "$CURRENT_ENTRY" 269 | echo "entry:set_text" >calc.in 270 | unset NUM 271 | unset CURRENT_ENTRY 272 | fi 273 | varkeys_set_visible 1 274 | ;; 275 | off) 276 | echo "_:main_quit" >calc.in 277 | exit 278 | ;; 279 | esac 280 | fi 281 | done 282 | } <&"${COPROC[0]}" >&"${COPROC[1]}" 283 | --------------------------------------------------------------------------------