ctk

package module
v0.5.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 26 Imported by: 10

README

Go-Curses

Made with Go Go documentation

CTK - Curses Tool Kit

Golang package to provide an advanced terminal user interface with a GTK inspired API, built upon CDK.

Notice

This project should not be used for any purpose other than intellectual curiosity. This status is reflected in the tagged versioning of this trunk branch, v0.5.x, ie: still experimental and unfinished yet getting near the word "done".

Getting Started

CTK is a Go module and as such can be used in any of the typical Golang ways.

Prerequisites

Go v1.21 (or later) is required in order to build and use the package. Beyond that, there aren't any other dependencies. Visit: https://golang.org/doc/install for installation instructions.

Installing

CTK uses the Go mod system and is installed in any of the usual ways.

$ go get github.com/go-curses/ctk@latest
Programming Hello World in CTK

The following application will display a window with "Hello World" as the title, containing a button centered nicely that when pressed will exit the application nicely.

package main

import (
  "os"

  "github.com/go-curses/cdk"
  "github.com/go-curses/cdk/lib/enums"
  "github.com/go-curses/cdk/log"
  "github.com/go-curses/ctk"
)

func main() {
  // Construct a new CDK application
  app := cdk.NewApplication(
    // program binary name
    "hello-world",
    // usage summary
    "Simple Hello World example for CTK",
    // description
    "A simple terminal program written using the Curses Tool Kit",
    // because versioning is important
    "0.0.1",
    // used in logs, internal debugging, etc
    "helloWorld",
    // used where human-readable titles are necessary
    "Hello World",
    // the TTY device to use, /dev/tty is the default
    "/dev/tty",
    // initialize the user-interface
    func(d cdk.Display) error {
      // tell the display to listen for CTRL+C and interrupt gracefully
      d.CaptureCtrlC()
      // create a new window, give it a human-readable title
      w := ctk.NewWindowWithTitle("Hello World")
      // get the vertical box for the content area of the window
      vbox := w.GetVBox()
      // here is where we add other widgets and such to implement the
      // desired user interface elements, in this case we want a nice
      // button in the middle of the window. One way to do this is to
      // use an Alignment widget to place the button neatly for us.
      align := ctk.MakeAlignment()
      // the alignment scales are from 0 (left) to 1 (right) with the 0.5
      // being centered
      align.Set(0.5, 0.5, 0.0, 0.0)
      // a nice button for us to press
      button := ctk.NewButtonWithLabel("Curses<u><i>!</i></u>")
      button.SetUseMarkup(true)    // enable markup in the label
      button.SetSizeRequest(11, 3) // request a certain size
      // make the button quit the application when activated by connecting
      // a handler to the button's activate signal
      button.Connect(
        ctk.SignalActivate,
        "hello-button-handle",
        func(data []interface{}, argv ...interface{}) enums.EventFlag {
          d.RequestQuit() // ask the display to exit nicely
          return enums.EVENT_STOP
        },
      )
      align.Add(button) // add the button to the alignment
      // finally adding the alignment to the window's content area by
      // packing them into the window's vertical box
      vbox.PackStart(align, true /*expand*/, true /*fill*/, 0 /*padding*/)
      // tell CTK that the window and its contents are to be drawn upon
      // the terminal display, this effectively calls Show() on the vbox,
      // alignment and button
      w.ShowAll()
      // tell CDK that this window is the foreground window
      d.SetActiveWindow(w)
      // add a quit handler to say goodbye when the program exits
      d.AddQuitHandler(
        "hello-world-quit-handler",
        func() {
          // Note that the Display and other CTK things are no longer
          // functional at this point.
          fmt.Println("Hello World says Goodbye!")
          // Logging however still works.
          log.InfoF("Hello World logging goodbye!")
        },
      )
      // no errors to report, nil to proceed
      return nil
    },
  )
  // run the application, handing over the command-line arguments received
  if err := app.Run(os.Args); err != nil {
    // doesn't have to be a Fatal exit
    log.Fatal(err)
  }
  // end of program
}

Compile the hello-world.go source file.

$ go build examples/hello-world/hello-world.go

View the command-line help:

$ ./hello-world -h
NAME:
   hello-world - hello-world

USAGE:
   hello-world [global options] command [command options] [arguments...]

VERSION:
   0.0.1

DESCRIPTION:
   the most basic CTK application

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h, --usage  display command-line usage information (default: false)
   --version            display the version (default: false)

Run the program:

$ ./hello-world

hello-world screenshot

Pressing the Curses! button will exit the program and print the quit message to the terminal, which should have cleanly cleared the screen and restored the terminal to shell control again.

Commands

CTK includes a number of command programs for the purpose of enabling a better developer experience or as a means of having a necessity in creating new widgets and features.

go-dialog

go-dialog is a dialog replacement, fully implemented in CTK and takes advantage of Glade interface files for implementing the user interface.

Installation
$ go install github.com/go-curses/ctk/cmd/go-dialog
Usage
$ ./go-dialog --help
NAME:
   go-dialog - display dialog boxes from shell scripts

