Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Oct 2014, 08:26
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog - tips
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 64 of 64 Posts_count   Goto page: Previous 1, 2, 3, ..., 62, 63, 64
Author Message
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: Sat 02 Aug 2014, 16:22    Post_subject:  

Note to mister_electronico..

If you're learning gtkdialog then I recommend
reading my togglebutton example page. Very neat Cool

http://208.109.22.214/puppy/viewtopic.php?p=758918&sid=8e64b48a0f9a012b4112c0f714757e5a
_____________________________________________
Back to top
View user's profile Send_private_message 
mister_electronico


Joined: 20 Jan 2008
Posts: 657
Location: Asturias_ España

PostPosted: Sat 02 Aug 2014, 19:59    Post_subject: Hi don570  

Hi don570, I like you post like other you did, but I ddn't find the relationship with my two last post.

See you.
Back to top
View user's profile Send_private_message YIM 
mister_electronico


Joined: 20 Jan 2008
Posts: 657
Location: Asturias_ España

PostPosted: Sun 31 Aug 2014, 16:32    Post_subject: Display meter-panel.  

I always look for a display to display data from my electronic circuits, so that I did this program gtkdialog, I think I can be useful and other people.... I hope so

The program would look like.
meter_panel.png
 Description   
 Filesize   40.24 KB
 Viewed   239 Time(s)

meter_panel.png

Back to top
View user's profile Send_private_message YIM 
mister_electronico


Joined: 20 Jan 2008
Posts: 657
Location: Asturias_ España

PostPosted: Sun 31 Aug 2014, 16:38    Post_subject: The program  

This program can accommodate the needs that we have.

Greetings
meter.tar.gz
Description 
gz

 Download 
Filename  meter.tar.gz 
Filesize  62.31 KB 
Downloaded  30 Time(s) 
Back to top
View user's profile Send_private_message YIM 
mister_electronico


Joined: 20 Jan 2008
Posts: 657
Location: Asturias_ España

PostPosted: Sun 07 Sep 2014, 19:18    Post_subject: Mobile sign  

One mobile sign:

Code:

#!/bin/bash
[ -z $GTKDIALOG ] && GTKDIALOG=gtkdialog

export DAT=/dev/shm/var1
echo "800" > $DAT


# Letro movil
funcion1 () {
VAR=( `cat $DAT` )
echo '<svg width="800" height="150" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<text x="'$VAR'" y="46" xml:space="preserve" style="font-family:monospace;font-size:64px;" font-weight="bold" fill="#7F0D0D" opacity="0.8">MOBILE SIGN WORKING</text>
</svg>' > /dev/shm/var2.svg

  VAR=`echo "$VAR - 10" | bc -l`
  echo ${VAR} > $DAT
  NUM=${VAR%%}
  if [ $NUM -lt -720 ]; then  echo "800" > $DAT; else deci=0; fi     

export -f funcion1

export MAIN='
<window title="Mobile sign" resizable="false">
  <vbox>
    <pixmap>
      <variable>IMG</variable>
      <input file>/dev/shm/var2.svg</input>
    </pixmap>
    <button ok></button>
    <timer visible="false" milliseconds="true" interval="100">
      <action>funcion1</action>
      <action type="refresh">IMG</action>
    </timer>
  </vbox>
</window>
'

case $1 in
   -d | --dump) echo "$MAIN" ;;
   *) $GTKDIALOG -cp MAIN ;;
esac
unset mobile_sign
unset funcion1
killall -9 mobile_sign.sh


Greetings
Back to top
View user's profile Send_private_message YIM 
Argolance


Joined: 06 Jan 2008
Posts: 1831
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Thu 18 Sep 2014, 10:21    Post_subject: <notebook> tabs height?  

Hello,
Is there a way to fix the notebook tabs height when they are right or left of a window to make them entirely fill it? Something like:
Code:
<notebook tab-height=\"xx\"...</notebook>

??
Thank you!
Cordialement.
140918_165227_756x494_easyshot.jpg
 Description   
 Filesize   38.96 KB
 Viewed   132 Time(s)

140918_165227_756x494_easyshot.jpg


_________________

Back to top
View user's profile Send_private_message Visit_website 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: Sat 20 Sep 2014, 16:39    Post_subject:  

To Argolance..

