Lines Matching full:tk

3 This module provides classes to allow using Tk themed widget set.
6 TIP #48 (http://tip.tcl.tk/48) specified style engine.
35 # if caller passes a Tcl script to tk.call, all the values need to
43 """Formats optdict to a tuple to pass it to tk.call.
80 """Formats mapdict to pass it to tk.call.
113 # Availability: Tk 8.6, Windows XP and Vista.
244 def _list_from_layouttuple(tk, ltuple): argument
247 ltuple = tk.splitlist(ltuple)
266 val = _list_from_layouttuple(tk, val)
272 def _val_or_dict(tk, options, *args): argument
273 """Format options then call Tk command with args and options and return
281 res = tk.call(*(args + options))
286 return _splitdict(tk, res, conv=_tclobj_to_py)
347 self.tk = self.master.tk
358 result = _val_or_dict(self.tk, kw, self._name, "configure", style)
372 result = self.tk.call(self._name, "map", style, '-%s' % query_opt)
373 return _list_from_statespec(self.tk.splitlist(result))
375 result = self.tk.call(self._name, "map", style, *_format_mapdict(kw))
376 return {k: _list_from_statespec(self.tk.splitlist(v))
377 for k, v in _splitdict(self.tk, result).items()}
388 return self.tk.call(self._name, "lookup", style, '-%s' % option,
431 return _list_from_layouttuple(self.tk,
432 self.tk.call(self._name, "layout", style, lspec))
438 self.tk.call(self._name, "element", "create", elementname, etype,
444 return tuple(n.lstrip('-') for n in self.tk.splitlist(
445 self.tk.call(self._name, "element", "names")))
450 return tuple(o.lstrip('-') for o in self.tk.splitlist(
451 self.tk.call(self._name, "element", "options", elementname)))
464 self.tk.call(self._name, "theme", "create", themename,
467 self.tk.call(self._name, "theme", "create", themename,
480 self.tk.call(self._name, "theme", "settings", themename, script)
485 return self.tk.splitlist(self.tk.call(self._name, "theme", "names"))
493 # Starting on Tk 8.6, checking this global is no longer needed
494 # since it allows doing self.tk.call(self._name, "theme", "use")
495 return self.tk.eval("return $ttk::currentTheme")
500 self.tk.call("ttk::setTheme", themename)
504 """Base class for Tk themed widgets."""
535 return self.tk.call(self._w, "identify", x, y)
545 ret = self.tk.getboolean(
546 self.tk.call(self._w, "instate", ' '.join(statespec)))
563 return self.tk.splitlist(str(self.tk.call(self._w, "state", statespec)))
587 return self.tk.call(self._w, "invoke")
616 return self.tk.call(self._w, "invoke")
645 return self._getints(self.tk.call(self._w, "bbox", index))
651 return self.tk.call(self._w, "identify", x, y)
658 return self.tk.getboolean(self.tk.call(self._w, "validate"))
686 return self.tk.getint(self.tk.call(self._w, "current"))
687 return self.tk.call(self._w, "current", newindex)
692 self.tk.call(self._w, "set", value)
814 self.tk.call(self._w, "add", child, *(_format_optdict(kw)))
820 self.tk.call(self._w, "forget", tab_id)
829 self.tk.call(self._w, "hide", tab_id)
835 return self.tk.call(self._w, "identify", x, y)
841 return self.tk.getint(self.tk.call(self._w, "index", tab_id))
850 self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
860 return self.tk.call(self._w, "select", tab_id)
871 return _val_or_dict(self.tk, kw, self._w, "tab", tab_id)
876 return self.tk.splitlist(self.tk.call(self._w, "tabs") or ())
902 self.tk.call("ttk::notebook::enableTraversal", self._w)
936 self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
948 return _val_or_dict(self.tk, kw, self._w, "pane", pane)
959 return self.tk.getint(self.tk.call(self._w, "sashpos", index, newpos))
990 self.tk.call(self._w, "start", interval)
997 self.tk.call(self._w, "step", amount)
1003 self.tk.call(self._w, "stop")
1031 return self.tk.call(self._w, "invoke")
1071 return self.tk.call(self._w, 'get', x, y)
1147 self.tk.call(self._w, "set", value)
1187 return self._getints(self.tk.call(self._w, "bbox", item, column)) or ''
1194 return self.tk.splitlist(
1195 self.tk.call(self._w, "children", item or '') or ())
1204 self.tk.call(self._w, "children", item, newchildren)
1215 return _val_or_dict(self.tk, kw, self._w, "column", column)
1221 self.tk.call(self._w, "delete", items)
1230 self.tk.call(self._w, "detach", items)
1236 return self.tk.getboolean(self.tk.call(self._w, "exists", item))
1242 return self.tk.call(self._w, "focus", item)
1260 the standard Tk anchor values
1274 return _val_or_dict(self.tk, kw, self._w, 'heading', column)
1281 return self.tk.call(self._w, "identify", component, x, y)
1304 * Availability: Tk 8.6"""
1311 * Availability: Tk 8.6"""
1318 return self.tk.getint(self.tk.call(self._w, "index", item))
1336 res = self.tk.call(self._w, "insert", parent, index,
1339 res = self.tk.call(self._w, "insert", parent, index, *opts)
1353 return _val_or_dict(self.tk, kw, self._w, "item", item)
1363 self.tk.call(self._w, "move", item, parent, index)
1371 return self.tk.call(self._w, "next", item)
1377 return self.tk.call(self._w, "parent", item)
1383 return self.tk.call(self._w, "prev", item)
1392 self.tk.call(self._w, "see", item)
1397 return self.tk.splitlist(self.tk.call(self._w, "selection"))
1404 self.tk.call(self._w, "selection", selop, items)
1434 res = self.tk.call(self._w, "set", item, column, value)
1436 return _splitdict(self.tk, res,
1458 return _val_or_dict(self.tk, kw, self._w, "tag", "configure",
1467 * Availability: Tk 8.6"""
1469 return self.tk.splitlist(
1470 self.tk.call(self._w, "tag", "has", tagname))
1472 return self.tk.getboolean(
1473 self.tk.call(self._w, "tag", "has", tagname, item))