USAGE:
   go-dialog [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   msgbox   display a message with an OK button, each string following msgbox is a new line and concatenated into the message
   yesno    display a yes/no prompt with a message (see msgbox)
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --title value                     specify the dialog title text
   --print-maxsize                   print the width and height on stdout and exit (default: false)
   --back-title value                specify the window title text
   --help, -h, --usage               display command-line usage information (default: false)
   --version                         display the version (default: false)
Example

Display a message-box dialog (with the title of "Hello Dialog"), centered on top of a full-screen window (with the title "Hello Window"), displaying a message of "This is the message" and presenting a single button labelled "OK".

$ ./go-dialog \
   --back-title "Hello Window" \
   --title "Hello Dialog" \
   msgbox \
   "This is the message."

go-dialog screenshot

go-charmap

This is a simple character-set viewer called go-charmap.

Installation
$ go install github.com/go-curses/ctk/cmd/go-charmap
Usage
$ ./go-charmap --help
NAME:
   go-charmap - View the details of a character

USAGE:
   go-charmap [integer]

VERSION:
   0.0.1

DESCRIPTION:
   Get informational details for a specific character given in integer form.

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h, --usage  display command-line usage information (default: false)
   --version            display the version (default: false)

Example

Display information on the current terminal settings.

$ go-charmap

go-charmap screenshot

Display information on the lowercase sigma character.

$ go-charmap 1010

go-charmap 1010 screenshot

go-ctk

This is a weird one. go-ctk can do a number of things related to working on the CTK project, some useful for normal developers. Particularly the glade option, so that's the one we're going to talk about here.

The glade option for go-ctk enables the developer to test their Glade interface files outside of their normal codebase, as a means of validating whether their problems are in their code or with how CTK is handling the Glade files.

For those not aware, Glade is the formal way to design user interfaces for actual GTK applications. Given that CTK is a curses implementation of GTK, it supports loading widgets and such from Glade interface files.

There are of course all sorts of undocumented and unknown caveats to the support of Glade and all it's configurable features at this time. It is an objective of CTK to formally support Glade as much as sensibly possible.

Usage
$ ./go-ctk help glade
NAME:
   go-ctk glade - preview glade interfaces

USAGE:
   go-ctk glade [command options] [arguments...]

DESCRIPTION:
   load the given .glade file and preview in CTK

OPTIONS:
   --window value, -W value   specify a named (glade "id" attribute) window to preview (default: main-window)
   --dialog value, -D value   specify a named (glade "id" attribute) dialog to preview (default: main-dialog)
   --no-dialog-transient, -n  when rendering ctk.Dialog types, do not set the transient-for to a default window and use the dialog itself as a top-level window (default: false)
Example

There are two example glade files in the examples directory. This example command will load the builder-dialog.glade file and if all is working as it should, display a window with a dialog containing some lorem ipsum text and two buttons, a yes and a no.

For this to work however, it's important to note that within glade we need to set the id on the window and dialog objects. go-ctk defaults to "main-window" and "main-dialog", which the example files use. That's the purpose to the --window and --dialog command-line options.

$ ./go-ctk glade ./examples/builder-dialog.glade

go-ctk glade screenshot

Pressing either of the buttons will exit the viewer and print out which button was pressed.

button pressed: ctk-button-2194440b-86b2-4386-a5a1-984bfec916e6 "Yes"

Running the unit tests

Normal go testing mechanics work.

$ go test -v
=== RUN   TestAdjustment

  ... (per-test output, trimmed for brevity) ...

--- PASS: TestWidget (0.00s)
PASS
ok  	github.com/go-curses/ctk	(0.018s)

Makefile

Included is a Makefile that has a number of useful build targets, as shown in the usage help text.

$ make help
usage: make [target]

qa targets:
  vet         - run go vet command
  test        - perform all available tests
  cover       - perform all available tests with coverage report

cleanup targets:
  clean       - cleans package and built files
  clean-logs  - cleans *.log from the project

go.mod helpers:
  local       - add go.mod local CDK package replacements
  unlocal     - remove go.mod local CDK package replacements

build targets:
  examples    - builds all examples
  build       - build the go-ctk command
  build-all   - build all commands
  dev         - build demo-app with profiling

run targets:
  run         - run the dev build (sanely handle crashes)
  profile.cpu - run the dev build and profile CPU
  profile.mem - run the dev build and profile memory

Versioning

The current API is unstable and subject to change dramatically.

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details.

Acknowledgments

  • Thanks to TCell for providing a solid and robust platform to build upon
  • Thanks to the GTK Team for developing and maintaining the GTK API that CTK is modeled after

Documentation

Overview

Package ctk is a curses-based graphical user interface library modeled after the GTK API.

The purpose of this project is to provide a similar API to the actual GTK project and instead of interacting with an X11 server, the Curses Tool Kit interacts with a terminal display, managed by the Curses Development Kit.

CTK Type Hierarchy

Object
  |- Adjustment
  `- Widget
     |- Container
     |  |- Bin
     |  |  |- Button
     |  |  |- EventBox
     |  |  |- Frame
     |  |  |- Viewport
     |  |  |  `- ScrolledViewport
     |  |  `- Window
     |  |     `- Dialog
     |  `- Box
     |     |- HBox
     |     |- VBox
     |     `- ButtonBox
     |        |- HButtonBox
     |        `- VButtonBox
     |- Misc
     |  |- Arrow
     |  `- Label
     |- Range
     |  |- Scale
     |  |  |- HScale
     |  |  `- VScale
     |  `- Scrollbar
     |     |- HScrollbar
     |     `- VScrollbar
     `- Sensitive

Index

Constants

View Source
const (
	TypeButton       cdk.CTypeTag    = "ctk-button"
	ButtonMonoTheme  paint.ThemeName = "button-mono"
	ButtonColorTheme paint.ThemeName = "button-color"
)
View Source
const (
	TypeEntry       cdk.CTypeTag    = "ctk-entry"
	EntryMonoTheme  paint.ThemeName = "entry-mono"
	EntryColorTheme paint.ThemeName = "entry-color"
)
View Source
const (
	TypeLabel       cdk.CTypeTag    = "ctk-label"
	LabelMonoTheme  paint.ThemeName = "label-mono"
	LabelColorTheme paint.ThemeName = "label-color"
)
View Source
const (
	SignalAllocation        cdk.Signal = "allocation"
	SignalCancelEvent       cdk.Signal = "cancel-event"
	SignalCdkEvent          cdk.Signal = "cdk-event"
	SignalDraw              cdk.Signal = cdk.SignalDraw
	SignalError             cdk.Signal = "error"
	SignalEventKey          cdk.Signal = "key-event"
	SignalEventMouse        cdk.Signal = "mouse-event"
	SignalEventPaste        cdk.Signal = "paste-event"
	SignalGainedEventFocus  cdk.Signal = "gained-event-focus"
	SignalGainedFocus       cdk.Signal = "gained-focus"
	SignalGrabEventFocus    cdk.Signal = "grab-event-focus"
	SignalHomogeneous       cdk.Signal = "homogeneous"
	SignalInvalidate        cdk.Signal = "invalidate"
	SignalInvalidateChanged cdk.Signal = "invalidate-changed"
	SignalLostEventFocus    cdk.Signal = "lost-event-focus"
	SignalLostFocus         cdk.Signal = "lost-focus"
	SignalName              cdk.Signal = "name"
	SignalOrigin            cdk.Signal = "origin"
	SignalPackEnd           cdk.Signal = "pack-end"
	SignalPackStart         cdk.Signal = "pack-start"
	SignalReleaseEventFocus cdk.Signal = "set-event-focus"
	SignalReorderChild      cdk.Signal = "reorder-child"
	SignalReparent          cdk.Signal = "reparent"
	SignalResize            cdk.Signal = "resize"
	SignalSetEventFocus     cdk.Signal = "set-event-focus"
	SignalSetFlags          cdk.Signal = "set-flags"
	SignalSetParent         cdk.Signal = "set-parent"
	SignalSetProperty       cdk.Signal = cdk.SignalSetProperty
	SignalSetSensitive      cdk.Signal = "set-sensitive"
	SignalSetSizeRequest    cdk.Signal = "set-size-request"
	SignalSetState          cdk.Signal = "set-state"
	SignalSetTheme          cdk.Signal = "set-theme"
	SignalSetWindow         cdk.Signal = "set-window"
	SignalShowAll           cdk.Signal = "show-all"
	SignalSpacing           cdk.Signal = "spacing"
	SignalTextDirection     cdk.Signal = "text-direction"
	SignalUnparent          cdk.Signal = "unparent"
	SignalUnsetFlags        cdk.Signal = "unset-flags"
	SignalUnsetState        cdk.Signal = "unset-state"
)
View Source
const (
	SignalSpinnerStart cdk.Signal = "spinner-start"
	SignalSpinnerTick  cdk.Signal = "spinner-tick"
	SignalSpinnerStop  cdk.Signal = "spinner-stop"
)
View Source
const (
	TypeWidget        cdk.CTypeTag    = "ctk-widget"
	TooltipColorStyle paint.StyleName = "tooltip-color"
	TooltipColorTheme paint.ThemeName = "tooltip-color"
)
View Source
const AlignmentDrawHandle = "alignment-draw-handler"
View Source
const AlignmentEventResizeHandle = "alignment-event-resize-handler"
View Source
const AlignmentGainedFocusHandle = "alignment-gained-focus-handler"
View Source
const AlignmentLostFocusHandle = "alignment-lost-focus-handler"
View Source
const ApplicationFocusedWindowHandle = "application-focused-window-handler"
View Source
const ApplicationMappedWindowHandle = "application-mapped-window-handler"
View Source
const ApplicationPluginShutdownHandle = "application-plugin-shutdown-handler"
View Source
const ApplicationPluginStartupHandle = "application-plugin-startup-handler"
View Source
const ApplicationSetupDisplayHandle = "application-setup-display-handler"
View Source
const ApplicationUnmappedWindowHandle = "application-unmapped-window-handler"
View Source
const ArrowDrawHandle = "arrow-draw-handler"
View Source
const ArrowResizeHandle = "arrow-resize-handler"
View Source
const BoxChildHideHandle = "box-child-hide-handler"
View Source
const BoxChildShowHandle = "box-child-show-handler"
View Source
const BoxDrawHandle = "box-draw-handler"
View Source
const BoxEnterHandle = "box-enter-handler"
View Source
const BoxInvalidateHandle = "box-invalidate-handler"
View Source
const BoxLeaveHandle = "box-leave-handler"
View Source
const BoxResizeHandle = "box-resize-handler"
View Source
const ButtonCdkEventHandle = "button-cdk-event-handler"
View Source
const ButtonDrawHandle = "button-draw-handler"
View Source
const ButtonGainedFocusHandle = "button-gained-focus-handler"
View Source
const ButtonInvalidateHandle = "button-invalidate-handler"
View Source
const ButtonLostFocusHandle = "button-lost-focus-handler"
View Source
const ButtonResizeHandle = "button-resize-handler"
View Source
const ButtonSetPropertyHandle = "button-set-property-handler"
View Source
const ButtonSetSensitiveHandle = "button-set-sensitive-handler"
View Source
const ContainerChildHideHandle = "container-child-hide-handler"
View Source
const ContainerChildShowHandle = "container-child-show-handler"
View Source
const ContainerGainedFocusHandle = "container-gained-focus-handler"
View Source
const ContainerLostFocusHandle = "container-lost-focus-handler"
View Source
const CssPropertyBackgroundColor cdk.Property = "background-color"
View Source
const CssPropertyBlink cdk.Property = "blink"
View Source
const CssPropertyBold cdk.Property = "bold"
View Source
const CssPropertyBorder cdk.Property = "border"
View Source
const CssPropertyBorderBackgroundColor cdk.Property = "border-background-color"
View Source
const CssPropertyBorderColor cdk.Property = "border-color"
View Source
const CssPropertyClass cdk.Property = "class"
View Source
const CssPropertyColor cdk.Property = "color"
View Source
const CssPropertyDim cdk.Property = "dim"
View Source
const CssPropertyHeight cdk.Property = "height"
View Source
const CssPropertyItalic cdk.Property = "italic"
View Source
const CssPropertyReverse cdk.Property = "reverse"
View Source
const CssPropertyStrike cdk.Property = "strike"
View Source
const CssPropertyUnderline cdk.Property = "underline"
View Source
const CssPropertyWidth cdk.Property = "width"
View Source
const DialogActivateHandle = "dialog-activate-handler"
View Source
const DialogDrawHandle = "dialog-draw-handler"
View Source
const DialogEventHandle = "dialog-event-handler"
View Source
const DialogInvalidateHandle = "dialog-invalidate-handler"
View Source
const DialogResizeHandle = "dialog-resize-handler"
View Source
const DialogResponseHandle = "dialog-response-handler"
View Source
const FrameChildGainedFocusHandle = "frame-child-gained-focus-handler"
View Source
const FrameChildLostFocusHandle = "frame-child-lost-focus-handler"
View Source
const FrameDrawHandle = "frame-draw-handler"
View Source
const FrameInvalidateHandle = "frame-invalidate-handler"
View Source
const FrameResizeHandle = "frame-resize-handler"
View Source
const LabelDrawHandle = "label-draw-handler"
View Source
const LabelEnterHandle = "label-mouse-enter-handler"
View Source
const LabelInvalidateHandle = "label-invalidate-handler"
View Source
const LabelLeaveHandle = "label-mouse-leave-handler"
View Source
const LabelResizeHandle = "label-resize-handler"
View Source
const PropertyAboveChild cdk.Property = "above-child"

Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it. Flags: Read / Write Default value: FALSE

View Source
const PropertyAccelKey cdk.Property = "accel-key"
View Source
const PropertyAccelLocked cdk.Property = "accel-locked"
View Source
const PropertyAccelMods cdk.Property = "accel-mods"
View Source
const PropertyAccelPath cdk.Property = "accel-path"
View Source
const PropertyAcceptFocus cdk.Property = "accept-focus"

Whether the window should receive the input focus. Flags: Read / Write Default value: TRUE

View Source
const PropertyActionIcon cdk.Property = "action-icon"

The Icon displayed in the Action. Note that the stock icon is preferred, if the “stock-id” property holds the id of an existing stock icon. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write

View Source
const PropertyActionIconName cdk.Property = "icon-name"

The name of the icon from the icon theme. Note that the stock icon is preferred, if the “stock-id” property holds the id of an existing stock icon, and the GIcon is preferred if the “gicon” property is set. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write Default value: NULL

View Source
const PropertyActionLabel cdk.Property = "label"

The label used for menu items and buttons that activate this action. If the label is NULL, CTK uses the stock label specified via the stock-id property. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write Default value: NULL

View Source
const PropertyActionName cdk.Property = "name"

A unique name for the action. Flags: Read / Write / Construct Only Default value: NULL

View Source
const PropertyActionSensitive cdk.Property = "sensitive"

Whether the action is enabled. Flags: Read / Write Default value: TRUE

View Source
const PropertyActionVisible cdk.Property = "visible"

Whether the action is visible. Flags: Read / Write Default value: TRUE

View Source
const PropertyActive cdk.Property = "active"

If the toggle action should be active in or not. Flags: Read / Write Default value: FALSE

View Source
const PropertyAdjustment cdk.Property = "adjustment"

The Adjustment that contains the current value of this range object. Flags: Read / Write / Construct

View Source
const PropertyAlwaysShowImage cdk.Property = "always-show-image"

If TRUE, the action's menu item proxies will ignore the “gtk-menu-images” setting and always show their image, if available. Use this property if the menu item would be useless or hard to use without their image. Flags: Read / Write / Construct Default value: FALSE

View Source
const PropertyAppPaintable cdk.Property = "app-paintable"

Whether the application will paint directly on the widget. Flags: Read / Write Default value: FALSE

View Source
const PropertyArrowShadowType cdk.Property = "shadow-type"

Appearance of the shadow surrounding the arrow. Flags: Read / Write Default value: GTK_SHADOW_OUT

View Source
const PropertyArrowType cdk.Property = "arrow-type"

The direction the arrow should point. Flags: Read / Write Default value: GTK_ARROW_RIGHT

View Source
const PropertyAttributes cdk.Property = "attributes"

A list of style attributes to apply to the text of the label. Flags: Read / Write

View Source
const PropertyBorderWidth cdk.Property = "border-width"

The width of the empty border outside the containers children. Flags: Read / Write Allowed values: <= 65535 Default value: 0

View Source
const PropertyBottomPadding cdk.Property = "bottom-padding"

The padding to insert at the bottom of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0

View Source
const PropertyBoxChildExpand cdk.Property = "box-child--expand"
View Source
const PropertyBoxChildFill cdk.Property = "box-child--fill"
View Source
const PropertyBoxChildPackType cdk.Property = "box-child--pack-type"
View Source
const PropertyBoxChildPadding cdk.Property = "box-child--padding"
View Source
const PropertyButtonLabel cdk.Property = "label"

Text of the label widget inside the button, if the button contains a label widget. Flags: Read / Write / Construct Default value: NULL

View Source
const PropertyCanDefault cdk.Property = "can-default"

Whether the widget can be the default widget. Flags: Read / Write Default value: FALSE

View Source
const PropertyCanFocus cdk.Property = "can-focus"

Whether the widget can accept the input focus. Flags: Read / Write Default value: FALSE

View Source
const PropertyChild cdk.Property = "child"

Can be used to add a new child to the container. Flags: Write

View Source
const PropertyCompositeChild cdk.Property = "composite-child"

Whether the widget is part of a composite widget. Flags: Read Default value: FALSE

View Source
const PropertyCtkAlternativeButtonOrder cdk.Property = "ctk-alternative-button-order"

Whether buttons in dialogs should use the alternative button order. Flags: Read / Write Default value: FALSE

View Source
const PropertyCtkAlternativeSortArrows cdk.Property = "ctk-alternative-sort-arrows"

Controls the direction of the sort indicators in sorted list and tree views. By default an arrow pointing down means the column is sorted in ascending order. When set to TRUE, this order will be inverted. Flags: Read / Write Default value: FALSE

View Source
const PropertyCtkColorPalette cdk.Property = "ctk-color-palette"

Palette to use in the color selector. Flags: Read / Write Default value: "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"

View Source
const PropertyCtkColorScheme cdk.Property = "ctk-color-scheme"

A palette of named colors for use in themes. The format of the string is Color names must be acceptable as identifiers in the color specifications must be in the format accepted by ColorParse. Note that due to the way the color tables from different sources are merged, color specifications will be converted to hexadecimal form when getting this property. Starting with CTK 2.12, the entries can alternatively be separated by ';' instead of newlines: Flags: Read / Write Default value: ""

View Source
const PropertyCtkCursorBlink cdk.Property = "ctk-cursor-blink"

Whether the cursor should blink. Also see the “ctk-cursor-blink-timeout” setting, which allows more flexible control over cursor blinking. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkCursorBlinkTime cdk.Property = "ctk-cursor-blink-time"

Length of the cursor blink cycle, in milliseconds. Flags: Read / Write Allowed values: >= 100 Default value: 1200

View Source
const PropertyCtkCursorBlinkTimeout cdk.Property = "ctk-cursor-blink-timeout"

Time after which the cursor stops blinking, in seconds. The timer is reset after each user interaction. Setting this to zero has the same effect as setting “ctk-cursor-blink” to FALSE. Flags: Read / Write Allowed values: >= 1 Default value: 2147483647

View Source
const PropertyCtkCursorThemeName cdk.Property = "ctk-cursor-theme-name"

Name of the cursor theme to use, or NULL to use the default theme. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkDndDragThreshold cdk.Property = "ctk-dnd-drag-threshold"

Number of pixels the cursor can move before dragging. Flags: Read / Write Allowed values: >= 1 Default value: 8

View Source
const PropertyCtkDoubleClickDistance cdk.Property = "ctk-double-click-distance"

Maximum distance allowed between two clicks for them to be considered a double click (in pixels). Flags: Read / Write Allowed values: >= 0 Default value: 5

View Source
const PropertyCtkDoubleClickTime cdk.Property = "ctk-double-click-time"

Maximum time allowed between two clicks for them to be considered a double click (in milliseconds). Flags: Read / Write Allowed values: >= 0 Default value: 250

View Source
const PropertyCtkEnableAccels cdk.Property = "ctk-enable-accels"

Whether menu items should have visible accelerators which can be activated. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkEnableMnemonics cdk.Property = "ctk-enable-mnemonics"

Whether labels and menu items should have visible mnemonics which can be activated. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkEnableTooltips cdk.Property = "ctk-enable-tooltips"

Whether tooltips should be shown on widgets. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkEntryPasswordHintTimeout cdk.Property = "ctk-entry-password-hint-timeout"

How long to show the last input character in hidden entries. This value is in milliseconds. 0 disables showing the last char. 600 is a good value for enabling it. Flags: Read / Write Default value: 0

View Source
const PropertyCtkEntrySelectOnFocus cdk.Property = "ctk-entry-select-on-focus"

Whether to select the contents of an entry when it is focused. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkErrorBell cdk.Property = "ctk-error-bell"

When TRUE, keyboard navigation and other input-related errors will cause a beep. Since the error bell is implemented using WindowBeep, the windowing system may offer ways to configure the error bell in many ways, such as flashing the window or similar visual effects. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkFallbackIconTheme cdk.Property = "ctk-fallback-icon-theme"

Name of a icon theme to fall back to. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkFileChooserBackend cdk.Property = "ctk-file-chooser-backend"

Name of the FileChooser backend to use by default. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkIconThemeName cdk.Property = "ctk-icon-theme-name"

Name of icon theme to use. Flags: Read / Write Default value: "hicolor"

View Source
const PropertyCtkImModule cdk.Property = "ctk-im-module"

Which IM (input method) module should be used by default. This is the input method that will be used if the user has not explicitly chosen another input method from the IM context menu. This also can be a colon-separated list of input methods, which CTK will try in turn until it finds one available on the system. See IMContext and see the “ctk-show-input-method-menu” property. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkImPreeditStyle cdk.Property = "ctk-im-preedit-style"

How to draw the input method preedit string. Flags: Read / Write Default value: ctk_IM_PREEDIT_CALLBACK

View Source
const PropertyCtkImStatusStyle cdk.Property = "ctk-im-status-style"

How to draw the input method statusbar. Flags: Read / Write Default value: ctk_IM_STATUS_CALLBACK

View Source
const PropertyCtkKeyThemeName cdk.Property = "ctk-key-theme-name"

Name of key theme RC file to load. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkKeynavCursorOnly cdk.Property = "ctk-keynav-cursor-only"

When TRUE, keyboard navigation should be able to reach all widgets by using the cursor keys only. Tab, Shift etc. keys can't be expected to be present on the used input device. Flags: Read / Write Default value: FALSE

View Source
const PropertyCtkKeynavWrapAround cdk.Property = "ctk-keynav-wrap-around"

When TRUE, some widgets will wrap around when doing keyboard navigation, such as menus, menubars and notebooks. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkLabelSelectOnFocus cdk.Property = "ctk-label-select-on-focus"

Whether to select the contents of a selectable label when it is focused. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkMenuBarAccel cdk.Property = "ctk-menu-bar-accel"

Keybinding to activate the menu bar. Flags: Read / Write Default value: "F10"

View Source
const PropertyCtkMenuBarPopupDelay cdk.Property = "ctk-menu-bar-popup-delay"

Delay before the submenus of a menu bar appear. Flags: Read / Write Allowed values: >= 0 Default value: 0

View Source
const PropertyCtkMenuImages cdk.Property = "ctk-menu-images"

Whether images should be shown in menus. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkMenuPopdownDelay cdk.Property = "ctk-menu-popdown-delay"

The time before hiding a submenu when the pointer is moving towards the submenu. Flags: Read / Write Allowed values: >= 0 Default value: 1000

View Source
const PropertyCtkMenuPopupDelay cdk.Property = "ctk-menu-popup-delay"

Minimum time the pointer must stay over a menu item before the submenu appear. Flags: Read / Write Allowed values: >= 0 Default value: 225

View Source
const PropertyCtkModules cdk.Property = "ctk-modules"

List of currently active ctk modules. Flags: Read / Write Default value: NULL

View Source
const PropertyCtkPrimaryButtonWarpsSlider cdk.Property = "ctk-primary-button-warps-slider"

Whether a click in a Range trough should scroll to the click position or scroll by a single page in the respective direction. Flags: Read / Write Default value: FALSE

View Source
const PropertyCtkScrolledWindowPlacement cdk.Property = "ctk-scrolled-window-placement"

Where the contents of scrolled windows are located with respect to the scrollbars, if not overridden by the scrolled window's own placement. Flags: Read / Write Default value: ctk_CORNER_TOP_LEFT

View Source
const PropertyCtkShowInputMethodMenu cdk.Property = "ctk-show-input-method-menu"

Whether the context menus of entries and text views should offer to change the input method. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkShowUnicodeMenu cdk.Property = "ctk-show-unicode-menu"

Whether the context menus of entries and text views should offer to insert control characters. Flags: Read / Write Default value: TRUE

View Source
const PropertyCtkThemeName cdk.Property = "ctk-theme-name"

Name of theme RC file to load. Flags: Read / Write Default value: "Raleigh"

View Source
const PropertyCtkTimeoutExpand cdk.Property = "ctk-timeout-expand"

Expand value for timeouts, when a widget is expanding a new region. Flags: Read / Write Allowed values: >= 0 Default value: 500

View Source
const PropertyCtkTimeoutInitial cdk.Property = "ctk-timeout-initial"

Starting value for timeouts, when button is pressed. Flags: Read / Write Allowed values: >= 0 Default value: 200

View Source
const PropertyCtkTimeoutRepeat cdk.Property = "ctk-timeout-repeat"

Repeat value for timeouts, when button is pressed. Flags: Read / Write Allowed values: >= 0 Default value: 20

View Source
const PropertyCtkToolbarStyle cdk.Property = "ctk-toolbar-style"

Whether default toolbars have text only, text and icons, icons only, etc. Flags: Read / Write Default value: ctk_TOOLBAR_BOTH

View Source
const PropertyCtkTooltipBrowseModeTimeout cdk.Property = "ctk-tooltip-browse-mode-timeout"

Amount of time, in milliseconds, after which the browse mode will be disabled. See “ctk-tooltip-browse-timeout” for more information about browse mode. Flags: Read / Write Allowed values: >= 0 Default value: 500

View Source
const PropertyCtkTooltipBrowseTimeout cdk.Property = "ctk-tooltip-browse-timeout"

Controls the time after which tooltips will appear when browse mode is enabled, in milliseconds. Browse mode is enabled when the mouse pointer moves off an object where a tooltip was currently being displayed. If the mouse pointer hits another object before the browse mode timeout expires (see “ctk-tooltip-browse-mode-timeout”), it will take the amount of milliseconds specified by this setting to popup the tooltip for the new object. Flags: Read / Write Allowed values: >= 0 Default value: 60

View Source
const PropertyCtkTooltipTimeout cdk.Property = "ctk-tooltip-timeout"

Time, in milliseconds, after which a tooltip could appear if the cursor is hovering on top of a widget. Flags: Read / Write Allowed values: >= 0 Default value: 500

View Source
const PropertyCtkTouchscreenMode cdk.Property = "ctk-touchscreen-mode"

When TRUE, there are no motion notify events delivered on this screen, and widgets can't use the pointer hovering them for any essential functionality. Flags: Read / Write Default value: FALSE

View Source
const PropertyCurrentValue cdk.Property = "current-value"

The value property of the currently active member of the group to which this action belongs. Flags: Read / Write Default value: 0

View Source
const PropertyCursorPosition cdk.Property = "cursor-position"

The current position of the insertion cursor in chars. Flags: Read Allowed values: >= 0 Default value: 0

View Source
const PropertyDebug cdk.Property = cdk.PropertyDebug
View Source
const PropertyDebugChildren cdk.Property = "debug-children"
View Source
const PropertyDecorated cdk.Property = "decorated"

Whether the window should be decorated by the window manager. Flags: Read / Write Default value: TRUE

View Source
const PropertyDefaultHeight cdk.Property = "default-height"

The default height of the window, used when initially showing the window. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyDefaultWidth cdk.Property = "default-width"

The default width of the window, used when initially showing the window. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyDeletable cdk.Property = "deletable"

Whether the window frame should have a close button. Flags: Read / Write Default value: TRUE

View Source
const PropertyDestroyWithParent cdk.Property = "destroy-with-parent"

If this window should be destroyed when the parent is destroyed. Flags: Read / Write Default value: FALSE

View Source
const PropertyDoubleBuffered cdk.Property = "double-buffered"

Whether or not the widget is double buffered. Flags: Read / Write Default value: TRUE

View Source
const PropertyDrawAsRadio cdk.Property = "draw-as-radio"

Whether the proxies for this action look like radio action proxies. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write Default value: FALSE

View Source
const PropertyEditable cdk.Property = "editable"
View Source
const PropertyEllipsize cdk.Property = "ellipsize"

The preferred place to ellipsize the string, if the label does not have enough room to display the entire string, specified as a bool. Flags: Read / Write Default value: false

View Source
const PropertyEvents cdk.Property = "events"

The event mask that decides what kind of Events this widget gets. Flags: Read / Write Default value: GDK_STRUCTURE_MASK

View Source
const PropertyExtensionEvents cdk.Property = "extension-events"

The mask that decides what kind of extension events this widget gets. Flags: Read / Write Default value: GDK_EXTENSION_EVENTS_NONE

View Source
const PropertyFillLevel cdk.Property = "fill-level"

The fill level (e.g. prebuffering of a network stream). See SetFillLevel. Flags: Read / Write Default value: 1.79769e+308

View Source
const PropertyFocusOnClick cdk.Property = "focus-on-click"

Whether the button grabs focus when it is clicked with the mouse. Flags: Read / Write Default value: TRUE

View Source
const PropertyFocusOnMap cdk.Property = "focus-on-map"

Whether the window should receive the input focus when mapped. Flags: Read / Write Default value: TRUE

View Source
const PropertyFocusedWidget = "focused-widget"
View Source
const PropertyGravity cdk.Property = "gravity"

The window gravity of the window. See Move and Gravity for more details about window gravity. Flags: Read / Write Default value: GDK_GRAVITY_NORTH_WEST

View Source
const PropertyGroup cdk.Property = "group"

Sets a new group for a radio action. Flags: Write

View Source
const PropertyHAdjustment cdk.Property = "h-adjustment"

The Adjustment for the horizontal position. Flags: Read / Write / Construct

View Source
const PropertyHScrollbarPolicy cdk.Property = "h-scrollbar-policy"

When the horizontal scrollbar is displayed. Flags: Read / Write Default value: GTK_POLICY_ALWAYS

View Source
const PropertyHandler cdk.Property = "handler"
View Source
const PropertyHasDefault cdk.Property = "has-default"

Whether the widget is the default widget. Flags: Read / Write Default value: FALSE

View Source
const PropertyHasFocus cdk.Property = "has-focus"

Whether the widget has the input focus. Flags: Read / Write Default value: FALSE

View Source
const PropertyHasTooltip cdk.Property = "has-tooltip"

Enables or disables the emission of query-tooltip on widget . A value of TRUE indicates that widget can have a tooltip, in this case the widget will be queried using query-tooltip to determine whether it will provide a tooltip or not. Note that setting this property to TRUE for the first time will change the event masks of the Windows of this widget to include leave-notify and motion-notify events. This cannot and will not be undone when the property is set to FALSE again. Flags: Read / Write Default value: FALSE

View Source
const PropertyHasToplevelFocus cdk.Property = "has-toplevel-focus"

Whether the input focus is within this Window. Flags: Read Default value: FALSE

View Source
const PropertyHeightRequest cdk.Property = "height-request"

Override for height request of the widget, or -1 if natural request should be used. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyHideIfEmpty cdk.Property = "hide-if-empty"

When TRUE, empty menu proxies for this action are hidden. Flags: Read / Write Default value: TRUE

View Source
const PropertyHomogeneous cdk.Property = "homogeneous"

Whether the children should all be the same size. Flags: Read / Write Default value: FALSE

View Source
const PropertyID cdk.Property = "id"
View Source
const PropertyIcon cdk.Property = "icon"

Icon for this window. Flags: Read / Write

View Source
const PropertyIconName cdk.Property = "icon-name"

The :icon-name property specifies the name of the themed icon to use as the window icon. See IconTheme for more details. Flags: Read / Write Default value: NULL

View Source
const PropertyImage cdk.Property = "image"

Child widget to appear next to the button text. Flags: Read / Write

View Source
const PropertyImagePosition cdk.Property = "image-position"

The position of the image relative to the text inside the button. Flags: Read / Write Default value: GTK_POS_LEFT

View Source
const PropertyInverted cdk.Property = "inverted"

Invert direction slider moves to increase range value. Flags: Read / Write Default value: FALSE

View Source
const PropertyIsActive cdk.Property = "is-active"

Whether the toplevel is the current active window. Flags: Read Default value: FALSE

View Source
const PropertyIsFocus cdk.Property = "is-focus"

Whether the widget is the focus widget within the toplevel. Flags: Read / Write Default value: FALSE

View Source
const PropertyIsImportant cdk.Property = "is-important"

Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode. Flags: Read / Write Default value: FALSE

View Source
const PropertyIsLocked cdk.Property = "is-locked"

Is the accel group locked. Flags: Read Default value: FALSE

View Source
const PropertyJustify cdk.Property = "justify"

The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See Misc::xAlign for that. Flags: Read / Write Default value: cenums.JUSTIFY_LEFT

View Source
const PropertyLabel cdk.Property = "label"

The text of the label. Flags: Read / Write Default value: ""

View Source
const PropertyLabelUseUnderline cdk.Property = "use-underline"

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Flags: Read / Write Default value: FALSE

View Source
const PropertyLabelWidget cdk.Property = "label-widget"

A widget to display in place of the usual frame label. Flags: Read / Write

View Source
const PropertyLabelXAlign cdk.Property = "label-x-align"

The horizontal alignment of the label. Flags: Read / Write Allowed values: [0,1] Default value: 0

View Source
const PropertyLabelYAlign cdk.Property = "label-y-align"

The vertical alignment of the label. Flags: Read / Write Allowed values: [0,1] Default value: 0.5

View Source
const PropertyLayoutStyle cdk.Property = "layout-style"

How to lay out the buttons in the box. Possible values are: default, spread, edge, start and end. Flags: Read / Write Default value: GTK_BUTTONBOX_DEFAULT_STYLE

View Source
const PropertyLeftPadding cdk.Property = "left-padding"

The padding to insert at the left of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0

View Source
const PropertyLower cdk.Property = "lower"

The minimum value of the adjustment. Flags: Read / Write Default value: 0

View Source
const PropertyLowerStepperSensitivity cdk.Property = "lower-stepper-sensitivity"

The sensitivity policy for the stepper that points to the adjustment's lower side. Flags: Read / Write Default value: GTK_SENSITIVITY_AUTO

View Source
const PropertyMaxWidthChars cdk.Property = "max-width-chars"

The desired maximum width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request space for no more than the requested number of characters. If the “width-chars” property is set to a positive value, then the "max-width-chars" property is ignored. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyMnemonicKeyVal cdk.Property = "mnemonic-key-val"

The mnemonic accelerator key for this label. Flags: Read Default value: 16777215

View Source
const PropertyMnemonicWidget cdk.Property = "mnemonic-widget"

The widget to be activated when the label's mnemonic key is pressed. Flags: Read / Write

View Source
const PropertyMnemonicsVisible cdk.Property = "mnemonics-visible"

Whether mnemonics are currently visible in this window. Flags: Read / Write Default value: TRUE

View Source
const PropertyModal cdk.Property = "modal"

If TRUE, the window is modal (other windows are not usable while this one is up). Flags: Read / Write Default value: FALSE

View Source
const PropertyModifierMask cdk.Property = "modifier-mask"

Modifier Mask. Flags: Read Default value: GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK

View Source
const PropertyName cdk.Property = "name"

The name of the widget. Flags: Read / Write Default value: NULL

View Source
const PropertyNoShowAll cdk.Property = "no-show-all"

Whether ShowAll should not affect this widget. Flags: Read / Write Default value: FALSE

View Source
const PropertyOpacity cdk.Property = "opacity"

The requested opacity of the window. See SetOpacity for more details about window opacity. Flags: Read / Write Allowed values: [0,1] Default value: 1

View Source
const PropertyOrientation cdk.Property = "orientation"

The orientation of the orientable. Flags: Read / Write Default value: ORIENTATION_HORIZONTAL

View Source
const PropertyPageIncrement cdk.Property = "page-increment"

The page increment of the adjustment. Flags: Read / Write Default value: 0

View Source
const PropertyPageSize cdk.Property = "page-size"

The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a SpinButton. Flags: Read / Write Default value: 0

View Source
const PropertyParent cdk.Property = "parent"

The parent widget of this widget. Must be a Container widget. Flags: Read / Write

View Source
const PropertyRadioActionValue cdk.Property = "value"

The value is an arbitrary integer which can be used as a convenient way to determine which action in the group is currently active in an ::activate or ::changed signal handler. See GetCurrentValue and RadioActionEntry for convenient ways to get and set this property. Flags: Read / Write Default value: 0

View Source
const PropertyReceivesDefault cdk.Property = "receives-default"

If TRUE, the widget will receive the default action when it is focused. Flags: Read / Write Default value: FALSE

View Source
const PropertyRelatedAction cdk.Property = "related-action"

The action that this activatable will activate and receive updates from for various states and possibly appearance. Flags: Read / Write

View Source
const PropertyRelief cdk.Property = "relief"

The border relief style. Flags: Read / Write Default value: GTK_RELIEF_NORMAL

View Source
const PropertyResizable cdk.Property = "resizable"

If TRUE, users can resize the window. Flags: Read / Write Default value: TRUE

View Source
const PropertyResizeMode cdk.Property = "resize-mode"

Specify how resize events are handled. Flags: Read / Write Default value: GTK_RESIZE_PARENT

View Source
const PropertyRestrictToFillLevel cdk.Property = "restrict-to-fill-level"

The restrict-to-fill-level property controls whether slider movement is restricted to an upper boundary set by the fill level. See SetRestrictToFillLevel. Flags: Read / Write Default value: TRUE

View Source
const PropertyRightPadding cdk.Property = "right-padding"

The padding to insert at the right of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0

View Source
const PropertyRole cdk.Property = "role"

Unique identifier for the window to be used when restoring a session. Flags: Read / Write Default value: NULL

View Source
const PropertyRoundDigits cdk.Property = "round-digits"

The number of digits to round the value to when it changes, or -1. See “change-value”. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyScreen cdk.Property = "screen"

The screen where this window will be displayed. Flags: Read / Write

View Source
const PropertyScrolledViewportShadowType cdk.Property = "viewport-shadow-type"

Style of bevel around the contents. Flags: Read / Write Default value: GTK_SHADOW_NONE

View Source
const PropertySelectable cdk.Property = "selectable"

Whether the label text can be selected with the mouse. Flags: Read / Write Default value: FALSE

View Source
const PropertySelectionBound cdk.Property = "selection-bound"

The position of the opposite end of the selection from the cursor in chars. Flags: Read Allowed values: >= 0 Default value: 0

View Source
const PropertySensitive cdk.Property = "sensitive"

Whether the widget responds to input. Flags: Read / Write Default value: TRUE

View Source
const PropertyShadow cdk.Property = "shadow"

Deprecated property, use shadow_type instead. Flags: Read / Write Default value: GTK_SHADOW_ETCHED_IN

View Source
const PropertyShadowType cdk.Property = "shadow-type"

Appearance of the frame border. Flags: Read / Write Default value: GTK_SHADOW_ETCHED_IN

View Source
const PropertyShortLabel cdk.Property = "short-label"

A shorter label that may be used on toolbar buttons. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write Default value: NULL

View Source
const PropertyShowFillLevel cdk.Property = "show-fill-level"

The show-fill-level property controls whether fill level indicator graphics are displayed on the trough. See SetShowFillLevel. Flags: Read / Write Default value: FALSE

View Source
const PropertySingleLineMode cdk.Property = "single-line-mode"

Whether the label is in single line mode. In single line mode, the height of the label does not depend on the actual text, it is always set to ascent + descent of the font. This can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar. Flags: Read / Write Default value: FALSE

View Source
const PropertySkipPagerHint cdk.Property = "skip-pager-hint"

TRUE if the window should not be in the pager. Flags: Read / Write Default value: FALSE

View Source
const PropertySkipTaskbarHint cdk.Property = "skip-taskbar-hint"

TRUE if the window should not be in the task bar. Flags: Read / Write Default value: FALSE

View Source
const PropertySpacing cdk.Property = "spacing"

The amount of space between children. Flags: Read / Write Allowed values: >= 0 Default value: 0

View Source
const PropertyStartupId cdk.Property = "startup-id"

The :startup-id is a write-only property for setting window's startup notification identifier. See SetStartupId for more details. Flags: Write Default value: NULL

View Source
const PropertyStepIncrement cdk.Property = "step-increment"

The step increment of the adjustment. Flags: Read / Write Default value: 0

View Source
const PropertyStockId cdk.Property = "stock-id"

The stock icon displayed in widgets representing this action. This is an appearance property and thus only applies if “use-action-appearance” is TRUE. Flags: Read / Write Default value: NULL

View Source
const PropertyStyle cdk.Property = "style"

The style of the widget, which contains information about how it will look (colors etc). Flags: Read / Write

View Source
const PropertySwapped cdk.Property = "swapped"
View Source
const PropertyText cdk.Property = "text"
View Source
const PropertyTitle cdk.Property = "title"

The title of the window. Flags: Read / Write Default value: NULL

View Source
const PropertyTooltip cdk.Property = "tooltip"

A tooltip for this action. Flags: Read / Write Default value: NULL

View Source
const PropertyTooltipMarkup cdk.Property = "tooltip-markup"

Sets the text of tooltip to be the given string, which is marked up with the Tango text markup language. Also see TooltipSetMarkup. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: has-tooltip will automatically be set to TRUE and there will be taken care of query-tooltip in the default signal handler. Flags: Read / Write Default value: NULL

View Source
const PropertyTooltipText cdk.Property = "tooltip-text"

Sets the text of tooltip to be the given string. Also see TooltipSetText. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: has-tooltip will automatically be set to TRUE and there will be taken care of query-tooltip in the default signal handler. Flags: Read / Write Default value: NULL

View Source
const PropertyTopPadding cdk.Property = "top-padding"

The padding to insert at the top of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0

View Source
const PropertyTrackVisitedLinks cdk.Property = "track-visited-links"

Set this property to TRUE to make the label track which links have been clicked. It will then apply the ::visited-link-color color, instead of ::link-color. Flags: Read / Write Default value: TRUE

View Source
const PropertyTransientFor cdk.Property = "transient-for"

The transient parent of the window. See SetTransientFor for more details about transient windows. Flags: Read / Write / Construct

View Source
const PropertyTypeHint cdk.Property = "type-hint"

Hint to help the desktop environment understand what kind of window this is and how to treat it. Flags: Read / Write Default value: GDK_WINDOW_TYPE_HINT_NORMAL

View Source
const PropertyUpdatePolicy cdk.Property = "update-policy"

How the range should be updated on the screen. Flags: Read / Write Default value: GTK_UPDATE_CONTINUOUS

View Source
const PropertyUpper cdk.Property = "upper"

The maximum value of the adjustment. Note that values will be restricted by upper - page-size if the page-size property is nonzero. Flags: Read / Write Default value: 0

View Source
const PropertyUpperStepperSensitivity cdk.Property = "upper-stepper-sensitivity"

The sensitivity policy for the stepper that points to the adjustment's upper side. Flags: Read / Write Default value: GTK_SENSITIVITY_AUTO

View Source
const PropertyUrgencyHint cdk.Property = "urgency-hint"

TRUE if the window should be brought to the user's attention. Flags: Read / Write Default value: FALSE

View Source
const PropertyUseActionAppearance cdk.Property = "use-action-appearance"

Whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. See the Action documentation directly to find which properties should be ignored by the Activatable when this property is FALSE. Flags: Read / Write Default value: TRUE

View Source
const PropertyUseMarkup cdk.Property = "use-markup"

The text of the label includes XML markup. See pango_parse_markup. Flags: Read / Write Default value: FALSE

View Source
const PropertyUseStock cdk.Property = "use-stock"

If set, the label is used to pick a stock item instead of being displayed. Flags: Read / Write / Construct Default value: FALSE

View Source
const PropertyUseUnderline cdk.Property = "use-underline"

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Flags: Read / Write / Construct Default value: FALSE

View Source
const PropertyVAdjustment cdk.Property = "v-adjustment"

The Adjustment for the vertical position. Flags: Read / Write / Construct

View Source
const PropertyVScrollbarPolicy cdk.Property = "vscrollbar-policy"

When the vertical scrollbar is displayed. Flags: Read / Write Default value: GTK_POLICY_ALWAYS

View Source
const PropertyValue cdk.Property = "value"

The value of the adjustment. Flags: Read / Write Default value: 0

View Source
const PropertyViewportHAdjustment cdk.Property = "hadjustment"

The Adjustment that determines the values of the horizontal position for this viewport. Flags: Read / Write / Construct

View Source
const PropertyViewportShadowType cdk.Property = "shadow-type"

Determines how the shadowed box around the viewport is drawn. Flags: Read / Write Default value: GTK_SHADOW_IN

View Source
const PropertyViewportVAdjustment cdk.Property = "vadjustment"

The Adjustment that determines the values of the vertical position for this viewport. Flags: Read / Write / Construct

View Source
const PropertyVisible cdk.Property = "visible"

Whether the widget is visible. Flags: Read / Write Default value: FALSE

View Source
const PropertyVisibleHorizontal cdk.Property = "visible-horizontal"

Whether the toolbar item is visible when the toolbar is in a horizontal orientation. Flags: Read / Write Default value: TRUE

View Source
const PropertyVisibleOverflown cdk.Property = "visible-overflown"

When TRUE, toolitem proxies for this action are represented in the toolbar overflow menu. Flags: Read / Write Default value: TRUE

View Source
const PropertyVisibleVertical cdk.Property = "visible-vertical"

Whether the toolbar item is visible when the toolbar is in a vertical orientation. Flags: Read / Write Default value: TRUE

View Source
const PropertyVisibleWindow cdk.Property = "visible-window"

Whether the event box is visible, as opposed to invisible and only used to trap events. Flags: Read / Write Default value: TRUE

View Source
const PropertyWidthChars cdk.Property = "width-chars"

The desired width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request either 3 characters or the property value, whichever is greater. If the "width-chars" property is set to a positive value, then the “max-width-chars” property is ignored. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyWidthRequest cdk.Property = "width-request"

Override for width request of the widget, or -1 if natural request should be used. Flags: Read / Write Allowed values: >= -1 Default value: -1

View Source
const PropertyWindow cdk.Property = "window"

The widget's window if it is realized, NULL otherwise. Flags: Read

View Source
const PropertyWindowPlacement cdk.Property = "window-placement"

Where the contents are located with respect to the scrollbars. This property only takes effect if "window-placement-set" is TRUE. Flags: Read / Write Default value: GTK_CORNER_TOP_LEFT

View Source
const PropertyWindowPlacementSet cdk.Property = "window-placement-set"

Whether "window-placement" should be used to determine the location of the contents with respect to the scrollbars. Otherwise, the "gtk-scrolled-window-placement" setting is used. Flags: Read / Write Default value: FALSE

View Source
const PropertyWindowPosition cdk.Property = "window-position"

The initial position of the window. Flags: Read / Write Default value: GTK_WIN_POS_NONE

View Source
const PropertyWindowType = cdk.PropertyWindowType

The type of the window. Flags: Read / Write / Construct Only Default value: GTK_WINDOW_TOPLEVEL

View Source
const PropertyWrap cdk.Property = "wrap"

If set, wrap lines if the text becomes too wide. Flags: Read / Write Default value: FALSE

View Source
const PropertyWrapMode cdk.Property = "wrap-mode"

If line wrapping is on (see the “wrap” property) this controls how the line wrapping is done. The default is PANGO_WRAP_WORD, which means wrap on word boundaries. Flags: Read / Write Default value: PANGO_WRAP_WORD

View Source
const PropertyXAlign cdk.Property = "x-align"

Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned. Flags: Read / Write Allowed values: [0,1] Default value: 0.5

View Source
const PropertyXPad cdk.Property = "x-pad"

The amount of space to add on the left and right of the widget, in pixels. Flags: Read / Write Allowed values: >= 0 Default value: 0

View Source
const PropertyXScale cdk.Property = "x-scale"

If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all. Flags: Read / Write Allowed values: [0,1] Default value: 1

View Source
const PropertyYAlign cdk.Property = "y-align"

Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned. Flags: Read / Write Allowed values: [0,1] Default value: 0.5

View Source
const PropertyYPad cdk.Property = "y-pad"

The amount of space to add on the top and bottom of the widget, in pixels. Flags: Read / Write Allowed values: >= 0 Default value: 0

View Source
const PropertyYScale cdk.Property = "y-scale"

If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all. Flags: Read / Write Allowed values: [0,1] Default value: 1

View Source
const ScrollbarDrawHandle = "scrollbar-draw-handler"
View Source
const ScrollbarEventHandle = "scrollbar-event-handler"
View Source
const ScrollbarResizeHandle = "scrollbar-resize-handler"
View Source
const ScrolledViewportDrawHandle = "scrolled-viewport-draw-handler"
View Source
const ScrolledViewportEventHandle = "scrolled-viewport-event-handler"
View Source
const ScrolledViewportGainedFocusHandle = "scrolled-viewport-gained-focus-handler"
View Source
const ScrolledViewportInvalidateHandle = "scrolled-viewport-invalidate-handler"
View Source
const ScrolledViewportLostFocusHandle = "scrolled-viewport-lost-focus-handler"
View Source
const ScrolledViewportResizeHandle = "scrolled-viewport-resize-handler"
View Source
const ScrolledViewportWindowFocusHandle = "scrolled-viewport-window-focus-handler"
View Source
const SeparatorDrawHandle = "separator-draw-handle"
View Source
const SignalAccelActivate cdk.Signal = "accel-activate"

The accel-activate signal is an implementation detail of AccelGroup and not meant to be used by applications.

View Source
const SignalAccelChanged cdk.Signal = "accel-changed"

The accel-changed signal is emitted when a CAccelGroupEntry is added to or removed from the accel group. Widgets like AccelLabel which display an associated accelerator should connect to this signal, and rebuild their visual representation if the accel_closure is theirs. Listener function arguments:

keyval int	the accelerator keyval
modifier cdk.ModMask	the modifier combination of the accelerator
accelClosure GClosure	the GClosure of the accelerator
View Source
const SignalAccelClosuresChanged cdk.Signal = "accel-closures-changed"
View Source
const SignalActionActivate cdk.Signal = "activate"

The "activate" signal is emitted when the action is activated.

View Source
const SignalActivate cdk.Signal = "activate"
View Source
const SignalActivateCurrentLink cdk.Signal = "activate-current-link"

A keybinding signal which gets emitted when the user activates a link in the label. Applications may also emit the signal with g_signal_emit_by_name if they need to control activation of URIs programmatically. The default bindings for this signal are all forms of the Enter key.

View Source
const SignalActivateDefault cdk.Signal = "activate-default"

The ::activate-default signal is a which gets emitted when the user activates the default widget of window .

View Source
const SignalActivateFocus cdk.Signal = "activate-focus"

The ::activate-focus signal is a which gets emitted when the user activates the currently focused widget of window .

View Source
const SignalActivateLink cdk.Signal = "activate-link"

The signal which gets emitted to activate a URI. Applications may connect to it to override the default behaviour, which is to call ShowUri.

View Source
const SignalAdd cdk.Signal = "add"

Listener function arguments:

widget Widget
View Source
const SignalAdjustBounds cdk.Signal = "adjust-bounds"

Listener function arguments:

arg1 float64
View Source
const SignalButtonPressEvent cdk.Signal = "button-press-event"

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalButtonReleaseEvent cdk.Signal = "button-release-event"

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalCanActivateAccel cdk.Signal = "can-activate-accel"

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default Widget handling for determining whether an accelerator can be activated.

View Source
const SignalChangeValue cdk.Signal = "change-value"

The ::change-value signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return TRUE to prevent further processing. Or, by returning FALSE, it can pass the event to other handlers until the default CTK handler is reached. The value parameter is unrounded. An application that overrides the ::change-value signal is responsible for clamping the value to the desired number of decimal digits; the default CTK handler clamps the value based on “round_digits”. It is not possible to use delayed update policies in an overridden ::change-value handler.

View Source
const SignalChanged cdk.Signal = "changed"
View Source
const SignalChangedText cdk.Signal = "changed"

The ::changed signal is emitted at the end of a single user-visible operation on the contents of the Editable. E.g., a paste operation that replaces the contents of the selection will cause only one signal emission (even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple ::notify::text signals to be emitted).

View Source
const SignalCheckResize cdk.Signal = "check-resize"
View Source
const SignalChildNotify cdk.Signal = "child-notify"

The ::child-notify signal is emitted for each changed on an object. The signal's detail holds the property name. Listener function arguments:

pspec GParamSpec        the GParamSpec of the changed child property
View Source
const SignalClampPage cdk.Signal = "clamp-page"
View Source
const SignalClicked cdk.Signal = "clicked"

Emitted when the button has been activated (pressed and released).

View Source
const SignalClientEvent cdk.Signal = "client-event"

The ::client-event will be emitted when the widget 's window receives a message (via a ClientMessage event) from another application.

View Source
const SignalClose cdk.Signal = "close"

The ::close signal is a which gets emitted when the user uses a keybinding to close the dialog. The default binding for this signal is the Escape key.

View Source
const SignalCompositedChanged cdk.Signal = "composited-changed"

The ::composited-changed signal is emitted when the composited status of widget s screen changes. See ScreenIsComposited.

View Source
const SignalConfigure cdk.Signal = "configure"
View Source
const SignalConfigureEvent cdk.Signal = "configure-event"

The ::configure-event signal will be emitted when the size, position or stacking of the widget 's window has changed. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

View Source
const SignalConnectProxy cdk.Signal = "connect-proxy"

The ::connect-proxy signal is emitted after connecting a proxy to an action in the group. Note that the proxy may have been connected to a different action before. This is intended for simple customizations for which a custom action class would be too clumsy, e.g. showing tooltips for menuitems in the statusbar. UIManager proxies the signal and provides global notification just before any action is connected to a proxy, which is probably more convenient to use. Listener function arguments:

action Action	the action
proxy Widget	the proxy
View Source
const SignalCopyClipboard cdk.Signal = "copy-clipboard"

The ::copy-clipboard signal is a which gets emitted to copy the selection to the clipboard. The default binding for this signal is Ctrl-c.

View Source
const SignalDamageEvent cdk.Signal = "damage-event"

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

View Source
const SignalDeleteEvent cdk.Signal = "delete-event"

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting HideOnDelete to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

View Source
const SignalDeleteText cdk.Signal = "delete-text"

This signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission, it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start_pos and end_pos parameters are interpreted as for DeleteText. Listener function arguments:

startPos int	the starting position
endPos int	the end position
View Source
const SignalDestroyEvent cdk.Signal = "destroy-event"

The ::destroy-event signal is emitted when a Window is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

View Source
const SignalDirectionChanged cdk.Signal = "direction-changed"

The ::direction-changed signal is emitted when the text direction of a widget changes. Listener function arguments:

previousDirection TextDirection the previous text direction of widget
View Source
const SignalDisconnectProxy cdk.Signal = "disconnect-proxy"

The ::disconnect-proxy signal is emitted after disconnecting a proxy from an action in the group. UIManager proxies the signal and provides global notification just before any action is connected to a proxy, which is probably more convenient to use. Listener function arguments:

action Action	the action
proxy Widget	the proxy
View Source
const SignalDragBegin cdk.Signal = "drag-begin"

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with DragSourceSetIcon. Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after to override what the default handler did. Listener function arguments:

dragContext DragContext the drag context
View Source
const SignalDragDataDelete cdk.Signal = "drag-data-delete"

The ::drag-data-delete signal is emitted on the drag source when a drag with the action GDK_ACTION_MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What "delete" means depends on the context of the drag operation. Listener function arguments:

dragContext DragContext the drag context
View Source
const SignalDragDataGet cdk.Signal = "drag-data-get"

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info . See SelectionDataSet and SelectionDataSetText. Listener function arguments:

dragContext DragContext the drag context
data SelectionData      the GtkSelectionData to be filled with the dragged data
info int        the info that has been registered with the target in the GtkTargetList
time int        the timestamp at which the data was requested
View Source
const SignalDragDataReceived cdk.Signal = "drag-data-received"

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call DragStatus and not finish the drag. If the data was received in response to a drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call DragFinish, setting the success parameter depending on whether the data was processed successfully. The handler may inspect and modify drag_context->action before calling DragFinish, e.g. to implement GDK_ACTION_ASK as shown in the following example: Listener function arguments:

dragContext DragContext the drag context
x int   where the drop happened
y int   where the drop happened
data SelectionData      the received data
info int        the info that has been registered with the target in the GtkTargetList
time int        the timestamp at which the data was received
View Source
const SignalDragDrop cdk.Signal = "drag-drop"

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler must ensure that DragFinish is called to let the source know that the drop is done. The call to DragFinish can be done either directly or in a drag-data-received handler which gets triggered by calling DragGetData to receive the data for one or more of the supported targets.

View Source
const SignalDragEnd cdk.Signal = "drag-end"

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in drag-begin. Listener function arguments:

dragContext DragContext the drag context
View Source
const SignalDragFailed cdk.Signal = "drag-failed"

The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DND operation based on the type of error, it returns TRUE is the failure has been already handled (not showing the default "drag operation failed" animation), otherwise it returns FALSE.

View Source
const SignalDragLeave cdk.Signal = "drag-leave"

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in drag-motion, e.g. undo highlighting with DragUnhighlight Listener function arguments:

dragContext DragContext the drag context
time int        the timestamp of the motion event
View Source
const SignalDragMotion cdk.Signal = "drag-motion"

The drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling DragStatus. If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling DragGetData and defer the DragStatus call to the drag-data-received handler. Note that you cannot not pass GTK_DEST_DEFAULT_DROP, GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to DragDestSet when using the drag-motion signal that way. Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last drag-leave and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with DragHighlight.

View Source
const SignalEnter cdk.Signal = "enter"

Emitted when the pointer enters the button.

View Source
const SignalEnterNotifyEvent cdk.Signal = "enter-notify-event"

The ::enter-notify-event will be emitted when the pointer enters the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalEvent cdk.Signal = "event"

The CTK main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. key-press-event) and finally a generic event-after signal.