The space-expand and space-fill set to true are the only way I know how to
change where widgets appear. I got the info from Thunor

Code:

A text widget that has space-expand and space-fill set to true can be used as a spacer to push neighbouring widgets in certain directions.

Here the spacer text is "[]" so you can see it -- drag the window out and watch the button.
   
#!/bin/sh

GTKDIALOG=gtkdialog

Spacer="[]"

MAIN_DIALOG='
<window title="Spacer Test" window-position="1">
   <vbox>
      <hbox>
         <button space-expand="false" space-fill="false">
            <label>This button will stay put</label>
            <input file stock="gtk-about"></input>
         </button>
         <text space-expand="true" space-fill="true">
            <label>"'$Spacer'"</label>
         </text>
      </hbox>
   </vbox>
</window>
'
export MAIN_DIALOG

case $1 in
   -d | --dump) echo "$MAIN_DIALOG" ;;
   *) $GTKDIALOG --program=MAIN_DIALOG ;;
esac   

Regards,
Thunor
__________________________________________



Looking at the info on the notebook widget it says that it supports
space-expand and space-fill but I'm not sure what part of notebook
widget is affected.




gtkdialog wrote:

#summary notebook widget reference

= notebook widget =

A [http://developer.gnome.org/gtk2/2.24/GtkNotebook.html GtkNotebook]

----

== Definition ==

{{{
<notebook tag_attr="value"...>
widget...
<variable>varname</variable>
<input>command</input>
<input file>filename</input>
<sensitive>state</sensitive>
<action signal="type">activity</action>...
<output file>filename</output>
</notebook>
}}}

"..." denotes acceptance of multiples of the same thing.

== Tag Attributes ==

See the [http://developer.gnome.org/gtk2/2.24/GtkNotebook.html#GtkNotebook.object-hierarchy GtkNotebook] widget and ancestor class properties.

The following custom tag attributes are available:

<wiki:comment>ExportTableStart</wiki:comment>
|| *Name* || *Description* || *Value* || *Since* ||
|| space-expand || Pack widget expanding into space || {{{true}}} or {{{false}}} || 0.7.21 ||
|| space-fill || Pack widget filling space || {{{true}}} or {{{false}}} || 0.7.21 ||
|| block-function-signals || Block signal emissions from functions || {{{true}}} or {{{false}}} || 0.7.21 ||
|| file-monitor || Emit signal when input file(s) change || {{{true}}} or {{{false}}} || 0.8.1 ||
|| auto-refresh || Auto refresh when input file(s) change || {{{true}}} or {{{false}}} || 0.8.1 ||
|| tab-base-index || Tab label start page number || Integer || 0.7.21 ||
|| tab-labels || Tab labels || _label0_ {{{|}}} _label1_ {{{|}}} ... || 0.7.21 ||
|| tab-prefix || Tab label prefix || || 0.7.21 ||
|| tab-suffix || Tab label suffix || || 0.7.21 ||
<wiki:comment>ExportTableEnd</wiki:comment>

== Directives ==

Some of these may have tag attribute equivalents.

<wiki:comment>ExportTableStart</wiki:comment>
|| *Name* || *Description* || *Contents* || *Since* ||
|| variable || Variable name || || 0.7.21 ||
|| variable export="false" || Variable name, not exported to shell || || 0.8.3 ||
|| input^[1]^ || Data input source || Shell command || 0.7.21 ||
|| input file^[1]^ || Data input source || Filename || 0.7.21 ||
|| sensitive || Sensitive state || {{{true}}} or {{{false}}} || 0.7.21 ||
|| action signal="_type_" || Execute command on signal || Shell command || ||
|| action signal="_type_" || Perform function on signal || _function_:_parameter_ || ||
|| action signal="_type_" condition="_type_" || Execute command on signal conditionally || Shell command || 0.8.3 ||
|| action signal="_type_" condition="_type_" || Perform function on signal conditionally || _function_:_parameter_ || 0.8.3 ||
|| output file || Data output target || Filename || 0.7.21 ||
<wiki:comment>ExportTableEnd</wiki:comment>

== Signals ==

There is no default signal for this widget.

The "file-changed" signal is emitted if file-monitor is true and the input file being monitored has changed.

The following signals are connected-up for all widgets:

[http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-button-press-event button-press-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-button-release-event button-release-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-configure-event configure-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-enter-notify-event enter-notify-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-leave-notify-event leave-notify-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-focus-in-event focus-in-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-focus-out-event focus-out-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-hide hide], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-show show], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-realize realize], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-key-press-event key-press-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-key-release-event key-release-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-map-event map-event], [http://developer.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-unmap-event unmap-event]

== Functions ==

The following functions can be performed upon this widget by any widget capable of emitting signals:

<wiki:comment>ExportTableStart</wiki:comment>
|| *Type* || *Description* || *Parameter* || *Since* ||
|| enable || Sensitise widget || Variable name || ||
|| disable || Desensitise widget || Variable name || ||
|| show || Show widget || Variable name || 0.8.1 ||
|| hide || Hide widget || Variable name || 0.8.1 ||
|| grabfocus || Grab input focus || Variable name || 0.8.1 ||
|| refresh || Reload input data || Variable name || 0.7.21 ||
|| save || Save widget data || Variable name || 0.7.21 ||
<wiki:comment>ExportTableEnd</wiki:comment>

The following general functions can be performed by any widget capable of emitting signals:

<wiki:comment>ExportTableStart</wiki:comment>
|| *Type* || *Description* || *Parameter* || *Since* ||
|| break || Break out of actions list || None || 0.8.3 ||
|| command || Execute command || Shell command || ||
|| exit || Exit dialog || A value for the {{{EXIT}}} variable || ||
|| closewindow || Close dialog || Variable name || ||
|| launch || Launch dialog || Variable name || ||
|| presentwindow || [http://developer.gnome.org/gtk2/2.24/GtkWindow.html#gtk-window-present Present] dialog || Variable name || 0.8.1 ||
<wiki:comment>ExportTableEnd</wiki:comment>

== Conditions ==

The following conditions can be used within the condition attribute of action directives:

<wiki:comment>ExportTableStart</wiki:comment>
|| *Type* || *Description* || *Argument* || *Since* ||
|| active_is_true(_argument_) || Active state of toggle widget || Variable name || 0.8.3 ||
|| active_is_false(_argument_) || Active state of toggle widget || Variable name || 0.8.3 ||
|| command_is_true(_argument_) || Output of shell command || Shell command || 0.8.3 ||
|| command_is_false(_argument_) || Output of shell command || Shell command || 0.8.3 ||
|| file_is_true(_argument_) || Contents of a file || Filename || 0.8.3 ||
|| file_is_false(_argument_) || Contents of a file || Filename || 0.8.3 ||
|| sensitive_is_true(_argument_) || Sensitive state of widget || Variable name || 0.8.3 ||
|| sensitive_is_false(_argument_) || Sensitive state of widget || Variable name || 0.8.3 ||
|| visible_is_true(_argument_) || Visible state of widget || Variable name || 0.8.3 ||
|| visible_is_false(_argument_) || Visible state of widget || Variable name || 0.8.3 ||
<wiki:comment>ExportTableEnd</wiki:comment>

true means "true", "yes" or a non-zero value, false means "false", "no" or zero, therefore the shell command is expected to echo one of these values to stdout.

== Notes ==

1. This widget does not accept setting a default page before being shown (there's a note about it [http://developer.gnome.org/gtk2/2.24/GtkNotebook.html#gtk-notebook-set-current-page here]) which will result in input data being discarded at start-up. This issue can be overcome by using the "[http://developer.gnome.org/gtk2/2.24/GtkNotebook.html#GtkNotebook--page page]" tag attribute which will be applied after the widget is shown.


Back to top
View user's profile Send_private_message 
Argolance


Joined: 06 Jan 2008
Posts: 1831
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Wed 24 Sep 2014, 06:48    Post_subject:  

Hello don570,
Sorry, I didn't see your message before (though I asked to be notified when a reply is posted).
Thanks a lot (#summary notebook widget reference very interesting indeed!)
Quote:
Looking at the info on the notebook widget it says that it supports
space-expand and space-fill but I'm not sure what part of notebook
widget is affected.

All the same... Sad

Cordialement.

_________________

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 64 of 64 Posts_count   Goto page: Previous 1, 2, 3, ..., 62, 63, 64
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1252s ][ Queries: 12 (0.0373s) ][ GZIP on ]