Skip to main content

Posts

Showing posts from November, 2021

October News...

 2021-10: gnocl::text o insertImage command enhanced to follow the insert command for text, ie.. $wid insertImage <pos> <imagename> -tags <taglist> Where image can take a standard image %-markup prefix gnocl::pango o new subcmds, markup2options, options2markup attempts to convert a pango markup string <span> tag to a list of text attibutes e.g.,  gnocl::pango markup2option "<span foreground='red' background='blue'>"   returns  {-foreground "red" -background "blue"} gnocl::pango option2markup {-foreground "red" -background "blue"}  returns "<span foreground='red' background='blue'>" created strings.h header file, keep decls for project string utilites gnocl::text o tag    new sub command - return character tag properties as pango markup   new options -underlineColor, -strikethroughColor, not use

First Attempt at Accessing GObject Private Data - FAILED

When the toolbar is placed in the vertical alignment widget texts are still centred. I thought that making these alignable might be more aesthically pleasing. I didn't complete the job, but I did glean a little bit more on just how to access widget private data. It all seems to pivot around the G_TYPE_INSTANCE_GET_PRIVATE macro. #if 1 /* ATTEMPT TO LEFT ALIGN BUTTON TEXT */ struct _GtkToolButtonPrivate { GtkWidget *button ; gchar *stock_id ; gchar *icon_name ; gchar *label_text ; GtkWidget *label_widget ; GtkWidget *icon_widget ; GtkSizeGroup *text_size_group ; guint use_underline : 1 ; guint contents_invalid : 1 ; } ; typedef struct _GtkToolButtonPrivate GtkToolButtonPrivate ; struct _GtkToolButton { GtkToolItem parent ; /*< private >*/ GtkToolButtonPrivate *GSEAL ( priv ); } ; #define GTK_TOOL_BUTTON_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonPrivate)) GtkToolButton