View Source
const SignalEventAfter cdk.Signal = "event-after"

After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values. Listener function arguments:

event Event     the GdkEvent which triggered this signal
View Source
const SignalExposeEvent cdk.Signal = "expose-event"

The ::expose-event signal is emitted when an area of a previously obscured Window is made visible and needs to be redrawn. GTK_NO_WINDOW widgets will get a synthesized event from their parent widget. To receive this signal, the Window associated to the widget needs to enable the GDK_EXPOSURE_MASK mask. Note that the ::expose-event signal has been replaced by a ::draw signal in CTK 3. The CTK 3 migration guide for hints on how to port from ::expose-event to ::draw.

View Source
const SignalFocus cdk.Signal = "focus"
View Source
const SignalFocusChanged cdk.Signal = "focus-changed"

Listener function arguments:

widget Widget
View Source
const SignalFocusInEvent cdk.Signal = "focus-in-event"

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

View Source
const SignalFocusOutEvent cdk.Signal = "focus-out-event"

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

View Source
const SignalFrameEvent cdk.Signal = "frame-event"
View Source
const SignalGetThemeRequest = "get-theme-request"
View Source
const SignalGrabBrokenEvent cdk.Signal = "grab-broken-event"

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.

View Source
const SignalGrabFocus cdk.Signal = "grab-focus"
View Source
const SignalGrabNotify cdk.Signal = "grab-notify"

