File: check_menu_item.go

package info (click to toggle)
golang-github-twstrike-gotk3adapter 0.0~git20170505.0.901a95d%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,232 kB
  • sloc: ruby: 478; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package gtka

import (
	"github.com/gotk3/gotk3/gtk"
	"github.com/twstrike/gotk3adapter/gtki"
)

type checkMenuItem struct {
	*menuItem
	internal *gtk.CheckMenuItem
}

func wrapCheckMenuItemSimple(v *gtk.CheckMenuItem) *checkMenuItem {
	if v == nil {
		return nil
	}
	return &checkMenuItem{wrapMenuItemSimple(&v.MenuItem), v}
}

func wrapCheckMenuItem(v *gtk.CheckMenuItem, e error) (*checkMenuItem, error) {
	return wrapCheckMenuItemSimple(v), e
}

func unwrapCheckMenuItem(v gtki.CheckMenuItem) *gtk.CheckMenuItem {
	if v == nil {
		return nil
	}
	return v.(*checkMenuItem).internal
}

func (v *checkMenuItem) GetActive() bool {
	return v.internal.GetActive()
}

func (v *checkMenuItem) SetActive(v1 bool) {
	v.internal.SetActive(v1)
}