TaoLib

Check-in [186d9e47dc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Pulling changes from tcl-8-6-9 and closing that branch
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:186d9e47dc6a9db7f55e4c90ccf2eb531dcd3edd
User & Date: hypnotoad 2019-01-08 00:38:57
Context
2019-01-11
11:14
Removed check for [my widget hull] That function is actually intended to blank out and recreate a hull that may or may not have been destroyed. It's not supposed to return the actual hull (and what it returns is complicated for container/object relationships.) Leaf check-in: 68604e2624 user: hypnotoad tags: trunk
2019-01-08
00:38
Pulling changes from tcl-8-6-9 and closing that branch check-in: 186d9e47dc user: hypnotoad tags: trunk
00:35
Pulling fix from fsar check-in: c831ca1a54 user: hypnotoad tags: trunk
00:14
Fix for Tcl 8.6.9 Closed-Leaf check-in: 571d01fcfe user: hypnotoad tags: tcl-8-6-9
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/taotk/core/dialog.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
..
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
  set ::response {}
  set info [::tool::args_to_options {*}$args]
  set class ::taotk::dialog.[dict getnull $info type]
  if {[info command $class] eq {}} {
    set class ::taotk::dialog.ok
  }
  dict set info varname ::response
  set tempobj [$class create prompt .prompt {*}$info]
  if {[info coroutine] eq {}} {
    ::vwait ::response  
  } else {
    ::coroutine::util::vwait ::response
  }
  catch {$tempobj destroy}
  return $::response
}

###
# topic: 162bc5eacc30e227a8a85d7a95d169fa087793d3
# description: A modal dialog
###
................................................................................
interp alias {} ::odieMessageBox {} ::taotk::dialog

###
# topic: 755be90f5448de8301be06981c0ea79a1caee5b1
###
tao::define taotk::meta::dialog {
  superclass taotk::meta::toplevel taotk::meta::widget
  
  option varname {
    default ::response
  }
  property icon information ::tk::icons::information
  property icon error ::tk::icons::error
  property icon question ::tk::icons::question
  property icon warning ::tk::icons::warning

  constructor {window args} {
    my Hull_Build $window {} {*}$args
  }

  
  option windowstyle {
    default modal
    values {standard floating help modal}
    widget select
  }
  option class {
    default {}
................................................................................
  }
  option parent {
    aliases parent
    default {}
  }


  
  #method Hull_Populate {} {}

  ###
  # topic: ffed00a071628b29bfb2e5a366e52c7c5ac06e02
  ###
  method action::destroy {} {
    set varname [my cget varname]
................................................................................
    destroy {*}[winfo children $w]
    ttk::label $w.icon -image [my meta cget icon [my cget icon]]
    ttk::frame $w.info
    message $w.info.message -text [my cget message] -justify [my cget justify] -width [my cget width]
    grid $w.info.message
    if {[my cget detail] ne {}} {
      message $w.info.detail -text [my cget detail] -justify [my cget justify]
      grid $w.info.detail  
    }
    grid $w.icon $w.info
    ttk::frame $w.buttons
    my Widget buttons $w.buttons
    grid $w.buttons -columnspan 2 -sticky ew
  }

................................................................................
}

###
# topic: 3af1dc9642fadf5a439c189bb04fa5c0e40c8284
###
tao::define taotk::dialog.ok {
  superclass taotk::meta::dialog
  

  ###
  # topic: 2b6aef5502d8d4cf224ead5d4643dd446809eaec
  ###
  method Widget::buttons w {
    set varname [my cget varname]
    ttk::button $w.ok -text Ok -command "set $varname ok"  -width 0
    pack $w.ok -side right 
  }
}

###
# topic: 7b6f59de6b291342b2634dc7c4e75adc028eae53
###
tao::define taotk::dialog.yesno {
................................................................................
  ###
  # topic: f15c7cd23e0687be0ee36b51ce03f7b9d409207b
  ###
  method Widget::buttons w {
    set varname [my cget varname]
    ttk::button $w.ok -text Ok -command "set $varname ok"  -width 0
    ttk::button $w.cancel -text Cancel -command "set $varname cancel"  -width 0
    pack $w.ok $w.cancel -side right    
  }
}

###
# topic: 5dae0775ee26f2fcd77005d061d145a86f920f38
###
tao::define taotk::dialog.retrycancel {







|
|
|



|







 







|












|







 







|







 







|







 







|







|







 







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
..
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
  set ::response {}
  set info [::tool::args_to_options {*}$args]
  set class ::taotk::dialog.[dict getnull $info type]
  if {[info command $class] eq {}} {
    set class ::taotk::dialog.ok
  }
  dict set info varname ::response
  set tempobj [$class create ::taotk::prompt .prompt {*}$info]
  if {[info coroutine] eq {}} {
    ::vwait ::response
  } else {
    ::coroutine::util::vwait ::response
  }
  $tempobj destroy
  return $::response
}

###
# topic: 162bc5eacc30e227a8a85d7a95d169fa087793d3
# description: A modal dialog
###
................................................................................
interp alias {} ::odieMessageBox {} ::taotk::dialog

###
# topic: 755be90f5448de8301be06981c0ea79a1caee5b1
###
tao::define taotk::meta::dialog {
  superclass taotk::meta::toplevel taotk::meta::widget

  option varname {
    default ::response
  }
  property icon information ::tk::icons::information
  property icon error ::tk::icons::error
  property icon question ::tk::icons::question
  property icon warning ::tk::icons::warning

  constructor {window args} {
    my Hull_Build $window {} {*}$args
  }


  option windowstyle {
    default modal
    values {standard floating help modal}
    widget select
  }
  option class {
    default {}
................................................................................
  }
  option parent {
    aliases parent
    default {}
  }



  #method Hull_Populate {} {}

  ###
  # topic: ffed00a071628b29bfb2e5a366e52c7c5ac06e02
  ###
  method action::destroy {} {
    set varname [my cget varname]
................................................................................
    destroy {*}[winfo children $w]
    ttk::label $w.icon -image [my meta cget icon [my cget icon]]
    ttk::frame $w.info
    message $w.info.message -text [my cget message] -justify [my cget justify] -width [my cget width]
    grid $w.info.message
    if {[my cget detail] ne {}} {
      message $w.info.detail -text [my cget detail] -justify [my cget justify]
      grid $w.info.detail
    }
    grid $w.icon $w.info
    ttk::frame $w.buttons
    my Widget buttons $w.buttons
    grid $w.buttons -columnspan 2 -sticky ew
  }

................................................................................
}

###
# topic: 3af1dc9642fadf5a439c189bb04fa5c0e40c8284
###
tao::define taotk::dialog.ok {
  superclass taotk::meta::dialog


  ###
  # topic: 2b6aef5502d8d4cf224ead5d4643dd446809eaec
  ###
  method Widget::buttons w {
    set varname [my cget varname]
    ttk::button $w.ok -text Ok -command "set $varname ok"  -width 0
    pack $w.ok -side right
  }
}

###
# topic: 7b6f59de6b291342b2634dc7c4e75adc028eae53
###
tao::define taotk::dialog.yesno {
................................................................................
  ###
  # topic: f15c7cd23e0687be0ee36b51ce03f7b9d409207b
  ###
  method Widget::buttons w {
    set varname [my cget varname]
    ttk::button $w.ok -text Ok -command "set $varname ok"  -width 0
    ttk::button $w.cancel -text Cancel -command "set $varname cancel"  -width 0
    pack $w.ok $w.cancel -side right
  }
}

###
# topic: 5dae0775ee26f2fcd77005d061d145a86f920f38
###
tao::define taotk::dialog.retrycancel {