The ::grab-notify signal is emitted when a widget becomes shadowed by a CTK grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. A widget is shadowed by a GrabAdd when the topmost grab widget in the grab stack of its window group is not its ancestor. Listener function arguments:

wasGrabbed bool FALSE if the widget becomes shadowed, TRUE if it becomes unshadowed
View Source
const SignalHide cdk.Signal = "hide"
View Source
const SignalHierarchyChanged cdk.Signal = "hierarchy-changed"

The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is anchored when its toplevel ancestor is a Window. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

View Source
const SignalInsertText cdk.Signal = "insert-text"

This signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission, it is possible to modify the inserted text, or prevent it from being inserted entirely. Listener function arguments:

newText string	the new text to insert
newTextLength int	the length of the new text, in bytes, or -1 if new_text is nul-terminated
position interface{}	the position, in characters, at which to insert the new text. this is an in-out parameter.  After the signal emission is finished, it should point after the newly inserted text.
View Source
const SignalKeyPressEvent cdk.Signal = "key-press-event"

The ::key-press-event signal is emitted when a key is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalKeyReleaseEvent cdk.Signal = "key-release-event"

The ::key-release-event signal is emitted when a key is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalKeynavFailed cdk.Signal = "keynav-failed"

Gets emitted if keyboard navigation fails. See KeynavFailed for details.

View Source
const SignalKeysChanged cdk.Signal = "keys-changed"

The ::keys-changed signal gets emitted when the set of accelerators or mnemonics that are associated with window changes.

View Source
const SignalLeave cdk.Signal = "leave"

Emitted when the pointer leaves the button.

View Source
const SignalLeaveNotifyEvent cdk.Signal = "leave-notify-event"

The ::leave-notify-event will be emitted when the pointer leaves the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalMap cdk.Signal = "map"
View Source
const SignalMapEvent cdk.Signal = "map-event"

The ::map-event signal will be emitted when the widget 's window is mapped. A window is mapped when it becomes visible on the screen. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

View Source
const SignalMnemonicActivate cdk.Signal = "mnemonic-activate"
View Source
const SignalMotionNotifyEvent cdk.Signal = "motion-notify-event"

The ::motion-notify-event signal is emitted when the pointer moves over the widget's Window. To receive this signal, the Window associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalMoveCursor cdk.Signal = "move-cursor"

The ::move-cursor signal is a which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry , this signal causes the viewport to be moved instead. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically. The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here. Listener function arguments:

step MovementStep	the granularity of the move, as a GtkMovementStep
count int	the number of step units to move
extendSelection bool	TRUE if the move should extend the selection
View Source
const SignalMoveFocus cdk.Signal = "move-focus"

Listener function arguments:

direction DirectionType
View Source
const SignalMoveFocusOut cdk.Signal = "move-focus-out"

Listener function arguments:

arg1 DirectionType
View Source
const SignalMoveSlider cdk.Signal = "move-slider"

Virtual function that moves the slider. Used for keybindings. Listener function arguments:

step ScrollType	how to move the slider
View Source
const SignalNoExposeEvent cdk.Signal = "no-expose-event"

The ::no-expose-event will be emitted when the widget 's window is drawn as a copy of another Drawable (with DrawDrawable or WindowCopyArea) which was completely unobscured. If the source window was partially obscured EventExpose events will be generated for those areas.

View Source
const SignalParentSet cdk.Signal = "parent-set"

The ::parent-set signal is emitted when a new parent has been set on a widget.

View Source
const SignalPopCompositeChild cdk.Signal = "pop-composite-child"
View Source
const SignalPopulatePopup cdk.Signal = "populate-popup"

The ::populate-popup signal gets emitted before showing the context menu of the label. Note that only selectable labels have context menus. If you need to add items to the context menu, connect to this signal and append your menuitems to the menu . Listener function arguments:

menu Menu	the menu that is being populated
View Source
const SignalPopupMenu cdk.Signal = "popup-menu"

This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the Entry widget creates a menu with clipboard commands. See the section called Implement Widget::popup_menu for an example of how to use this signal.

View Source
const SignalPostActivate cdk.Signal = "post-activate"

The ::post-activate signal is emitted just after the action in the action_group is activated This is intended for UIManager to proxy the signal and provide global notification just after any action is activated. Listener function arguments:

action Action	the action
View Source
const SignalPreActivate cdk.Signal = "pre-activate"

The ::pre-activate signal is emitted just before the action in the action_group is activated This is intended for UIManager to proxy the signal and provide global notification just before any action is activated. Listener function arguments:

action Action	the action
View Source
const SignalPressed cdk.Signal = "pressed"

Emitted when the button is pressed.

View Source
const SignalPropertyNotifyEvent cdk.Signal = "property-notify-event"

The ::property-notify-event signal will be emitted when a property on the widget 's window has been changed or deleted. To receive this signal, the Window associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.

View Source
const SignalProximityInEvent cdk.Signal = "proximity-in-event"

To receive this signal the Window associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalProximityOutEvent cdk.Signal = "proximity-out-event"

To receive this signal the Window associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalPushCompositeChild cdk.Signal = "push-composite-child"
View Source
const SignalQueryTooltip cdk.Signal = "query-tooltip"

Emitted when has-tooltip is TRUE and the gtk-tooltip-timeout has expired with the cursor hovering "above" widget ; or emitted when widget got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget . If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of x and y are undefined and should not be used. The signal handler is free to manipulate tooltip with the therefore destined function calls.

