widget_meta.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. // Copyright 2018 visualfc. All rights reserved.
  2. package tk
  3. var (
  4. typeMetaMap = make(map[WidgetType]*MetaType)
  5. )
  6. type MetaClass struct {
  7. Command string
  8. Class string
  9. Attributes []string
  10. }
  11. func (m *MetaClass) HasAttribute(attr string) bool {
  12. if attr == "" {
  13. return false
  14. }
  15. for _, v := range m.Attributes {
  16. if v == attr {
  17. return true
  18. }
  19. }
  20. return false
  21. }
  22. type MetaType struct {
  23. Type string
  24. Tk *MetaClass
  25. Ttk *MetaClass
  26. }
  27. func IsTtkClass(class string) bool {
  28. for _, v := range ttkClassList {
  29. if v == class {
  30. return true
  31. }
  32. }
  33. return false
  34. }
  35. func IsTkClass(class string) bool {
  36. for _, v := range tkClassList {
  37. if v == class {
  38. return true
  39. }
  40. }
  41. return false
  42. }
  43. var (
  44. tkClassList = []string{
  45. "Button",
  46. "Canvas",
  47. "Checkbutton",
  48. "Entry",
  49. "Frame",
  50. "Label",
  51. "Labelframe",
  52. "Listbox",
  53. "Menu",
  54. "Menubutton",
  55. "Panedwindow",
  56. "Radiobutton",
  57. "Scale",
  58. "Scrollbar",
  59. "Spinbox",
  60. "Text",
  61. "Toplevel",
  62. }
  63. ttkClassList = []string{
  64. "TButton",
  65. "TCheckbutton",
  66. "TCombobox",
  67. "TEntry",
  68. "TFrame",
  69. "TLabel",
  70. "TLabelframe",
  71. "TMenubutton",
  72. "TNotebook",
  73. "TPanedwindow",
  74. "TProgressbar",
  75. "TRadiobutton",
  76. "TScale",
  77. "Scrollbar",
  78. "TSeparator",
  79. "TSizegrip",
  80. "Treeview",
  81. }
  82. )
  83. func init() {
  84. typeMetaMap[WidgetTypeButton] =
  85. &MetaType{
  86. Type: "Button",
  87. Tk: &MetaClass{"tk::button", "Button",
  88. []string{"activebackground",
  89. "activeforeground",
  90. "anchor",
  91. "background",
  92. "bitmap",
  93. "borderwidth",
  94. "command",
  95. "compound",
  96. "cursor",
  97. "default",
  98. "disabledforeground",
  99. "font",
  100. "foreground",
  101. "height",
  102. "highlightbackground",
  103. "highlightcolor",
  104. "highlightthickness",
  105. "image",
  106. "justify",
  107. "overrelief",
  108. "padx",
  109. "pady",
  110. "relief",
  111. "repeatdelay",
  112. "repeatinterval",
  113. "state",
  114. "takefocus",
  115. "text",
  116. "textvariable",
  117. "underline",
  118. "width",
  119. "wraplength"}},
  120. Ttk: &MetaClass{"ttk::button", "TButton",
  121. []string{"command",
  122. "default",
  123. "takefocus",
  124. "text",
  125. "textvariable",
  126. "underline",
  127. "width",
  128. "image",
  129. "compound",
  130. "padding",
  131. "state",
  132. "cursor",
  133. "style",
  134. "class"}},
  135. }
  136. typeMetaMap[WidgetTypeCanvas] =
  137. &MetaType{
  138. Type: "Canvas",
  139. Tk: &MetaClass{"tk::canvas", "Canvas",
  140. []string{"background",
  141. "borderwidth",
  142. "closeenough",
  143. "confine",
  144. "cursor",
  145. "height",
  146. "highlightbackground",
  147. "highlightcolor",
  148. "highlightthickness",
  149. "insertbackground",
  150. "insertborderwidth",
  151. "insertofftime",
  152. "insertontime",
  153. "insertwidth",
  154. "offset",
  155. "relief",
  156. "scrollregion",
  157. "selectbackground",
  158. "selectborderwidth",
  159. "selectforeground",
  160. "state",
  161. "takefocus",
  162. "width",
  163. "xscrollcommand",
  164. "xscrollincrement",
  165. "yscrollcommand",
  166. "yscrollincrement"}},
  167. Ttk: nil,
  168. }
  169. typeMetaMap[WidgetTypeCheckButton] =
  170. &MetaType{
  171. Type: "CheckButton",
  172. Tk: &MetaClass{"tk::checkbutton", "Checkbutton",
  173. []string{"activebackground",
  174. "activeforeground",
  175. "anchor",
  176. "background",
  177. "bitmap",
  178. "borderwidth",
  179. "command",
  180. "compound",
  181. "cursor",
  182. "disabledforeground",
  183. "font",
  184. "foreground",
  185. "height",
  186. "highlightbackground",
  187. "highlightcolor",
  188. "highlightthickness",
  189. "image",
  190. "indicatoron",
  191. "justify",
  192. "offrelief",
  193. "offvalue",
  194. "onvalue",
  195. "overrelief",
  196. "padx",
  197. "pady",
  198. "relief",
  199. "selectcolor",
  200. "selectimage",
  201. "state",
  202. "takefocus",
  203. "text",
  204. "textvariable",
  205. "tristateimage",
  206. "tristatevalue",
  207. "underline",
  208. "variable",
  209. "width",
  210. "wraplength"}},
  211. Ttk: &MetaClass{"ttk::checkbutton", "TCheckbutton",
  212. []string{"variable",
  213. "onvalue",
  214. "offvalue",
  215. "command",
  216. "takefocus",
  217. "text",
  218. "textvariable",
  219. "underline",
  220. "width",
  221. "image",
  222. "compound",
  223. "padding",
  224. "state",
  225. "cursor",
  226. "style",
  227. "class"}},
  228. }
  229. typeMetaMap[WidgetTypeComboBox] =
  230. &MetaType{
  231. Type: "ComboBox",
  232. Tk: nil,
  233. Ttk: &MetaClass{"ttk::combobox", "TCombobox",
  234. []string{"height",
  235. "postcommand",
  236. "values",
  237. "exportselection",
  238. "font",
  239. "invalidcommand",
  240. "justify",
  241. "show",
  242. "state",
  243. "textvariable",
  244. "validate",
  245. "validatecommand",
  246. "width",
  247. "xscrollcommand",
  248. "foreground",
  249. "background",
  250. "takefocus",
  251. "cursor",
  252. "style",
  253. "class"}},
  254. }
  255. typeMetaMap[WidgetTypeEntry] =
  256. &MetaType{
  257. Type: "Entry",
  258. Tk: &MetaClass{"tk::entry", "Entry",
  259. []string{"background",
  260. "borderwidth",
  261. "cursor",
  262. "disabledbackground",
  263. "disabledforeground",
  264. "exportselection",
  265. "font",
  266. "foreground",
  267. "highlightbackground",
  268. "highlightcolor",
  269. "highlightthickness",
  270. "insertbackground",
  271. "insertborderwidth",
  272. "insertofftime",
  273. "insertontime",
  274. "insertwidth",
  275. "invalidcommand",
  276. "justify",
  277. "readonlybackground",
  278. "relief",
  279. "selectbackground",
  280. "selectborderwidth",
  281. "selectforeground",
  282. "show",
  283. "state",
  284. "takefocus",
  285. "textvariable",
  286. "validate",
  287. "validatecommand",
  288. "width",
  289. "xscrollcommand"}},
  290. Ttk: &MetaClass{"ttk::entry", "TEntry",
  291. []string{"exportselection",
  292. "font",
  293. "invalidcommand",
  294. "justify",
  295. "show",
  296. "state",
  297. "textvariable",
  298. "validate",
  299. "validatecommand",
  300. "width",
  301. "xscrollcommand",
  302. "foreground",
  303. "background",
  304. "takefocus",
  305. "cursor",
  306. "style",
  307. "class"}},
  308. }
  309. typeMetaMap[WidgetTypeFrame] =
  310. &MetaType{
  311. Type: "Frame",
  312. Tk: &MetaClass{"tk::frame", "Frame",
  313. []string{"borderwidth",
  314. "class",
  315. "relief",
  316. "background",
  317. "colormap",
  318. "container",
  319. "cursor",
  320. "height",
  321. "highlightbackground",
  322. "highlightcolor",
  323. "highlightthickness",
  324. "padx",
  325. "pady",
  326. "takefocus",
  327. "visual",
  328. "width"}},
  329. Ttk: &MetaClass{"ttk::frame", "TFrame",
  330. []string{"borderwidth",
  331. "padding",
  332. "relief",
  333. "width",
  334. "height",
  335. "takefocus",
  336. "cursor",
  337. "style",
  338. "class"}},
  339. }
  340. typeMetaMap[WidgetTypeLabel] =
  341. &MetaType{
  342. Type: "Label",
  343. Tk: &MetaClass{"tk::label", "Label",
  344. []string{"activebackground",
  345. "activeforeground",
  346. "anchor",
  347. "background",
  348. "bitmap",
  349. "borderwidth",
  350. "compound",
  351. "cursor",
  352. "disabledforeground",
  353. "font",
  354. "foreground",
  355. "height",
  356. "highlightbackground",
  357. "highlightcolor",
  358. "highlightthickness",
  359. "image",
  360. "justify",
  361. "padx",
  362. "pady",
  363. "relief",
  364. "state",
  365. "takefocus",
  366. "text",
  367. "textvariable",
  368. "underline",
  369. "width",
  370. "wraplength"}},
  371. Ttk: &MetaClass{"ttk::label", "TLabel",
  372. []string{"background",
  373. "foreground",
  374. "font",
  375. "borderwidth",
  376. "relief",
  377. "anchor",
  378. "justify",
  379. "wraplength",
  380. "takefocus",
  381. "text",
  382. "textvariable",
  383. "underline",
  384. "width",
  385. "image",
  386. "compound",
  387. "padding",
  388. "state",
  389. "cursor",
  390. "style",
  391. "class"}},
  392. }
  393. typeMetaMap[WidgetTypeLabelFrame] =
  394. &MetaType{
  395. Type: "LabelFrame",
  396. Tk: &MetaClass{"tk::labelframe", "Labelframe",
  397. []string{"borderwidth",
  398. "class",
  399. "font",
  400. "foreground",
  401. "labelanchor",
  402. "labelwidget",
  403. "relief",
  404. "text",
  405. "background",
  406. "colormap",
  407. "container",
  408. "cursor",
  409. "height",
  410. "highlightbackground",
  411. "highlightcolor",
  412. "highlightthickness",
  413. "padx",
  414. "pady",
  415. "takefocus",
  416. "visual",
  417. "width"}},
  418. Ttk: &MetaClass{"ttk::labelframe", "TLabelframe",
  419. []string{"labelanchor",
  420. "text",
  421. "underline",
  422. "labelwidget",
  423. "borderwidth",
  424. "padding",
  425. "relief",
  426. "width",
  427. "height",
  428. "takefocus",
  429. "cursor",
  430. "style",
  431. "class"}},
  432. }
  433. typeMetaMap[WidgetTypeListBox] =
  434. &MetaType{
  435. Type: "ListBox",
  436. Tk: &MetaClass{"tk::listbox", "Listbox",
  437. []string{"activestyle",
  438. "background",
  439. "borderwidth",
  440. "cursor",
  441. "disabledforeground",
  442. "exportselection",
  443. "font",
  444. "foreground",
  445. "height",
  446. "highlightbackground",
  447. "highlightcolor",
  448. "highlightthickness",
  449. "justify",
  450. "relief",
  451. "selectbackground",
  452. "selectborderwidth",
  453. "selectforeground",
  454. "selectmode",
  455. "setgrid",
  456. "state",
  457. "takefocus",
  458. "width",
  459. "xscrollcommand",
  460. "yscrollcommand",
  461. "listvariable"}},
  462. Ttk: nil,
  463. }
  464. typeMetaMap[WidgetTypeMenu] =
  465. &MetaType{
  466. Type: "Menu",
  467. Tk: &MetaClass{"menu", "Menu",
  468. []string{"activebackground",
  469. "activeborderwidth",
  470. "activeforeground",
  471. "background",
  472. "borderwidth",
  473. "cursor",
  474. "disabledforeground",
  475. "font",
  476. "foreground",
  477. "postcommand",
  478. "relief",
  479. "selectcolor",
  480. "takefocus",
  481. "tearoff",
  482. "tearoffcommand",
  483. "title",
  484. "type"}},
  485. Ttk: nil,
  486. }
  487. typeMetaMap[WidgetTypeMenuButton] =
  488. &MetaType{
  489. Type: "MenuButton",
  490. Tk: &MetaClass{"tk::menubutton", "Menubutton",
  491. []string{"activebackground",
  492. "activeforeground",
  493. "anchor",
  494. "background",
  495. "bitmap",
  496. "borderwidth",
  497. "cursor",
  498. "direction",
  499. "disabledforeground",
  500. "font",
  501. "foreground",
  502. "height",
  503. "highlightbackground",
  504. "highlightcolor",
  505. "highlightthickness",
  506. "image",
  507. "indicatoron",
  508. "justify",
  509. "menu",
  510. "padx",
  511. "pady",
  512. "relief",
  513. "compound",
  514. "state",
  515. "takefocus",
  516. "text",
  517. "textvariable",
  518. "underline",
  519. "width",
  520. "wraplength"}},
  521. Ttk: &MetaClass{"ttk::menubutton", "TMenubutton",
  522. []string{"menu",
  523. "direction",
  524. "takefocus",
  525. "text",
  526. "textvariable",
  527. "underline",
  528. "width",
  529. "image",
  530. "compound",
  531. "padding",
  532. "state",
  533. "cursor",
  534. "style",
  535. "class"}},
  536. }
  537. typeMetaMap[WidgetTypeNotebook] =
  538. &MetaType{
  539. Type: "Notebook",
  540. Tk: nil,
  541. Ttk: &MetaClass{"ttk::notebook", "TNotebook",
  542. []string{"width",
  543. "height",
  544. "padding",
  545. "takefocus",
  546. "cursor",
  547. "style",
  548. "class"}},
  549. }
  550. typeMetaMap[WidgetTypePaned] =
  551. &MetaType{
  552. Type: "Paned",
  553. Tk: &MetaClass{"tk::panedwindow", "Panedwindow",
  554. []string{"background",
  555. "borderwidth",
  556. "cursor",
  557. "handlepad",
  558. "handlesize",
  559. "height",
  560. "opaqueresize",
  561. "orient",
  562. "proxybackground",
  563. "proxyborderwidth",
  564. "proxyrelief",
  565. "relief",
  566. "sashcursor",
  567. "sashpad",
  568. "sashrelief",
  569. "sashwidth",
  570. "showhandle",
  571. "width"}},
  572. Ttk: &MetaClass{"ttk::panedwindow", "TPanedwindow",
  573. []string{"orient",
  574. "width",
  575. "height",
  576. "takefocus",
  577. "cursor",
  578. "style",
  579. "class"}},
  580. }
  581. typeMetaMap[WidgetTypeProgressBar] =
  582. &MetaType{
  583. Type: "ProgressBar",
  584. Tk: nil,
  585. Ttk: &MetaClass{"ttk::progressbar", "TProgressbar",
  586. []string{"orient",
  587. "length",
  588. "mode",
  589. "maximum",
  590. "variable",
  591. "value",
  592. "phase",
  593. "takefocus",
  594. "cursor",
  595. "style",
  596. "class"}},
  597. }
  598. typeMetaMap[WidgetTypeRadioButton] =
  599. &MetaType{
  600. Type: "RadioButton",
  601. Tk: &MetaClass{"tk::radiobutton", "Radiobutton",
  602. []string{"activebackground",
  603. "activeforeground",
  604. "anchor",
  605. "background",
  606. "bitmap",
  607. "borderwidth",
  608. "command",
  609. "compound",
  610. "cursor",
  611. "disabledforeground",
  612. "font",
  613. "foreground",
  614. "height",
  615. "highlightbackground",
  616. "highlightcolor",
  617. "highlightthickness",
  618. "image",
  619. "indicatoron",
  620. "justify",
  621. "offrelief",
  622. "overrelief",
  623. "padx",
  624. "pady",
  625. "relief",
  626. "selectcolor",
  627. "selectimage",
  628. "state",
  629. "takefocus",
  630. "text",
  631. "textvariable",
  632. "tristateimage",
  633. "tristatevalue",
  634. "underline",
  635. "value",
  636. "variable",
  637. "width",
  638. "wraplength"}},
  639. Ttk: &MetaClass{"ttk::radiobutton", "TRadiobutton",
  640. []string{"variable",
  641. "value",
  642. "command",
  643. "takefocus",
  644. "text",
  645. "textvariable",
  646. "underline",
  647. "width",
  648. "image",
  649. "compound",
  650. "padding",
  651. "state",
  652. "cursor",
  653. "style",
  654. "class"}},
  655. }
  656. typeMetaMap[WidgetTypeScale] =
  657. &MetaType{
  658. Type: "Scale",
  659. Tk: &MetaClass{"tk::scale", "Scale",
  660. []string{"activebackground",
  661. "background",
  662. "bigincrement",
  663. "borderwidth",
  664. "command",
  665. "cursor",
  666. "digits",
  667. "font",
  668. "foreground",
  669. "from",
  670. "highlightbackground",
  671. "highlightcolor",
  672. "highlightthickness",
  673. "label",
  674. "length",
  675. "orient",
  676. "relief",
  677. "repeatdelay",
  678. "repeatinterval",
  679. "resolution",
  680. "showvalue",
  681. "sliderlength",
  682. "sliderrelief",
  683. "state",
  684. "takefocus",
  685. "tickinterval",
  686. "to",
  687. "troughcolor",
  688. "variable",
  689. "width"}},
  690. Ttk: &MetaClass{"ttk::scale", "TScale",
  691. []string{"command",
  692. "variable",
  693. "orient",
  694. "from",
  695. "to",
  696. "value",
  697. "length",
  698. "takefocus",
  699. "cursor",
  700. "style",
  701. "class"}},
  702. }
  703. typeMetaMap[WidgetTypeScrollBar] =
  704. &MetaType{
  705. Type: "ScrollBar",
  706. Tk: &MetaClass{"tk::scrollbar", "Scrollbar",
  707. []string{"activebackground",
  708. "activerelief",
  709. "background",
  710. "borderwidth",
  711. "command",
  712. "cursor",
  713. "elementborderwidth",
  714. "highlightbackground",
  715. "highlightcolor",
  716. "highlightthickness",
  717. "jump",
  718. "orient",
  719. "relief",
  720. "repeatdelay",
  721. "repeatinterval",
  722. "takefocus",
  723. "troughcolor",
  724. "width"}},
  725. Ttk: &MetaClass{"ttk::scrollbar", "Scrollbar",
  726. []string{"command",
  727. "orient",
  728. "takefocus",
  729. "cursor",
  730. "style",
  731. "class"}},
  732. }
  733. typeMetaMap[WidgetTypeSeparator] =
  734. &MetaType{
  735. Type: "Separator",
  736. Tk: nil,
  737. Ttk: &MetaClass{"ttk::separator", "TSeparator",
  738. []string{"orient",
  739. "takefocus",
  740. "cursor",
  741. "style",
  742. "class"}},
  743. }
  744. typeMetaMap[WidgetTypeSizeGrip] =
  745. &MetaType{
  746. Type: "SizeGrip",
  747. Tk: nil,
  748. Ttk: &MetaClass{"ttk::sizegrip", "TSizegrip",
  749. []string{"takefocus",
  750. "cursor",
  751. "style",
  752. "class"}},
  753. }
  754. typeMetaMap[WidgetTypeSpinBox] =
  755. &MetaType{
  756. Type: "SpinBox",
  757. Tk: &MetaClass{"tk::spinbox", "Spinbox",
  758. []string{"activebackground",
  759. "background",
  760. "borderwidth",
  761. "buttonbackground",
  762. "buttoncursor",
  763. "buttondownrelief",
  764. "buttonuprelief",
  765. "command",
  766. "cursor",
  767. "disabledbackground",
  768. "disabledforeground",
  769. "exportselection",
  770. "font",
  771. "foreground",
  772. "format",
  773. "from",
  774. "highlightbackground",
  775. "highlightcolor",
  776. "highlightthickness",
  777. "increment",
  778. "insertbackground",
  779. "insertborderwidth",
  780. "insertofftime",
  781. "insertontime",
  782. "insertwidth",
  783. "invalidcommand",
  784. "justify",
  785. "relief",
  786. "readonlybackground",
  787. "repeatdelay",
  788. "repeatinterval",
  789. "selectbackground",
  790. "selectborderwidth",
  791. "selectforeground",
  792. "state",
  793. "takefocus",
  794. "textvariable",
  795. "to",
  796. "validate",
  797. "validatecommand",
  798. "values",
  799. "width",
  800. "wrap",
  801. "xscrollcommand"}},
  802. Ttk: &MetaClass{"ttk::spinbox", "TSpinbox",
  803. []string{"values",
  804. "from",
  805. "to",
  806. "increment",
  807. "format",
  808. "command",
  809. "wrap",
  810. "exportselection",
  811. "font",
  812. "invalidcommand",
  813. "justify",
  814. "show",
  815. "state",
  816. "textvariable",
  817. "validate",
  818. "validatecommand",
  819. "width",
  820. "xscrollcommand",
  821. "foreground",
  822. "background",
  823. "takefocus",
  824. "cursor",
  825. "style",
  826. "class"}},
  827. }
  828. typeMetaMap[WidgetTypeText] =
  829. &MetaType{
  830. Type: "Text",
  831. Tk: &MetaClass{"tk::text", "Text",
  832. []string{"autoseparators",
  833. "background",
  834. "blockcursor",
  835. "borderwidth",
  836. "cursor",
  837. "endline",
  838. "exportselection",
  839. "font",
  840. "foreground",
  841. "height",
  842. "highlightbackground",
  843. "highlightcolor",
  844. "highlightthickness",
  845. "inactiveselectbackground",
  846. "insertbackground",
  847. "insertborderwidth",
  848. "insertofftime",
  849. "insertontime",
  850. "insertunfocussed",
  851. "insertwidth",
  852. "maxundo",
  853. "padx",
  854. "pady",
  855. "relief",
  856. "selectbackground",
  857. "selectborderwidth",
  858. "selectforeground",
  859. "setgrid",
  860. "spacing1",
  861. "spacing2",
  862. "spacing3",
  863. "startline",
  864. "state",
  865. "tabs",
  866. "tabstyle",
  867. "takefocus",
  868. "undo",
  869. "width",
  870. "wrap",
  871. "xscrollcommand",
  872. "yscrollcommand"}},
  873. Ttk: nil,
  874. }
  875. typeMetaMap[WidgetTypeWindow] =
  876. &MetaType{
  877. Type: "Window",
  878. Tk: &MetaClass{"toplevel", "Toplevel",
  879. []string{"borderwidth",
  880. "class",
  881. "menu",
  882. "relief",
  883. "screen",
  884. "use",
  885. "background",
  886. "colormap",
  887. "container",
  888. "cursor",
  889. "height",
  890. "highlightbackground",
  891. "highlightcolor",
  892. "highlightthickness",
  893. "padx",
  894. "pady",
  895. "takefocus",
  896. "visual",
  897. "width"}},
  898. Ttk: nil,
  899. }
  900. typeMetaMap[WidgetTypeTreeView] =
  901. &MetaType{
  902. Type: "TreeView",
  903. Tk: nil,
  904. Ttk: &MetaClass{"ttk::treeview", "Treeview",
  905. []string{"columns",
  906. "displaycolumns",
  907. "show",
  908. "selectmode",
  909. "height",
  910. "padding",
  911. "xscrollcommand",
  912. "yscrollcommand",
  913. "takefocus",
  914. "cursor",
  915. "style",
  916. "class"}},
  917. }
  918. }