: Monday, 15 April 2013, 10:02
Subject: Re: How to make an attribute list?
Le 15/04/2013 10:57, Simon Sapin a écrit :
Le 14/04/2013 10:50, Ken Resander a écrit :
//pango_attribute_init (???); // do I have to use this? how?
a = pango_attr_foreground_new(sv-txtcol.r, sv
there is no colour yet or that the full colour
value has been removed from the palette index by gdk_colormap_free_colors.
--- On Sun, 15/8/10, Paul Davis p...@linuxaudiosystems.com wrote:
From: Paul Davis p...@linuxaudiosystems.com
Subject: Re: Any RGB macro in Gtk?
To: Ken Resander kresan
worked with the colours coming out the way I
expected. When are these functions used/needed? Or are they becoming obsolete?
--- On Fri, 13/8/10, Ken Resander kresan...@yahoo.com wrote:
From: Ken Resander kresan...@yahoo.com
Subject: Any RGB macro in Gtk?
To: gtk-list@gnome.org
Date: Friday
I would like to port some Windows programs to Ubuntu+Gtk. These contain several
large colour lookup tables using the Windows RGB macro. For example:
static COLALTINFO safealts [ NUMCOLITEMS ]
=
{
{ RGB(0xF0,0xF8,0xFF),RGB(0xFF,0xFF,0xFF) ,RGB(0x00,0x00,0x00) },
{
to active position?
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Thursday, 22 July, 2010, 12:14 AM
On Wed, Jul 21, 2010 at 12:53 PM, Ken Resander kresan...@yahoo.com wrote:
The application uses a listview and works out current position in it, but the
list does not scroll
The application uses a listview and works out current position in it, but the
list does not scroll to it. The user have to do this manually, which is tedious
if the active position is far down the list, say at position 5000.
I am using the following fragment to set the selection at pos:
Try this for screen resolution
void getscreenres ( int * widthret , int * heightret )
{
GdkScreen * screen = gtk_window_get_screen(GTK_WINDOW(window));
*widthret = gdk_screen_get_width(screen); // in pixels
*heightret = gdk_screen_get_height(screen);
}
--- On Wed, 16/6/10,
On Ubuntu 10.04
I have some normal drop down menus that would be more useful as tear-off menus
(i.e. as draggable menus that pop up and stay in the window/dialog).
FOR TOPWINDOW:
To make the tear-off menu appear I use the code:
[code]
gtk_menu_set_tearoff_state ((GtkMenu *)m-menuwidget,
David/Yeti,
Many thanks for the explanation.
Very useful.
--- On Sun, 6/6/10, David Nečas y...@physics.muni.cz wrote:
From: David Nečas y...@physics.muni.cz
Subject: Re: Is GTK signal 'realized' similar to the Windows WM_INITDIALOG
event message for dialogs?
To: Ken Resander kresan
The WM_INITDIALOG message is emitted for a dialog when it is safe and possible
to put data into the controls/widgets of the dialog, for example to put text
into entry widgets and fill listviews, combos, toggle checkboxes etc. Would the
following fragments work for GTK?
GtkWidget * dlg =
in a GTK textview?
To: richard boaz ivor.b...@gmail.com
Cc: Ken Resander kresan...@yahoo.com, gtk-list@gnome.org
Date: Thursday, 20 May, 2010, 2:23 AM
Hi.
General flow is correct, but GTK+ does offer some functionality that
may come handy in your case. (I'm commenting in a rather strange
succession
--- On Thu, 20/5/10, Tadej Borovšak tadeb...@gmail.com wrote:
From: Tadej Borovšak tadeb...@gmail.com
Subject: Re: How to bring up tooltip text for certain words in a GTK textview?
To: richard boaz ivor.b...@gmail.com
Cc: Ken Resander kresan...@yahoo.com, gtk-list@gnome.org
Date: Thursday, 20 May, 2010
A textview shows help text with many 'technical' words that users may not know
or remember. I would like a tooltip text with a short explanation to pop up
when a user hovers the cursor over a technical phrase. There is a lookup table
from technical phrases to explanations. I am thinking about
, richard boaz ivor.b...@gmail.com wrote:
From: richard boaz ivor.b...@gmail.com
Subject: Re: How to move focus to another window by program?
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Sunday, 4 April, 2010, 2:31 AM
did you try using gtk_window_present()? i would call
Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Wednesday, 31 March, 2010, 11:51 PM
On Wed, Mar 31, 2010 at 08:43:14AM -0700, Ken Resander wrote:
The program has a top window with a menu. The menu is used for functions
directly associated with the top window and for functions associated
?
Ken
--- On Thu, 1/4/10, richard boaz ivor.b...@gmail.com wrote:
From: richard boaz ivor.b...@gmail.com
Subject: Re: How to move focus to another window by program?
To: Ken Resander kresan...@yahoo.com
Date: Thursday, 1 April, 2010, 4:53 PM
you might try this in a different way.
instead
The program has a top window with a menu. The menu is used for functions
directly associated with the top window and for functions associated with
dialogs that are brought up via the menu. Each dialog has a single textview and
the top window menu contains functions that generate and insert text
The top window has a menu and a single textview. This window uses all of the
available area on the screen, but sometimes it has to make room for a dialog
window that that needs to be just below. When the dialog window is no longer
needed the top window should expand and reclaim the space at the
:
[code]
...
gtk_window_resize (window, wdavail, htavail ); // works now
...
[/code]
Again many thanks.
Ken
--- On Sat, 27/3/10, richard boaz ivor.b...@gmail.com wrote:
From: richard boaz ivor.b...@gmail.com
Subject: Re: How to change the height of the top window from a program?
To: Ken Resander
the event-after
method.
Would be grateful for comments.
Ken
--- On Mon, 1/3/10, Sanny Chawla sanny.cha...@gmail.com wrote:
From: Sanny Chawla sanny.cha...@gmail.com
Subject: Re: Problem identifying GtkTextTags for syntax highlighting
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
...@gmail.com
Subject: Re: Problem identifying GtkTextTags for syntax highlighting
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Monday, 1 March, 2010, 6:41 PM
Hi Ken,
I am not sure if event-after would be a clean approach.
However , following way for getting notified for any event
I am trying to do a bit of syntax highlighting. I am using
gtk_text_buffer_create_tag and gtk_text_buffer_insert_with_tags to
syntax-highlight the intial text (from file). That works fine.
The program needs to identify existing syntax tokens in order to do appropriate
syntax checking should
thanks.
--- On Sat, 27/2/10, Tadej Borovšak tadeb...@gmail.com wrote:
From: Tadej Borovšak tadeb...@gmail.com
Subject: Re: What is the meaning of toggle on/off for GtkTextTags?
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Saturday, 27 February, 2010, 1:08 AM
Hello
...@lagaule.org wrote:
From: Yann Leboulanger aste...@lagaule.org
Subject: Re: detect ctrl+c in key_press_event handler
To: gtk-list@gnome.org
Date: Sunday, 7 February, 2010, 5:36 AM
Yann Leboulanger wrote:
Ken Resander wrote:
Odd, you seem to be getting 0 for both the Ctrl key and letter-C key
I cannot see the dm userdata parameter being initialised.
Insert dm-clicked = num; before g_signal_connect in the double-nested loop.
Then you can test on dm-clicked in the callback to check which
button is clicked.
--- On Fri, 5/2/10, Bokyun Na b...@kpu.ac.kr wrote:
From: Bokyun Na
: Re: detect ctrl+c in key_press_event handler
To: gtk-list@gnome.org
Date: Sunday, 31 January, 2010, 5:02 PM
Ken Resander wrote:
I am in nearly unknown territory, since mostly I have been in the ASCII world
with chars from a to z.
Could you check the event.keyval for character 'C' on your
You define the callback function in your program and GTK calls it when the
event happens.
GTK then sets all actual parameters of the call. There are no default
parameters.
The data types of the actual parameters passed by GTK are exactly those that
are defined for the callback function.
The
'. Please let me know if it works ( I want
to know too!).
Ken
--- On Sun, 31/1/10, Yann Leboulanger aste...@lagaule.org wrote:
From: Yann Leboulanger aste...@lagaule.org
Subject: Re: detect ctrl+c in key_press_event handler
To: gtk-list@gnome.org
Date: Sunday, 31 January, 2010, 2:06 AM
Ken
Hi Yann,
Doing it the long way may work...
static bool ctrldown = false ;
char codeforctrlkey = GDK_Control_L; // or whatever code is returned
gboolean keypresscallback ( GtkWidget * w, ...)
{
if ( event-keyval == codeforctrlkey )
{
ctrldown = true ;
}
else if (
The manual for GtkWidget signals usually mentions that an event mask should be
enabled, for example for motion-notify-event: 'to receive this signal, the
GdkWindow associated to the widget needs to enable the GDK_POINTER_MOTION_MASK
mask'.
The quoted part above is unclear. It does not say how
GdkWindow masks?
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Sunday, 17 January, 2010, 11:44 PM
On Sun, Jan 17, 2010 at 03:34:26AM -0800, Ken Resander wrote:
The manual for GtkWidget signals usually mentions that an event mask should
be enabled, for example for motion
...@gmail.com
Subject: Re: How to get width and height while resizing window?
To: Ken Resander kresan...@yahoo.com
Date: Saturday, 16 January, 2010, 12:44 PM
http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-configure-event
2010/1/15, Ken Resander kresan...@yahoo.com:
#include gtk
).
Should this behaviour be considered a bug?
--- On Thu, 14/1/10, Tadej Borovšak tadeb...@gmail.com wrote:
From: Tadej Borovšak tadeb...@gmail.com
Subject: Re: Not getting which mouse button is pressed on button-press-event
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date
The state member in GdkEventButton for the button-press/release events contains
flag bits that specify which mouse button is operated and also any keyboard
shift/ctrl/alt modifier bits. I have tried button-press-event on several widget
types, but in all cases the modifier bit GDK_BUTTON1_MASK
thanks.
Ken
--- On Fri, 18/12/09, David Nečas y...@physics.muni.cz wrote:
From: David Nečas y...@physics.muni.cz
Subject: Re: How to use and process GTK enter or leave signals?
To: Ken Resander kresan...@yahoo.com
Cc: gtk-list@gnome.org
Date: Friday, 18 December, 2009, 11:18 PM
On Fri, Dec
Just for testing I used a GtkButton and substituted signal enter-notify-event
for signal clicked (clicked works). A warning appears: enter-notify-event is
invalid for instance after g_signal_connect is executed. The callback handler
is not called.
Simplified:
[code]
GtkWidget * b =
I also had a similar problem. Here is how I ended up doing it...
extern GttWidget * curdlg; // of current dialog
void gettextwdht ( char * family , int ptsize , int weight , bool normalstyle ,
char * stringtomeasure ,
int * wdret , int * htret )
{
Here is my attempt:
void changefont ( GtkWidget * widget , PangoFontDescription * tofd )
{
PangoContext * context = gtk_widget_get_pango_context ( widget );
PangoLayout * layout = pango_layout_new ( context );
pango_layout_set_font_description ( layout, tofd );
}
Then at start of
Hi Tadej,
Thanks for your ultra-fast response. It almost came before I had written the
question.
Yes, indeed gtk_widget_modify_font did the trick!
So simple, but I did not know about this call.
Again many thanks.
Ken
Hi.
Have you tried to use gtk_widget_modify_font on your text view?
I am using the 'Human' Ubuntu theme available via
System-Preferences-Appearance.
I embed the views in a scrolled_window, which in turn is put in a container.
The text, list and treeview show the data and behave ok, but have no borders.
I am conditioned by Windows, HTML, SVG and CSS and have
);
}
-
On Tue, Aug 25, 2009 at 11:50 AM, Ken Resander kresan...@yahoo.com wrote:
I am translating a bunch of Windows programs that critically need to work
out pixel dimensions of a string (with no newlines in it).
On Windows I first call getfont:
void getfont ( char * fontfacename , int
I am translating a bunch of Windows programs that critically need to work out
pixel dimensions of a string (with no newlines in it).
On Windows I first call getfont:
void getfont ( char * fontfacename , int sizeinpts , int weight , HFONT * hfret
)
{
LOGFONT lf = usewindowsapifunctions (
42 matches
Mail list logo