View Source
const SignalRadioActionChanged cdk.Signal = "changed"

The ::changed signal is emitted on every member of a radio group when the active member is changed. The signal gets emitted after the ::activate signals for the previous and current active members.

View Source
const SignalRealize cdk.Signal = "realize"
View Source
const SignalReleased cdk.Signal = "released"

Emitted when the button is released.

View Source
const SignalRemove cdk.Signal = "remove"

Listener function arguments:

widget Widget
View Source
const SignalResponse cdk.Signal = "response"

Emitted when an action widget is clicked, the dialog receives a delete event, or the application programmer calls Response. On a delete event, the response ID is GTK_RESPONSE_DELETE_EVENT. Otherwise, it depends on which action widget was clicked. Listener function arguments:

responseId int	the response ID
View Source
const SignalScreenChanged cdk.Signal = "screen-changed"

The ::screen-changed signal gets emitted when the screen of a widget has changed. Listener function arguments:

previousScreen Screen   the previous screen, or NULL if the widget was not associated with a screen before.
View Source
const SignalScrollChild cdk.Signal = "scroll-child"

The ::scroll-child signal is a which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled windows child may listen to and scroll itself.

View Source
const SignalScrollEvent cdk.Signal = "scroll-event"

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

View Source
const SignalSelectionClearEvent cdk.Signal = "selection-clear-event"

The ::selection-clear-event signal will be emitted when the the widget 's window has lost ownership of a selection.

View Source
const SignalSelectionGet cdk.Signal = "selection-get"

Listener function arguments:

data SelectionData
info int
time int
View Source
const SignalSelectionNotifyEvent cdk.Signal = "selection-notify-event"
View Source
const SignalSelectionReceived cdk.Signal = "selection-received"

Listener function arguments:

data SelectionData
time int
View Source
const SignalSelectionRequestEvent cdk.Signal = "selection-request-event"

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget 's window.

View Source
const SignalSetCtkAlternativeButtonOrder cdk.Signal = "ctk-alternative-button-order"
View Source
const SignalSetCtkAlternativeSortArrows cdk.Signal = "ctk-alternative-sort-arrows"
View Source
const SignalSetCtkColorPalette cdk.Signal = "ctk-color-palette"
View Source
const SignalSetCtkColorScheme cdk.Signal = "ctk-color-scheme"
View Source
const SignalSetCtkCursorBlink cdk.Signal = "ctk-cursor-blink"
View Source
const SignalSetCtkCursorBlinkTime cdk.Signal = "ctk-cursor-blink-time"
View Source
const SignalSetCtkCursorBlinkTimeout cdk.Signal = "ctk-cursor-blink-timeout"
View Source
const SignalSetCtkCursorThemeName cdk.Signal = "ctk-cursor-theme-name"
View Source
const SignalSetCtkDndDragThreshold cdk.Signal = "ctk-dnd-drag-threshold"
View Source
const SignalSetCtkDoubleClickDistance cdk.Signal = "ctk-double-click-distance"
View Source
const SignalSetCtkDoubleClickTime cdk.Signal = "ctk-double-click-time"
View Source
const SignalSetCtkEnableAccels cdk.Signal = "ctk-enable-accels"
View Source
const SignalSetCtkEnableMnemonics cdk.Signal = "ctk-enable-mnemonics"
View Source
const SignalSetCtkEnableTooltips cdk.Signal = "ctk-enable-tooltips"
View Source
const SignalSetCtkEntryPasswordHintTimeout cdk.Signal = "ctk-entry-password-hint-timeout"
View Source
const SignalSetCtkEntrySelectOnFocus cdk.Signal = "ctk-entry-select-on-focus"
View Source
const SignalSetCtkErrorBell cdk.Signal = "ctk-error-bell"
View Source
const SignalSetCtkFallbackIconTheme cdk.Signal = "ctk-fallback-icon-theme"
View Source
const SignalSetCtkFileChooserBackend cdk.Signal = "ctk-file-chooser-backend"
View Source
const SignalSetCtkIconThemeName cdk.Signal = "ctk-icon-theme-name"
View Source
const SignalSetCtkImModule cdk.Signal = "ctk-im-module"
View Source
const SignalSetCtkImPreeditStyle cdk.Signal = "ctk-im-preedit-style"
View Source
const SignalSetCtkImStatusStyle cdk.Signal = "ctk-im-status-style"
View Source
const SignalSetCtkKeyThemeName cdk.Signal = "ctk-key-theme-name"
View Source
const SignalSetCtkKeynavCursorOnly cdk.Signal = "ctk-keynav-cursor-only"
View Source
const SignalSetCtkKeynavWrapAround cdk.Signal = "ctk-keynav-wrap-around"
View Source
const SignalSetCtkLabelSelectOnFocus cdk.Signal = "ctk-label-select-on-focus"
View Source
const SignalSetCtkMenuBarAccel cdk.Signal = "ctk-menu-bar-accel"
View Source
const SignalSetCtkMenuBarPopupDelay cdk.Signal = "ctk-menu-bar-popup-delay"
View Source
const SignalSetCtkMenuImages cdk.Signal = "ctk-menu-images"
View Source
const SignalSetCtkMenuPopdownDelay cdk.Signal = "ctk-menu-popdown-delay"
View Source
const SignalSetCtkMenuPopupDelay cdk.Signal = "ctk-menu-popup-delay"
View Source
const SignalSetCtkModules cdk.Signal = "ctk-modules"
View Source
const SignalSetCtkPrimaryButtonWarpsSlider cdk.Signal = "ctk-primary-button-warps-slider"
View Source
const SignalSetCtkScrolledWindowPlacement cdk.Signal = "ctk-scrolled-window-placement"
View Source
const SignalSetCtkShowInputMethodMenu cdk.Signal = "ctk-show-input-method-menu"
View Source
const SignalSetCtkShowUnicodeMenu cdk.Signal = "ctk-show-unicode-menu"
View Source
const SignalSetCtkThemeName cdk.Signal = "ctk-theme-name"
View Source
const SignalSetCtkTimeoutExpand cdk.Signal = "ctk-timeout-expand"
View Source
const SignalSetCtkTimeoutInitial cdk.Signal = "ctk-timeout-initial"
View Source
const SignalSetCtkTimeoutRepeat cdk.Signal = "ctk-timeout-repeat"
View Source
const SignalSetCtkToolbarStyle cdk.Signal = "ctk-toolbar-style"
View Source
const SignalSetCtkTooltipBrowseModeTimeout cdk.Signal = "ctk-tooltip-browse-mode-timeout"
View Source
const SignalSetCtkTooltipBrowseTimeout cdk.Signal = "ctk-tooltip-browse-timeout"
View Source
const SignalSetCtkTooltipTimeout cdk.Signal = "ctk-tooltip-timeout"
View Source
const SignalSetCtkTouchscreenMode cdk.Signal = "ctk-touchscreen-mode"
View Source
const SignalSetFocusChild cdk.Signal = "set-focus-child"

Listener function arguments:

widget Widget
View Source
const SignalSetLower cdk.Signal = "set-lower"
View Source
const SignalSetPageIncrement cdk.Signal = "set-page-increment"
View Source
const SignalSetPageSize cdk.Signal = "set-page-size"
View Source
const SignalSetScrollAdjustments cdk.Signal = "set-scroll-adjustments"

Set the scroll adjustments for the viewport. Usually scrolled containers like ScrolledWindow will emit this signal to connect two instances of Scrollbar to the scroll directions of the Viewport. Listener function arguments:

vertical Adjustment	the vertical GtkAdjustment
arg2 Adjustment
View Source
const SignalSetStepIncrement cdk.Signal = "set-step-increment"
View Source
const SignalSetUpper cdk.Signal = "set-upper"
View Source
const SignalSetValue cdk.Signal = "set-value"
View Source
const SignalShow cdk.Signal = "show"
View Source
const SignalShowHelp cdk.Signal = "show-help"
View Source
const SignalSizeAllocate cdk.Signal = "size-allocate"

Listener function arguments:

allocation Rectangle
View Source
const SignalSizeRequest cdk.Signal = "size-request"

Listener function arguments:

requisition Requisition
View Source
const SignalStateChanged cdk.Signal = "state-changed"

The ::state-changed signal is emitted when the widget state changes. See GetState. Listener function arguments:

state StateType the previous state
View Source
const SignalStyleSet cdk.Signal = "style-set"

The ::style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like ModifyBase also cause this signal to be emitted. Listener function arguments:

previousStyle Style     the previous style, or NULL if the widget just got its initial style.
View Source
const SignalToggled cdk.Signal = "toggled"
View Source
const SignalUnmap cdk.Signal = "unmap"
View Source
const SignalUnmapEvent cdk.Signal = "unmap-event"

The ::unmap-event signal will be emitted when the widget 's window is unmapped. A window is unmapped when it becomes invisible on the screen. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

View Source
const SignalUnrealize cdk.Signal = "unrealize"
View Source
const SignalValueChanged cdk.Signal = "value-changed"
View Source
const SignalVisibilityNotifyEvent cdk.Signal = "visibility-notify-event"

The ::visibility-notify-event will be emitted when the widget 's window is obscured or unobscured. To receive this signal the Window associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.

View Source
const SignalWindowStateEvent cdk.Signal = "window-state-event"

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. To receive this signal the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

View Source
const SpinnerDrawHandle = "spinner-draw-handler"
View Source
const SpinnerResizeHandle = "spinner-resize-handler"
View Source
const TextFieldDrawHandle = "text-field-draw-handler"
View Source
const TextFieldEventHandle = "text-field-event-handler"
View Source
const TextFieldGainedFocusHandle = "text-field-gained-focus-handler"
View Source
const TextFieldInvalidateHandle = "text-field-invalidate-handler"
View Source
const TextFieldLostFocusHandle = "text-field-lost-focus-handler"
View Source
const TextFieldResizeHandle = "text-field-resize-handler"
View Source
const TypeAccelGroup cdk.CTypeTag = "ctk-accel-group"
View Source
const TypeAccelMap cdk.CTypeTag = "ctk-accel-map"
View Source
const TypeAccelerator cdk.CTypeTag = "ctk-accelerator"
View Source
const TypeAction cdk.CTypeTag = "ctk-action"
View Source
const TypeActionGroup cdk.CTypeTag = "ctk-action-group"

CDK type-tag for ActionGroup objects

View Source
const TypeAdjustment cdk.CTypeTag = "ctk-adjustment"
View Source
const TypeAlignment cdk.CTypeTag = "ctk-alignment"
View Source
const TypeApplication cdk.CTypeTag = "ctk-application"
View Source
const TypeArrow cdk.CTypeTag = "ctk-arrow"
View Source
const TypeBin cdk.CTypeTag = "ctk-bin"
View Source
const TypeBox cdk.CTypeTag = "ctk-box"
View Source
const TypeBuilder cdk.CTypeTag = "ctk-builder"
View Source
const TypeButtonBox cdk.CTypeTag = "ctk-button-box"
View Source
const TypeContainer cdk.CTypeTag = "ctk-container"
View Source
const TypeDialog cdk.CTypeTag = "ctk-dialog"
View Source
const TypeEventBox cdk.CTypeTag = "ctk-event-box"
View Source
const TypeFakeWindow cdk.CTypeTag = "ctk-fake-window"
View Source
const TypeFrame cdk.CTypeTag = "ctk-frame"
View Source
const (
	TypeHBox cdk.CTypeTag = "ctk-h-box"
)
View Source
const TypeHButtonBox cdk.CTypeTag = "ctk-h-button-box"
View Source
const (
	TypeHScrollbar cdk.CTypeTag = "ctk-h-scrollbar"
)
View Source
const TypeMisc cdk.CTypeTag = "ctk-misc"
View Source
const TypeObject cdk.CTypeTag = "ctk-object"
View Source
const TypeRadioAction cdk.CTypeTag = "ctk-radio-action"
View Source
const TypeRange cdk.CTypeTag = "ctk-range"
View Source
const TypeScrollbar cdk.CTypeTag = "ctk-scrollbar"
View Source
const (
	TypeScrolledViewport cdk.CTypeTag = "ctk-scrolled-viewport"
)
View Source
const TypeSeparator cdk.CTypeTag = "ctk-separator"
View Source
const TypeSettings cdk.CTypeTag = "ctk-settings"
View Source
const TypeSpinner cdk.CTypeTag = "ctk-spinner"
View Source
const TypeStyle cdk.CTypeTag = "ctk-style"
View Source
const TypeToggleAction cdk.CTypeTag = "ctk-toggle-action"
View Source
const (
	TypeVBox cdk.CTypeTag = "ctk-v-box"
)
View Source
const TypeVButtonBox cdk.CTypeTag = "ctk-v-button-box"
View Source
const (
	TypeVScrollbar cdk.CTypeTag = "ctk-v-scrollbar"
)
View Source
const TypeViewport cdk.CTypeTag = "ctk-viewport"
View Source
const TypeWindow cdk.CTypeTag = "ctk-window"
View Source
const ViewportDrawHandle = "viewport-draw-handler"
View Source
const ViewportInvalidateHandle = "viewport-invalidate-handler"
View Source
const ViewportResizeHandle = "viewport-resize-handler"
View Source
const WidgetActivateHandle = "widget-activate-handler"
View Source
const WidgetEnterHandle = "widget-enter-handler"
View Source
const WidgetGainedFocusHandle = "widget-gained-focus-handler"
View Source
const WidgetLeaveHandle = "widget-leave-handler"
View Source
const WidgetLostFocusHandle = "widget-lost-focus-handler"
View Source
const WidgetTooltipWindowEventHandle = "widget-tooltip-window-event-handler"
View Source
const WindowDisplayFocusHandle = "window-display-focus-handler"
View Source
const WindowDrawHandle = "window-draw-handler"
View Source
const WindowEventHandle = "window-event-handler"
View Source
const WindowInvalidateHandle = "window-invalidate-handler"
View Source
const WindowResizeHandle = "window-resize-handler"

Variables

View Source
var (
	ScrollbarMonoTheme  paint.ThemeName = "scrollbar-mono"
	ScrollbarColorTheme paint.ThemeName = "scrollbar-color"
)
View Source
var ApplicationPluginInitFnName = "CtkInit"
View Source
var ApplicationPluginShutdownFnName = "CtkShutdown"
View Source
var ApplicationPluginStartupFnName = "CtkStartup"
View Source
var DefaultStyles string
View Source
var ErrFallthrough = fmt.Errorf("fallthrough")

Functions

func AddStockItems

func AddStockItems(items ...*StockItem)

Registers each of the stock items in items. If an item already exists with the same stock ID as one of the items, the old item gets replaced.

func BuilderRegisterConstructor

func BuilderRegisterConstructor(tag cdk.TypeTag, fn BuilderTranslationFn)

func ValidStockId added in v0.3.0

func ValidStockId(id StockID) (ok bool)

ValidStockId returns TRUE if the given StockID has been registered.

func WidgetDescend added in v0.4.7

func WidgetDescend(widget Widget, fn WidgetIteratorFn) (rv cenums.EventFlag)

func WidgetRecurseInvalidate added in v0.4.7

func WidgetRecurseInvalidate(widget Widget)

func WidgetRecurseSetWindow added in v0.4.7

func WidgetRecurseSetWindow(widget Widget, window Window)

func WithAppWindow added in v0.5.14

func WithAppWindow(action AppFn, argv ...string) func()

func WithArgvApplicationSignalStartup added in v0.4.0

func WithArgvApplicationSignalStartup(startupFn ApplicationStartupFn) cdk.SignalListenerFn

func WithArgvNoneSignal added in v0.4.0

func WithArgvNoneSignal(fn func(), eventFlag cenums.EventFlag) cdk.SignalListenerFn

func WithArgvNoneWithFlagsSignal added in v0.4.0

func WithArgvNoneWithFlagsSignal(fn func() cenums.EventFlag) cdk.SignalListenerFn

func WithArgvSignalEvent added in v0.4.2

func WithArgvSignalEvent(fn SignalEventFn) cdk.SignalListenerFn

func WithFakeWindow

func WithFakeWindow(fn WithFakeWindowFn) func()

func WithFakeWindowOptions

func WithFakeWindowOptions(w, h int, theme paint.Theme, fn WithFakeWindowFn) func()

Types

type AccelGroup

type AccelGroup interface {
	Object

	Init() (already bool)
	AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags enums.AccelFlags, handle string, closure enums.GClosure) (id uuid.UUID)
	ConnectByPath(accelPath string, handle string, closure enums.GClosure)
	AccelGroupActivate(keyval cdk.Key, modifier cdk.ModMask) (activated bool)
	AccelDisconnect(id uuid.UUID) (removed bool)
	DisconnectKey(accelKey cdk.Key, accelMods cdk.ModMask) (removed bool)
	Query(accelKey cdk.Key, accelMods cdk.ModMask) (entries []*CAccelGroupEntry)
	Activate(accelKey cdk.Key, accelMods cdk.ModMask) (value bool)
	LockGroup()
	UnlockGroup()
	GetIsLocked() (locked bool)
	GetModifierMask() (value cdk.ModMask)
	Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)
	AcceleratorValid(keyval cdk.Key, modifiers cdk.ModMask) (valid bool)
	AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)
	AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
	AcceleratorGetLabel(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
	AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)
	AcceleratorGetDefaultModMask() (value int)
}

AccelGroup Hierarchy:

Object
  +- AccelGroup

An AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Window (with Window.AddAccelGroup). Usually you won't need to create a AccelGroup directly; instead CTK automatically sets up the accelerators for your menus in the item factory's AccelGroup. Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. Menu items can have both accelerators and mnemonics, of course. See: Label.NewWithMnemonic()

func MakeAccelGroup

func MakeAccelGroup() AccelGroup

MakeAccelGroup is used by the Buildable system to construct a new AccelGroup.

func NewAccelGroup

func NewAccelGroup() (value AccelGroup)

NewAccelGroup is the constructor for new AccelGroup instances.

type AccelGroupFindFunc

type AccelGroupFindFunc = func(key AccelKey, closure enums.GClosure, data []interface{}) bool

type AccelGroups added in v0.3.0

type AccelGroups interface {
	Object

	AddAccelGroup(object Object, accelGroup AccelGroup)
	RemoveAccelGroup(object Object, accelGroup AccelGroup)
	Activate(object Object, accelKey cdk.Key, accelMods cdk.ModMask) (value bool)
	FromObject(object Object) (groups []AccelGroup)
}

func NewAccelGroups added in v0.3.0

func NewAccelGroups() (groups AccelGroups)

type AccelKey

type AccelKey interface {
	GetKey() cdk.Key
	GetMods() cdk.ModMask
	GetFlags() enums.AccelFlags
	Match(key cdk.Key, mods cdk.ModMask) (match bool)
	String() (key string)
}

func NewAccelKey added in v0.3.2

func NewAccelKey(key cdk.Key, mods cdk.ModMask, flags enums.AccelFlags) (accelKey AccelKey)

type AccelMap added in v0.3.0

type AccelMap interface {
	Object

	Init() (already bool)
	AddEntry(accelPath string, accelKey cdk.Key, accelMods cdk.ModMask)
	LookupEntry(accelPath string) (accelerator Accelerator, ok bool)
	ChangeEntry(accelPath string, accelKey cdk.Key, accelMods cdk.ModMask, replace bool) (ok bool)
	Load(fileName string)
	LoadFromString(accelMap string)
	Save(fileName string)
	SaveToString() (accelMap string)
	LockPath(accelPath string)
	UnlockPath(accelPath string)
}

AccelMap Hierarchy:

	Object
   +- AccelMap

The AccelMap is the global accelerator mapping object. There is only one AccelMap instance for any given Display.

func GetAccelMap added in v0.3.0

func GetAccelMap() AccelMap

GetAccelMap is the getter for the current Application AccelMap singleton. Returns nil if there is no Application present for the current thread.

type Accelerator added in v0.3.0

type Accelerator interface {
	Object

	Init() (already bool)
	LockAccel()
	UnlockAccel()
	IsLocked() (locked bool)
	Path() (path string)
	Key() (key cdk.Key)
	Mods() (mods cdk.ModMask)
	Match(key cdk.Key, mods cdk.ModMask) (match bool)
	Settings() (path string, key cdk.Key, mods cdk.ModMask)
	Configure(key cdk.Key, mods cdk.ModMask)
	UnsetKeyMods()
}

func NewAccelerator added in v0.3.0

func NewAccelerator(path string, key cdk.Key, mods cdk.ModMask) Accelerator

func NewDefaultAccelerator added in v0.3.0

func NewDefaultAccelerator(path string) Accelerator

type Action added in v0.3.0

type Action interface {
	Object

	Init() (already bool)
	GetName() (value string)
	IsSensitive() (value bool)
	GetSensitive() (value bool)
	SetSensitive(sensitive bool)
	IsVisible() (value bool)
	GetVisible() (value bool)
	SetVisible(visible bool)
	Activate()
	CreateMenuItem() (value Widget)
	CreateToolItem() (value Widget)
	CreateMenu() (value Widget)
	GetProxies() (value []interface{})
	ConnectAccelerator()
	DisconnectAccelerator()
	UnblockActivate()
	GetAlwaysShowImage() (value bool)
	SetAlwaysShowImage(alwaysShow bool)
	GetAccelPath() (value string)
	SetAccelPath(accelPath string)
	GetAccelClosure() (value enums.GClosure)
	SetAccelGroup(accelGroup AccelGroup)
	SetLabel(label string)
	GetLabel() (value string)
	SetShortLabel(shortLabel string)
	GetShortLabel() (value string)
	SetTooltip(tooltip string)
	GetTooltip() (value string)
	SetStockId(stockId StockID)
	GetStockId() (value StockID)
	SetIcon(icon rune)
	GetIcon() (value rune)
	SetIconName(iconName string)
	GetIconName() (value string)
	SetVisibleHorizontal(visibleHorizontal bool)
	GetVisibleHorizontal() (value bool)
	SetVisibleVertical(visibleVertical bool)
	GetVisibleVertical() (value bool)
	SetIsImportant(isImportant bool)
	GetIsImportant() (value bool)
}

Action Hierarchy:

Object
  +- Action
    +- ToggleAction
    +- RecentAction

Actions represent operations that the user can perform, along with some information how it should be presented in the interface. Each action provides methods to create icons, menu items and toolbar items representing itself. As well as the callback that is called when the action gets activated, the following also gets associated with the action: a name (not translated, for path lookup) a label (translated, for display) an accelerator whether label indicates a stock id a tooltip (optional, translated) a toolbar label (optional, shorter than label) The action will also have some state information: visible (shown/hidden) sensitive (enabled/disabled) Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the "active" state. Other actions can be implemented as Action subclasses. Each action can have one or more proxy menu item, toolbar button or other proxy widgets. Proxies mirror the state of the action (text label, tooltip, icon, visible, sensitive, etc), and should change when the action's state changes. When the proxy is activated, it should activate its action.

func MakeAction added in v0.3.0

func MakeAction() Action

Default constructor for Action objects

func NewAction added in v0.3.0

func NewAction(name string, label string, tooltip string, stockId string) (value Action)

Constructor for Action objects

type ActionEntry added in v0.3.0

type ActionEntry struct {
	Name        string
	StockId     string
	Label       string
	Accelerator string
	Tooltip     string
	Callback    enums.GCallback
}

type ActionGroup added in v0.3.0

type ActionGroup interface {
	Object

	Init() (already bool)
	GetName() (value string)
	GetSensitive() (value bool)
	SetSensitive(sensitive bool)
	GetVisible() (value bool)
	SetVisible(visible bool)
	GetAction(actionName string) (value Action)
	ListActions() (value []Action)
	AddAction(action Action)
	AddActionWithAccel(action Action, accelerator string)
	RemoveAction(action Action)
	AddActions(entries []ActionEntry, nEntries int, userData interface{})
	AddActionsFull(entries []ActionEntry, nEntries int, userData interface{}, destroy GDestroyNotify)
	AddToggleActions(entries []ToggleActionEntry, nEntries int, userData interface{})
	AddToggleActionsFull(entries []ToggleActionEntry, nEntries int, userData interface{}, destroy GDestroyNotify)
	AddRadioActions(entries []RadioActionEntry, nEntries int, value int, onChange enums.GCallback, userData interface{})
	AddRadioActionsFull(entries []RadioActionEntry, nEntries int, value int, onChange enums.GCallback, userData interface{}, destroy GDestroyNotify)
	SetTranslateFunc(fn TranslateFunc, data interface{}, notify GDestroyNotify)
	SetTranslationDomain(domain string)
	TranslateString(string string) (value string)
}

ActionGroup Hierarchy:

Object
  +- ActionGroup

func MakeActionGroup added in v0.3.0

func MakeActionGroup() ActionGroup

MakeActionGroup is used by the Buildable system to construct a new ActionGroup.

func NewActionGroup added in v0.3.0

func NewActionGroup(name string) (value ActionGroup)

NewActionGroup is the constructor for new ActionGroup instances.

type Activatable

type Activatable interface {
	Activate() (value bool)
	Clicked() enums.EventFlag
	GrabFocus()
}

Activatable Hierarchy:

CInterface
  +- Activatable

type Adjustment

type Adjustment interface {
	Object

	GetValue() (value int)
	SetValue(value int)
	ClampPage(upper, lower int)
	Changed() cenums.EventFlag
	ValueChanged() cenums.EventFlag
	Settings() (value, lower, upper, stepIncrement, pageIncrement, pageSize int)
	Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize int)
	GetLower() (value int)
	SetLower(lower int)
	GetUpper() (upper int)
	SetUpper(upper int)
	GetStepIncrement() (stepIncrement int)
	SetStepIncrement(stepIncrement int)
	GetPageIncrement() (pageIncrement int)
	SetPageIncrement(pageIncrement int)
	GetPageSize() (pageSize int)
	SetPageSize(pageSize int)
	Moot() bool
	ShowByPolicy(policy enums.PolicyType) bool
}

Adjustment Hierarchy:

Object
  +- Adjustment

The Adjustment CTK object is a means of managing the state of multiple widgets concurrently. By sharing the same Adjustment instance, one or more widgets can ensure that all related User Interface elements are reflecting the same values and constraints. The Adjustment consists of an integer value, with an upper and lower bounds, and pagination rendering features

func MakeAdjustment

func MakeAdjustment() Adjustment

MakeAdjustment is used by the Buildable system to construct a new Adjustment.

func NewAdjustment

func NewAdjustment(value, lower, upper, stepIncrement, pageIncrement, pageSize int) Adjustment

NewAdjustment is the constructor for new Adjustment instances.

type Alignable

type Alignable interface {
	SetAlignment(xAlign float64, yAlign float64)
	GetAlignment() (xAlign float64, yAlign float64)
}

An Alignable Widget is one that implements the SetAlignment and GetAlignment methods for adjusting the positioning of the Widget. The Misc and Alignment types are the primary ones implementing this interface.

type Alignment

type Alignment interface {
	Bin
	Buildable

	Get() (xAlign, yAlign, xScale, yScale float64)
	Set(xAlign, yAlign, xScale, yScale float64)
	GetPadding() (paddingTop, paddingBottom, paddingLeft, paddingRight int)
	SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight int)
}

Alignment Hierarchy:

Object
  +- Widget
    +- Container
      +- Bin
        +- Alignment

The Alignment widget controls the alignment and size of its child widget. It has four settings: xScale, yScale, xAlign, and yAlign. The scale settings are used to specify how much the child widget should expand to fill the space allocated to the Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space). The alignment settings are used to place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect. New Alignment instances can be created using NewAlignment.

func MakeAlignment

func MakeAlignment() Alignment

MakeAlignment is used by the Buildable system to construct a new Alignment with default settings of: xAlign=0.5, yAlign=1.0, xScale=0.5, yScale=1.0

func NewAlignment

func NewAlignment(xAlign float64, yAlign float64, xScale float64, yScale float64) Alignment

NewAlignment is the constructor for new Alignment instances.

Parameters:

xAlign	the horizontal alignment of the child widget, from 0 (left) to 1 (right)
yAlign	the vertical alignment of the child widget, from 0 (top) to 1 (bottom)
xScale	the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Alignment
yScale	the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xScale

type AppFn added in v0.4.0

type AppFn func(app Application)

type Application added in v0.4.0

type Application interface {
	cdk.Application

	AccelMap() (accelMap AccelMap)
	AccelGroup() (accelGroup AccelGroup)
}

Application Hierarchy:

Object
  +- Application

An Application is the CTK replacement for cdk.Application.

func ArgvApplicationSignalStartup added in v0.4.0

func ArgvApplicationSignalStartup(argv ...interface{}) (app Application, display cdk.Display, ctx context.Context, cancel context.CancelFunc, wg *sync.WaitGroup, ok bool)

func NewApplication added in v0.4.0

func NewApplication(name, usage, description, version, tag, title, ttyPath string) (app Application)

func NewApplicationFromPlugin added in v0.4.0

func NewApplicationFromPlugin(path string) (app Application, err error)

NewApplicationFromPlugin constructs an Application from a Go plugin shared object file. This file must export a number of variables and functions, as follows:

Variables
---------
 CtkName         the name of the program binary
 CtkUsage        brief summary of what the program is used for
 CtkDescription  long description of the program
 CtkVersion      the version number to report
 CtkTag          a machine tag name, ie: "tld.domain.name" ([-.a-zA-Z])
 CtkTitle        the user-visible name of the program
 CtkTtyPath      the unix tty device path for display capture

Functions
---------
 // early initialization stage
 Init(Application)
 // UI initialization stage
 Startup(Application, cdk.Display, context.Context, context.CancelFunc, *sync.WaitGroup) cenums.EventFlag
 // Application shutdown stage (display destroyed, logging still works, stdin/stdout restored)
 Shutdown() cenums.EventFlag

Two things must happen in the Startup function for CTK to correctly start rendering the user-interface. The first is to ensure that the function returns EVENT_PASS for the SignalStartup to complete. Returning EVENT_STOP will abort the entire startup process and immediately result in system shutdown. The second thing that must happen for startup to complete is that Application.NotifyStartupComplete must be called before returning EVENT_PASS. This will notify the Application and enable the Display to begin rending to the Screen instance.

type ApplicationInitFn added in v0.4.0

type ApplicationInitFn = func(app Application)

type ApplicationShutdownFn added in v0.4.0

type ApplicationShutdownFn = func() cenums.EventFlag

type ApplicationStartupFn added in v0.4.0

type ApplicationStartupFn = func(
	app Application,
	display cdk.Display,
	ctx context.Context,
	cancel context.CancelFunc,
	wg *sync.WaitGroup,
) cenums.EventFlag

type Arrow

type Arrow interface {
	Misc
	Buildable

	GetArrowType() (arrow enums.ArrowType)
	SetArrowType(arrow enums.ArrowType)
	GetArrowRune() (r rune, width int)
	GetArrowRuneSet() (ars paint.ArrowRuneSet)
	SetArrowRuneSet(ars paint.ArrowRuneSet)
}

Arrow Hierarchy:

Object
  +- Widget
    +- Misc
      +- Arrow

The Arrow Widget should be used to draw simple arrows that need to point in one of the four cardinal directions (up, down, left, or right). The style of the arrow can be one of shadow in, shadow out, etched in, or etched out. Note that these directions and style types may be amended in versions of CTK to come. Arrow will fill any space allotted to it, but since it is inherited from Misc, it can be padded and/or aligned, to fill exactly the space the programmer desires. Arrows are created with a call to NewArrow. The direction or style of an arrow can be changed after creation by using Set.

func MakeArrow

func MakeArrow() Arrow

MakeArrow is used by the Buildable system to construct a new Arrow with a default ArrowType setting of ArrowRight.

func NewArrow

func NewArrow(arrow enums.ArrowType) Arrow

NewArrow is the constructor for new Arrow instances.

type Bin

type Bin interface {
	Container
	Buildable

	GetChild() (value Widget)
}

Bin Hierarchy:

Object
  +- Widget
    +- Container
      +- Bin
        +- Window
        +- Alignment
        +- Frame
        +- Button
        +- Item
        +- ComboBox
        +- EventBox
        +- Expander
        +- HandleBox
        +- ToolItem
        +- ScrolledWindow
        +- Viewport

The Bin Widget is a Container with just one child. It is not very useful itself, but it is useful for deriving subclasses, since it provides common code needed for handling a single child widget. Many CTK widgets are subclasses of Bin, including Window, Button, Frame or ScrolledWindow.

func MakeBin added in v0.1.2

func MakeBin() Bin

MakeBin is used by the Buildable system to construct a new Bin.

func NewBin added in v0.1.2

func NewBin() Bin

NewBin is the constructor for new Bin instances.

type Box

type Box interface {
	Container
	Buildable
	Orientable

	GetHomogeneous() (value bool)
	SetHomogeneous(homogeneous bool)
	GetSpacing() (value int)
	SetSpacing(spacing int)
	PackStart(child Widget, expand, fill bool, padding int)
	PackEnd(child Widget, expand, fill bool, padding int)
	ReorderChild(child Widget, position int)
	QueryChildPacking(child Widget) (expand bool, fill bool, padding int, packType enums.PackType)
	SetChildPacking(child Widget, expand bool, fill bool, padding int, packType enums.PackType)
}

Box Hierarchy:

Object
  +- Widget
    +- Container
      +- Box
        +- ButtonBox
        +- VBox
        +- HBox

The Box Widget is a Container for organizing one or more child Widgets. A Box displays either a horizontal row or vertical column of the visible children contained within.

func MakeBox

func MakeBox() (box Box)

MakeBox is used by the Buildable system to construct a new Box with default settings of: horizontal orientation, dynamically sized (not homogeneous) and no extra spacing.

func NewBox

func NewBox(orientation cenums.Orientation, homogeneous bool, spacing int) Box

NewBox is the constructor for new Box instances.

Parameters:

orientation  the orientation of the Box vertically or horizontally
homogeneous  whether each child receives an equal size allocation or not
spacing      extra spacing to include between children

type Buildable

type Buildable interface {
	Widget

	ListProperties() (known []cdk.Property)
	InitWithProperties(properties map[cdk.Property]string) (already bool, err error)
	Build(builder Builder, element *CBuilderElement) error
	SetProperties(properties map[cdk.Property]string) (err error)
	SetPropertyFromString(property cdk.Property, value string) (err error)
	Connect(signal cdk.Signal, handle string, c cdk.SignalListenerFn, data ...interface{})
}

type Builder

type Builder interface {
	cdk.Object

	Init() (already bool)
	BuildableTypeTags() map[string]cdk.TypeTag
	LookupNamedSignalHandler(name string) (fn cdk.SignalListenerFn)
	AddNamedSignalHandler(name string, fn cdk.SignalListenerFn)
	GetWidget(name string) (w interface{})
	GetWidgetsBuiltByType(tag cdk.CTypeTag) (widgets []interface{})
	ParsePacking(packing *CBuilderElement) (expand, fill bool, padding int, packType enums.PackType)
	LoadFromString(raw string) (topElement *CBuilderElement, err error)
	Build(element *CBuilderElement) (newObject interface{})
}

func NewBuilder

func NewBuilder() (builder Builder)

type BuilderElement

type BuilderElement interface {
	String() string
	ApplySignals()
	ApplySignal(k, v string)
	ApplyProperties()
	ApplyProperty(k, v string) (set bool)
}

type BuilderNode

type BuilderNode struct {
	XMLName xml.Name
	Attrs   []xml.Attr    `xml:"-"`
	Content []byte        `xml:",innerxml"`
	Nodes   []BuilderNode `xml:",any"`
}

func (*BuilderNode) UnmarshalXML

func (n *BuilderNode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BuilderTranslationFn

type BuilderTranslationFn = func(builder Builder, widget Widget, name, value string) error

type Button

type Button interface {
	Bin
	Activatable
	Alignable
	Buildable
	Sensitive

	Activate() (value bool)
	Clicked() cenums.EventFlag
	GetRelief() (value enums.ReliefStyle)
	SetRelief(newStyle enums.ReliefStyle)
	GetLabel() (value string)
	SetLabel(label string)
	GetUseStock() (value bool)
	SetUseStock(useStock bool)
	GetUseUnderline() (enabled bool)
	SetUseUnderline(enabled bool)
	GetUseMarkup() (enabled bool)
	SetUseMarkup(enabled bool)
	GetFocusOnClick() (value bool)
	SetFocusOnClick(focusOnClick bool)
	GetAlignment() (xAlign float64, yAlign float64)
	SetAlignment(xAlign float64, yAlign float64)
	GetImage() (value Widget, ok bool)
	SetImage(image Widget)
	GetImagePosition() (value enums.PositionType)
	SetImagePosition(position enums.PositionType)
	GetPressed() bool
	SetPressed(pressed bool)
	CancelEvent()
}

Button Hierarchy:

Object
  +- Widget
    +- Container
      +- Bin
        +- Button
          +- ToggleButton
          +- ColorButton
          +- FontButton
          +- LinkButton
          +- OptionMenu
          +- ScaleButton

The Button Widget is a Bin Container that represents a focusable Drawable Widget that is Sensitive to event interactions.

func MakeButton

func MakeButton() Button

MakeButton is used by the Buildable system to construct a new Button with a default label that is empty.

func NewButton

func NewButton() Button

NewButton is a constructor for new Button instances without a label Widget.

func NewButtonFromStock

func NewButtonFromStock(stockId StockID) (value Button)

NewButtonFromStock creates a NewButtonWithLabel containing the text from a stock item. If stock_id is unknown, it will be treated as a mnemonic label (as for NewWithMnemonic).

Parameters:

stockId	the name of the stock item

func NewButtonWithLabel

func NewButtonWithLabel(text string) (b Button)

NewButtonWithLabel will construct a NewButton with a NewLabel, pre-configured for a centered placement within the new Button instance, taking care to avoid focus complications and default event handling.

Parameters:

label	the text of the button

func NewButtonWithMnemonic

func NewButtonWithMnemonic(text string) (b Button)

NewButtonWithMnemonic creates a NewButtonWithLabel. If the characters in the label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the button.

Parameters:

label	the text of the button

func NewButtonWithWidget

func NewButtonWithWidget(w Widget) Button

NewButtonWithWidget creates a NewButton with the given Widget as the Button's child.

type ButtonBox

type ButtonBox interface {
	Box
	Buildable
	Orientable

	GetLayout() (value enums.ButtonBoxStyle)
	SetLayout(layoutStyle enums.ButtonBoxStyle)
	GetChildPrimary(w Widget) (isPrimary bool)
	GetChildSecondary(w Widget) (isSecondary bool)
	SetChildSecondary(child Widget, isSecondary bool)
	SetChildPacking(child Widget, expand bool, fill bool, padding int, packType enums.PackType)
}

ButtonBox Hierarchy:

Object
  +- Widget
    +- Container
      +- Box
        +- ButtonBox
          +- HButtonBox
          +- VButtonBox

The ButtonBox Widget is a Box Container that has a primary and a secondary grouping of its Widget children. These are typically used by the Dialog Widget to implement the action buttons.

func MakeButtonBox

func MakeButtonBox() ButtonBox

MakeButtonBox is used by the Buildable system to construct a new horizontal homogeneous ButtonBox with no spacing between the Widget children.

func NewButtonBox

func NewButtonBox(orientation cenums.Orientation, homogeneous bool, spacing int) ButtonBox

NewButtonBox is a constructor for new Box instances.

type CAccelGroup

type CAccelGroup struct {
	CObject
	// contains filtered or unexported fields
}

The CAccelGroup structure implements the AccelGroup interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with AccelGroup objects.

func (*CAccelGroup) AccelConnect

func (a *CAccelGroup) AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags enums.AccelFlags, handle string, closure enums.GClosure) (id uuid.UUID)

AccelConnect installs an accelerator in this group. When accel_group is being activated in response to a call to AccelGroupsActivate, closure will be invoked if the accel_key and accel_mods from AccelGroupsActivate match those of this connection. The signature used for the closure is that of AccelGroupActivate. Note that, due to implementation details, a single closure can only be connected to one accelerator group.

Parameters:

accelKey	key value of the accelerator
accelMods	modifier combination of the accelerator
accelFlags	a flag mask to configure this accelerator
handle	string to tag the closure for later use
closure	code to be executed upon accelerator activation

func (*CAccelGroup) AccelDisconnect

func (a *CAccelGroup) AccelDisconnect(id uuid.UUID) (removed bool)

AccelDisconnect removes an accelerator previously installed through Connect.

Parameters:

accelGroup	the accelerator group to remove an accelerator from
closure	handle for the closure code to remove

func (*CAccelGroup) AccelGroupActivate

func (a *CAccelGroup) AccelGroupActivate(keyval cdk.Key, modifier cdk.ModMask) (activated bool)

AccelGroupActivate queries for entries matching the given keyval and modifier, then calling Closure functions for each entry found until one of them returns TRUE or the list of entries is exhausted, returning FALSE.

Parameters:

accelKey	key value of the accelerator
accelMods	modifier combination of the accelerator

func (*CAccelGroup) AcceleratorGetDefaultModMask

func (a *CAccelGroup) AcceleratorGetDefaultModMask() (value int)

AcceleratorGetDefaultModMask returns the value set by AcceleratorSetDefaultModMask.

Parameters:

returns	the default accelerator modifier mask

func (*CAccelGroup) AcceleratorGetLabel

func (a *CAccelGroup) AcceleratorGetLabel(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)

AcceleratorGetLable converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.

Parameters:

acceleratorKey	accelerator keyval
acceleratorMods	accelerator modifier mask

func (*CAccelGroup) AcceleratorName

func (a *CAccelGroup) AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)

AcceleratorName converts an accelerator keyval and modifier mask into a string parseable by AcceleratorParse. For example, if you pass in cdk.KeySmallQ and CONTROL_MASK, this function returns "<Control>q". If you need to display accelerators in the user interface, see AcceleratorGetLabel.

Parameters:

acceleratorKey	accelerator keyval
acceleratorMods	accelerator modifier mask

func (*CAccelGroup) AcceleratorParse

func (a *CAccelGroup) AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)

AcceleratorParse parses a string representing an accelerator. The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". Key names are parsed using KeyvalFromName. For character keys the name is not the symbol, but the lowercase name, e.g. one would use "<Ctrl>minus" instead of "<Ctrl>-". If the parse fails, accelerator_key and accelerator_mods will be set to 0 (zero).

Parameters:

accelerator	string representing an accelerator

func (*CAccelGroup) AcceleratorSetDefaultModMask

func (a *CAccelGroup) AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)

AcceleratorSetDefaultMask updates the modifiers that will be considered significant for keyboard accelerators. The default mod mask is CONTROL_MASK | SHIFT_MASK | MOD1_MASK | SUPER_MASK | HYPER_MASK | META_MASK, that is, Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default be ignored by AccelGroup. You must include at least the three modifiers Control, Shift and Alt in any value you pass to this function. The default mod mask should be changed on application startup, before using any accelerator groups.

Parameters:

defaultModMask	accelerator modifier mask

func (*CAccelGroup) AcceleratorValid

func (a *CAccelGroup) AcceleratorValid(keyval cdk.Key, modifiers cdk.ModMask) (valid bool)

AcceleratorValid determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.

Parameters:

keyval	a GDK keyval
modifiers	modifier mask

func (*CAccelGroup) Activate

func (a *CAccelGroup) Activate(accelKey cdk.Key, accelMods cdk.ModMask) (value bool)

Activate finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.

Parameters:

accelKey	accelerator keyval from a key event
accelMods	keyboard state mask from a key event

func (*CAccelGroup) ConnectByPath

func (a *CAccelGroup) ConnectByPath(accelPath string, handle string, closure enums.GClosure)

ConnectByPath installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see AccelMapAddEntry). When accel_group is being activated in response to a call to AccelGroupsActivate, closure will be invoked if the accel_key and accel_mods from AccelGroupsActivate match the key and modifiers for the path.

Parameters:

accelPath	path used for determining key and modifiers.
handle 	string to tag the closure for later use
closure	code to be executed upon accelerator activation

func (*CAccelGroup) DisconnectKey

func (a *CAccelGroup) DisconnectKey(accelKey cdk.Key, accelMods cdk.ModMask) (removed bool)

DisconnectKey removes an accelerator previously installed through Connect.

Parameters:

accelKey	key value of the accelerator
accelMods	modifier combination of the accelerator

func (*CAccelGroup) Find

func (a *CAccelGroup) Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)

Find finds the first entry in an accelerator group for which find_func returns TRUE and returns its AccelKey.

Parameters:

findFunc	a function to filter the entries of accel_group
data	arbitrary data to pass to find_func

func (*CAccelGroup) GetIsLocked

func (a *CAccelGroup) GetIsLocked() (locked bool)

GetIsLocked checks if the group is locked or not. Locks are added and removed using LockGroup and UnlockGroup.

func (*CAccelGroup) GetModifierMask

func (a *CAccelGroup) GetModifierMask() (value cdk.ModMask)

GetModifierMask returns a cdk.ModMask representing the mask for this accel_group. For example, CONTROL_MASK, SHIFT_MASK, etc.

func (*CAccelGroup) Init

func (a *CAccelGroup) Init() (already bool)

Init initializes an AccelGroup object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the AccelGroup instance. Init is used in the NewAccelGroup constructor and only necessary when implementing a derivative AccelGroup type.

func (*CAccelGroup) LockGroup added in v0.3.0

func (a *CAccelGroup) LockGroup()

LockGroup locks the given accelerator group. Locking an accelerator group prevents the accelerators contained within it to be changed during runtime. Refer o AccelMap.ChangeEntry() about runtime accelerator changes. If called more than once, accel_group remains locked until UnlockGroup has been called an equivalent number of times.

func (*CAccelGroup) Query

func (a *CAccelGroup) Query(accelKey cdk.Key, accelMods cdk.ModMask) (entries []*CAccelGroupEntry)

Query searches an accelerator group for all entries matching accel_key and accel_mods.

Parameters:

accelGroup	the accelerator group to query
accelKey	key value of the accelerator
accelMods	modifier combination of the accelerator

func (*CAccelGroup) UnlockGroup added in v0.3.0

func (a *CAccelGroup) UnlockGroup()

UnlockGroup releases the last call to LockGroup.

type CAccelGroupEntry added in v0.3.0

type CAccelGroupEntry struct {
	Handle   string
	Closure  enums.GClosure
	AccelKey AccelKey
}

func NewCAccelGroupEntry added in v0.3.2

func NewCAccelGroupEntry(accelerator AccelKey, handle string, closure enums.GClosure) (age *CAccelGroupEntry)

func (*CAccelGroupEntry) Match added in v0.3.0

func (a *CAccelGroupEntry) Match(key cdk.Key, modifier cdk.ModMask) (match bool)

type CAccelGroups added in v0.3.0

type CAccelGroups struct {
	CObject
}

func (*CAccelGroups) Activate added in v0.3.0

func (a *CAccelGroups) Activate(object Object, accelKey cdk.Key, accelMods cdk.ModMask) (value bool)

func (*CAccelGroups) AddAccelGroup added in v0.3.0

func (a *CAccelGroups) AddAccelGroup(object Object, accelGroup AccelGroup)

func (*CAccelGroups) FromObject added in v0.3.0

func (a *CAccelGroups) FromObject(object Object) (groups []AccelGroup)

func (*CAccelGroups) RemoveAccelGroup added in v0.3.0

func (a *CAccelGroups) RemoveAccelGroup(object Object, accelGroup AccelGroup)

type CAccelKey added in v0.3.0

type CAccelKey struct {
	Key   cdk.Key
	Mods  cdk.ModMask
	Flags enums.AccelFlags
}

func (*CAccelKey) GetFlags added in v0.3.0

func (a *CAccelKey) GetFlags() enums.AccelFlags

func (*CAccelKey) GetKey added in v0.3.0

func (a *CAccelKey) GetKey() cdk.Key

func (*CAccelKey) GetMods added in v0.3.0

func (a *CAccelKey) GetMods() cdk.ModMask

func (*CAccelKey) Match added in v0.3.0

func (a *CAccelKey) Match(key cdk.Key, mods cdk.ModMask) (match bool)

func (*CAccelKey) String added in v0.3.0

func (a *CAccelKey) String() (key string)

type CAccelMap added in v0.3.0

type CAccelMap struct {
	CObject
	// contains filtered or unexported fields
}

The CAccelMap structure implements the AccelMap interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with AccelMap objects.

func (*CAccelMap) AddEntry added in v0.3.0

func (a *CAccelMap) AddEntry(accelPath string, accelKey cdk.Key, accelMods cdk.ModMask)

AddEntry registers a new accelerator with the global accelerator map. This method should only be called once per accel_path with the canonical accel_key and accel_mods for this path. To change the accelerator during runtime programmatically, use AccelMap.ChangeEntry(). The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action", where <WINDOWTYPE> should be a unique application-specific identifier, that corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion is most appropriately chosen by the action the accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator path may look like: "<Gimp-Toolbox>/File/Dialogs/Tool Options...".

Parameters

accel_path	valid accelerator path
accel_key	the accelerator key
accel_mods	the accelerator modifiers

func (*CAccelMap) ChangeEntry added in v0.3.0

func (a *CAccelMap) ChangeEntry(accelPath string, accelKey cdk.Key, accelMods cdk.ModMask, replace bool) (ok bool)

ChangeEntry updates the accel_key and accel_mods currently associated with accel_path. Due to conflicts with other accelerators, a change may not always be possible, replace indicates whether other accelerators may be deleted to resolve such conflicts. A change will only occur if all conflicts could be resolved (which might not be the case if conflicting accelerators are locked). Successful changes are indicated by a TRUE return value.

Parameters

accel_path	a valid accelerator path
accel_key	the new accelerator key
accel_mods	the new accelerator modifiers
replace	TRUE if other accelerators may be deleted upon conflicts

func (*CAccelMap) Init added in v0.3.0

func (a *CAccelMap) Init() (already bool)

Init initializes an AccelMap object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the AccelMap instance. Init is used in the NewAccelMap constructor and only necessary when implementing a derivative AccelMap type.

func (*CAccelMap) Load added in v0.3.0

func (a *CAccelMap) Load(fileName string)

Load parses a file previously saved with AccelMap.Save() for accelerator specifications, and propagates them accordingly.

Parameters

file_name	a file containing accelerator specifications

func (*CAccelMap) LoadFromString added in v0.3.0

func (a *CAccelMap) LoadFromString(accelMap string)

func (*CAccelMap) LockPath added in v0.3.0

func (a *CAccelMap) LockPath(accelPath string)

LockPath locks the given accelerator path. If the accelerator map doesn't yet contain an entry for accel_path, a new one is created.

Locking an accelerator path prevents its accelerator from being changed during runtime. A locked accelerator path can be unlocked by AccelMap.UnlockPath(). Refer to AccelMap.ChangeEntry() for information about runtime accelerator changes.

If called more than once, accel_path remains locked until AccelMap.UnlockPath() has been called an equivalent number of times.

Note that locking of individual accelerator paths is independent of locking the AccelGroup containing them. For runtime accelerator changes to be possible both the accelerator path and its AccelGroup have to be unlocked.

Parameters

accel_path	a valid accelerator path

func (*CAccelMap) LookupEntry added in v0.3.0

func (a *CAccelMap) LookupEntry(accelPath string) (accelerator Accelerator, ok bool)

LookupEntry returns the accelerator entry for accel_path.

Parameters

accel_path	a valid accelerator path

func (*CAccelMap) Save added in v0.3.0

func (a *CAccelMap) Save(fileName string)

Save stores the current accelerator specifications (accelerator path, key and modifiers) to file_name. The file is written in a format suitable to be read back in by AccelMap.Load().

Parameters

file_name	the name of the file to contain accelerator specifications

func (*CAccelMap) SaveToString added in v0.3.0

func (a *CAccelMap) SaveToString() (accelMap string)

func (*CAccelMap) UnlockPath added in v0.3.0

func (a *CAccelMap) UnlockPath(accelPath string)

UnlockPath undoes the last call to AccelMap.LockPath() on this accel_path. Refer to AccelMap.LockPath() for information about accelerator path locking.

Parameters

accel_path	a valid accelerator path

type CAccelerator added in v0.3.0

type CAccelerator struct {
	CObject
	// contains filtered or unexported fields
}

func (*CAccelerator) Configure added in v0.3.0

func (a *CAccelerator) Configure(key cdk.Key, mods cdk.ModMask)

func (*CAccelerator) Init added in v0.3.0

func (a *CAccelerator) Init() (already bool)

func (*CAccelerator) IsLocked added in v0.3.0

func (a *CAccelerator) IsLocked() (locked bool)

func (*CAccelerator) Key added in v0.3.0

func (a *CAccelerator) Key() (key cdk.Key)

func (*CAccelerator) LockAccel added in v0.3.0

func (a *CAccelerator) LockAccel()

func (*CAccelerator) Match added in v0.3.0

func (a *CAccelerator) Match(key cdk.Key, mods cdk.ModMask) (match bool)

func (*CAccelerator) Mods added in v0.3.0

func (a *CAccelerator) Mods() (mods cdk.ModMask)

func (*CAccelerator) Path added in v0.3.0

func (a *CAccelerator) Path() (path string)

func (*CAccelerator) Settings added in v0.3.0

func (a *CAccelerator) Settings() (path string, key cdk.Key, mods cdk.ModMask)

func (*CAccelerator) UnlockAccel added in v0.3.0

func (a *CAccelerator) UnlockAccel()

func (*CAccelerator) UnsetKeyMods added in v0.3.0

func (a *CAccelerator) UnsetKeyMods()

type CAction added in v0.3.0

type CAction struct {
	CObject
}

The CAction structure implements the Action interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Action objects

func (*CAction) Activate added in v0.3.0

func (a *CAction) Activate()

Emits the "activate" signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated. It can also be used to manually activate an action. Parameters:

action	the action object

func (*CAction) ConnectAccelerator added in v0.3.0

func (a *CAction) ConnectAccelerator()

Installs the accelerator for action if action has an accel path and group. See SetAccelPath and SetAccelGroup Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn't remove the accelerator until DisconnectAccelerator has been called as many times.

func (*CAction) CreateMenu added in v0.3.0

func (a *CAction) CreateMenu() (value Widget)

If action provides a Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu. Returns:

the menu item provided by the action, or NULL.
[transfer none]

func (*CAction) CreateMenuItem added in v0.3.0

func (a *CAction) CreateMenuItem() (value Widget)

Creates a menu item widget that proxies for the given action. Parameters:

action	the action object

Returns:

a menu item connected to the action.
[transfer none]

func (*CAction) CreateToolItem added in v0.3.0

func (a *CAction) CreateToolItem() (value Widget)

Creates a toolbar item widget that proxies for the given action. Parameters:

action	the action object

Returns:

a toolbar item connected to the action.
[transfer none]

func (*CAction) DisconnectAccelerator added in v0.3.0

func (a *CAction) DisconnectAccelerator()

Undoes the effect of one call to ConnectAccelerator.

func (*CAction) GetAccelClosure added in v0.3.0

func (a *CAction) GetAccelClosure() (value enums.GClosure)

Returns the accel closure for this action. Parameters:

action	the action object

Returns:

the accel closure for this action.

func (*CAction) GetAccelPath added in v0.3.0

func (a *CAction) GetAccelPath() (value string)

Returns the accel path for this action. Parameters:

action	the action object

Returns:

the accel path for this action, or NULL if none is set. The
returned string is owned by CTK and must not be freed or
modified.

func (*CAction) GetAlwaysShowImage added in v0.3.0

func (a *CAction) GetAlwaysShowImage() (value bool)

Returns whether action 's menu item proxies will ignore the “gtk-menu-images” setting and always show their image, if available. Returns:

TRUE if the menu item proxies will always show their image

func (*CAction) GetIcon added in v0.3.0

func (a *CAction) GetIcon() (value rune)

GetIcon returns the icon rune of the action.

func (*CAction) GetIconName added in v0.3.0

func (a *CAction) GetIconName() (value string)

GetIconName returns the icon name of the action.

func (*CAction) GetIsImportant added in v0.3.0

func (a *CAction) GetIsImportant() (value bool)

GetIsImportant returns whether action is important or not.

func (*CAction) GetLabel added in v0.3.0

func (a *CAction) GetLabel() (value string)

Gets the label text of action . Returns:

the label text

func (*CAction) GetName added in v0.3.0

func (a *CAction) GetName() (value string)

Returns the name of the action. Parameters:

action	the action object

Returns:

the name of the action. The string belongs to CTK and should
not be freed.

func (*CAction) GetProxies added in v0.3.0

func (a *CAction) GetProxies() (value []interface{})

Returns the proxy widgets for an action. See also WidgetGetAction. Parameters:

action	the action object

Returns:

a GSList of proxy widgets. The list is owned by CTK and must
not be modified.
[element-type Widget][transfer none]

func (*CAction) GetSensitive added in v0.3.0

func (a *CAction) GetSensitive() (value bool)

Returns whether the action itself is sensitive. Note that this doesn't necessarily mean effective sensitivity. See IsSensitive for that. Parameters:

action	the action object

Returns:

TRUE if the action itself is sensitive.

func (*CAction) GetShortLabel added in v0.3.0

func (a *CAction) GetShortLabel() (value string)

Gets the short label text of action . Returns:

the short label text.

func (*CAction) GetStockId added in v0.3.0

func (a *CAction) GetStockId() (value StockID)

GetStockId returns the stock id of the action.

func (*CAction) GetTooltip added in v0.3.0

func (a *CAction) GetTooltip() (value string)

Gets the tooltip text of action . Returns:

the tooltip text

func (*CAction) GetVisible added in v0.3.0

func (a *CAction) GetVisible() (value bool)

Returns whether the action itself is visible. Note that this doesn't necessarily mean effective visibility. See IsSensitive for that. Parameters:

action	the action object

Returns:

TRUE if the action itself is visible.

func (*CAction) GetVisibleHorizontal added in v0.3.0

func (a *CAction) GetVisibleHorizontal() (value bool)

GetVisibleHorizontal checks whether the action is visible when horizontal.

func (*CAction) GetVisibleVertical added in v0.3.0

func (a *CAction) GetVisibleVertical() (value bool)

GetVisibleVertical checks whether the action is visible when vertical.

func (*CAction) Init added in v0.3.0

func (a *CAction) Init() (already bool)

Action object initialization. This must be called at least once to setup the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Action instance

func (*CAction) IsSensitive added in v0.3.0

func (a *CAction) IsSensitive() (value bool)

Returns whether the action is effectively sensitive. Parameters:

action	the action object

Returns:

TRUE if the action and its associated action group are both
sensitive.

func (*CAction) IsVisible added in v0.3.0

func (a *CAction) IsVisible() (value bool)

Returns whether the action is effectively visible. Parameters:

action	the action object

Returns:

TRUE if the action and its associated action group are both
visible.

func (*CAction) SetAccelGroup added in v0.3.0

func (a *CAction) SetAccelGroup(accelGroup AccelGroup)

Sets the AccelGroup in which the accelerator for this action will be installed. Parameters:

action	the action object
accelGroup	a AccelGroup or NULL.

func (*CAction) SetAccelPath added in v0.3.0

func (a *CAction) SetAccelPath(accelPath string)

Sets the accel path for this action. All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent. Parameters:

action	the action object
accelPath	the accelerator path

func (*CAction) SetAlwaysShowImage added in v0.3.0

func (a *CAction) SetAlwaysShowImage(alwaysShow bool)

Sets whether action 's menu item proxies will ignore the “gtk-menu-images” setting and always show their image, if available. Use this if the menu item would be useless or hard to use without their image. Parameters:

alwaysShow	TRUE if menuitem proxies should always show their image

func (*CAction) SetIcon added in v0.3.0

func (a *CAction) SetIcon(icon rune)

SetIcon updates the icon rune of the action.

Parameters:

icon	the rune to set

func (*CAction) SetIconName added in v0.3.0

func (a *CAction) SetIconName(iconName string)

SetIconName updates the icon name on the action.

Parameters:

iconName	the icon name to set

func (*CAction) SetIsImportant added in v0.3.0

func (a *CAction) SetIsImportant(isImportant bool)

SetIsImportant updates whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.

Parameters:

isImportant	TRUE to make the action important

func (*CAction) SetLabel added in v0.3.0

func (a *CAction) SetLabel(label string)

Sets the label of action . Parameters:

label	the label text to set

func (*CAction) SetSensitive added in v0.3.0

func (a *CAction) SetSensitive(sensitive bool)

Sets the ::sensitive property of the action to sensitive . Note that this doesn't necessarily mean effective sensitivity. See IsSensitive for that. Parameters:

action	the action object
sensitive	TRUE to make the action sensitive

func (*CAction) SetShortLabel added in v0.3.0

func (a *CAction) SetShortLabel(shortLabel string)

Sets a shorter label text on action . Parameters:

shortLabel	the label text to set

func (*CAction) SetStockId added in v0.3.0

func (a *CAction) SetStockId(stockId StockID)

SetStockId updates the stock id on the action.

Parameters:

stockId	the stock id

func (*CAction) SetTooltip added in v0.3.0

func (a *CAction) SetTooltip(tooltip string)

Sets the tooltip text on action Parameters:

tooltip	the tooltip text

func (*CAction) SetVisible added in v0.3.0

func (a *CAction) SetVisible(visible bool)

Sets the ::visible property of the action to visible . Note that this doesn't necessarily mean effective visibility. See IsVisible for that. Parameters:

action	the action object
visible	TRUE to make the action visible

func (*CAction) SetVisibleHorizontal added in v0.3.0

func (a *CAction) SetVisibleHorizontal(visibleHorizontal bool)

SetVisibleHorizontal updates whether action is visible when horizontal.

Parameters:

visibleHorizontal	whether the action is visible horizontally

func (*CAction) SetVisibleVertical added in v0.3.0

func (a *CAction) SetVisibleVertical(visibleVertical bool)

SetVisibleVertical updates whether action is visible when vertical.

Parameters:

visibleVertical	whether the action is visible vertically

func (*CAction) UnblockActivate added in v0.3.0

func (a *CAction) UnblockActivate()

Reenable activation signals from the action

type CActionGroup added in v0.3.0

type CActionGroup struct {
	CObject
}

The CActionGroup structure implements the ActionGroup interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with ActionGroup objects.

func (*CActionGroup) AddAction added in v0.3.0

func (a *CActionGroup) AddAction(action Action)

Adds an action object to the action group. Note that this function does not set up the accel path of the action, which can lead to problems if a user tries to modify the accelerator of a menuitem associated with the action. Therefore you must either set the accel path yourself with ActionSetAccelPath, or use AddActionWithAccel (..., NULL). Parameters:

actionGroup	the action group
action	an action

func (*CActionGroup) AddActionWithAccel added in v0.3.0

func (a *CActionGroup) AddActionWithAccel(action Action, accelerator string)

Adds an action object to the action group and sets up the accelerator. If accelerator is NULL, attempts to use the accelerator associated with the stock_id of the action. Accel paths are set to <Actions>/group-name/action-name. Parameters:

actionGroup	the action group
action	the action to add
accelerator	the accelerator for the action, in

the format understood by AcceleratorParse, or "" for no accelerator, or NULL to use the stock accelerator.

func (*CActionGroup) AddActions added in v0.3.0

func (a *CActionGroup) AddActions(entries []ActionEntry, nEntries int, userData interface{})

This is a convenience function to create a number of actions and add them to the action group. The "activate" signals of the actions are connected to the callbacks and their accel paths are set to <Actions>/group-name/action-name. Parameters:

actionGroup	the action group
entries	an array of action descriptions
nEntries	the number of entries
userData	data to pass to the action callbacks

func (*CActionGroup) AddActionsFull added in v0.3.0

func (a *CActionGroup) AddActionsFull(entries []ActionEntry, nEntries int, userData interface{}, destroy GDestroyNotify)

This variant of AddActions adds a GDestroyNotify callback for user_data . Parameters:

actionGroup	the action group
entries	an array of action descriptions
nEntries	the number of entries
userData	data to pass to the action callbacks
destroy	destroy notification callback for user_data

func (*CActionGroup) AddRadioActions added in v0.3.0

func (a *CActionGroup) AddRadioActions(entries []RadioActionEntry, nEntries int, value int, onChange enums.GCallback, userData interface{})

This is a convenience routine to create a group of radio actions and add them to the action group. The "changed" signal of the first radio action is connected to the on_change callback and the accel paths of the actions are set to <Actions>/group-name/action-name. Parameters:

actionGroup	the action group
entries	an array of radio action descriptions
nEntries	the number of entries
value	the value of the action to activate initially, or -1 if

no action should be activated

onChange	the callback to connect to the changed signal
userData	data to pass to the action callbacks

func (*CActionGroup) AddRadioActionsFull added in v0.3.0

func (a *CActionGroup) AddRadioActionsFull(entries []RadioActionEntry, nEntries int, value int, onChange enums.GCallback, userData interface{}, destroy GDestroyNotify)

This variant of AddRadioActions adds a GDestroyNotify callback for user_data . Parameters:

actionGroup	the action group
entries	an array of radio action descriptions
nEntries	the number of entries
value	the value of the action to activate initially, or -1 if

no action should be activated

onChange	the callback to connect to the changed signal
userData	data to pass to the action callbacks
destroy	destroy notification callback for user_data

func (*CActionGroup) AddToggleActions added in v0.3.0

func (a *CActionGroup) AddToggleActions(entries []ToggleActionEntry, nEntries int, userData interface{})

This is a convenience function to create a number of toggle actions and add them to the action group. The "activate" signals of the actions are connected to the callbacks and their accel paths are set to <Actions>/group-name/action-name. Parameters:

actionGroup	the action group
entries	an array of toggle action descriptions
nEntries	the number of entries
userData	data to pass to the action callbacks

func (*CActionGroup) AddToggleActionsFull added in v0.3.0

func (a *CActionGroup) AddToggleActionsFull(entries []ToggleActionEntry, nEntries int, userData interface{}, destroy GDestroyNotify)

This variant of AddToggleActions adds a GDestroyNotify callback for user_data . Parameters:

actionGroup	the action group
entries	an array of toggle action descriptions
nEntries	the number of entries
userData	data to pass to the action callbacks
destroy	destroy notification callback for user_data

func (*CActionGroup) GetAction added in v0.3.0

func (a *CActionGroup) GetAction(actionName string) (value Action)

Looks up an action in the action group by name. Parameters:

actionGroup	the action group
actionName	the name of the action

Returns:

the action, or NULL if no action by that name exists.
[transfer none]

func (*CActionGroup) GetName added in v0.3.0

func (a *CActionGroup) GetName() (value string)

Gets the name of the action group. Parameters:

actionGroup	the action group

Returns:

the name of the action group.

func (*CActionGroup) GetSensitive added in v0.3.0

func (a *CActionGroup) GetSensitive() (value bool)

Returns TRUE if the group is sensitive. The constituent actions can only be logically sensitive (see ActionIsSensitive) if they are sensitive (see ActionGetSensitive) and their group is sensitive. Parameters:

actionGroup	the action group

Returns:

TRUE if the group is sensitive.

func (*CActionGroup) GetVisible added in v0.3.0

func (a *CActionGroup) GetVisible() (value bool)

Returns TRUE if the group is visible. The constituent actions can only be logically visible (see ActionIsVisible) if they are visible (see ActionGetVisible) and their group is visible. Parameters:

actionGroup	the action group

Returns:

TRUE if the group is visible.

func (*CActionGroup) Init added in v0.3.0

func (a *CActionGroup) Init() (already bool)

Init initializes an ActionGroup object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the ActionGroup instance. Init is used in the NewActionGroup constructor and only necessary when implementing a derivative ActionGroup type.

func (*CActionGroup) ListActions added in v0.3.0

func (a *CActionGroup) ListActions() (value []Action)

Lists the actions in the action group. Parameters:

actionGroup	the action group

Returns:

an allocated list of the action objects in the action group.
[element-type Action][transfer container]

func (*CActionGroup) RemoveAction added in v0.3.0

func (a *CActionGroup) RemoveAction(action Action)

Removes an action object from the action group. Parameters:

actionGroup	the action group
action	an action

func (*CActionGroup) SetSensitive added in v0.3.0

func (a *CActionGroup) SetSensitive(sensitive bool)

Changes the sensitivity of action_group Parameters:

actionGroup	the action group
sensitive	new sensitivity

func (*CActionGroup) SetTranslateFunc added in v0.3.0

func (a *CActionGroup) SetTranslateFunc(fn TranslateFunc, data interface{}, notify GDestroyNotify)

Sets a function to be used for translating the label and tooltip of ActionGroupEntrys added by AddActions. If you're using gettext, it is enough to set the translation domain with SetTranslationDomain. Parameters:

func	a TranslateFunc
data	data to be passed to func

and notify

notify	a GDestroyNotify function to be called when action_group

is destroyed and when the translation function is changed again

func (*CActionGroup) SetTranslationDomain added in v0.3.0

func (a *CActionGroup) SetTranslationDomain(domain string)

Sets the translation domain and uses g_dgettext for translating the label and tooltip of ActionEntrys added by AddActions. If you're not using gettext for localization, see SetTranslateFunc. Parameters:

domain	the translation domain to use for g_dgettext calls

func (*CActionGroup) SetVisible added in v0.3.0

func (a *CActionGroup) SetVisible(visible bool)

Changes the visible of action_group . Parameters:

actionGroup	the action group
visible	new visiblity

func (*CActionGroup) TranslateString added in v0.3.0

func (a *CActionGroup) TranslateString(string string) (value string)

Translates a string using the specified translate_func. This is mainly intended for language bindings. Parameters:

string	a string

Returns:

the translation of string

type CAdjustment

type CAdjustment struct {
	CObject
}

The CAdjustment structure implements the Adjustment interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Adjustment objects.

func (*CAdjustment) Changed

func (a *CAdjustment) Changed() cenums.EventFlag

Changed emits a changed signal. The changed signal reflects that one or more of the configurable aspects have changed, excluding the actual value of the Adjustment. See: ValueChanged()

func (*CAdjustment) ClampPage

func (a *CAdjustment) ClampPage(upper, lower int)

ClampPage is a convenience method to set both the upper and lower bounds without emitting multiple changed signals. This method emits a clamp-page signal initially and if the listeners return an EVENT_PASS then the new upper and lower bounds are applied and a call to Changed() is made.

Locking: write