Module: Tk::Tcllib::Plotchart::ChartMethod

Includes:
TkCore
Included in:
Barchart, Gnattchart, IsometricPlot, Piechart, Plot3D, PolarPlot, Timechart, XYPlot
Defined in:
ext/lib/tkextlib/tcllib/plotchart.rb

Constant Summary

Constants included from TkCore

TkCore::EventFlag, TkCore::INTERP, TkCore::INTERP_MUTEX, TkCore::INTERP_ROOT_CHECK, TkCore::INTERP_THREAD, TkCore::INTERP_THREAD_STATUS, TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD, TkCore::WIDGET_DESTROY_HOOK, TkCore::WITH_ENCODING, TkCore::WITH_RUBY_VM

Constants included from TkComm

TkComm::GET_CONFIGINFO_AS_ARRAY, TkComm::GET_CONFIGINFOwoRES_AS_ARRAY, TkComm::TkExtlibAutoloadModule, TkComm::Tk_CMDTBL, TkComm::Tk_IDs, TkComm::Tk_WINDOWS, TkComm::USE_TCLs_LIST_FUNCTIONS, TkComm::WidgetClassNames

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Instance Method Summary collapse

Methods included from TkCore

#_tk_call_to_list_core, #after, #after_cancel, #after_idle, #appname, #appsend, #appsend_deny, #appsend_displayof, callback, #callback_break, #callback_continue, #callback_return, #chooseColor, #chooseDirectory, #do_one_event, #event_generate, #getMultipleOpenFile, #getMultipleSaveFile, #getOpenFile, #getSaveFile, #get_eventloop_tick, #get_eventloop_weight, #get_no_event_wait, #inactive, #inactive_displayof, #info, #ip_eval, #ip_eval_with_enc, #ip_eval_without_enc, #ip_invoke, #ip_invoke_with_enc, #ip_invoke_without_enc, #is_mainloop?, #load_cmd_on_ip, #mainloop, #mainloop_exist?, #mainloop_thread?, #mainloop_watchdog, #messageBox, #rb_appsend, #rb_appsend_displayof, #reset_inactive, #reset_inactive_displayof, #restart, #scaling, #scaling_displayof, #set_eventloop_tick, #set_eventloop_weight, #set_no_event_wait, #tk_call, #tk_call_to_list, #tk_call_to_list_with_enc, #tk_call_to_list_without_enc, #tk_call_to_simplelist, #tk_call_to_simplelist_with_enc, #tk_call_to_simplelist_without_enc, #tk_call_with_enc, #tk_call_without_enc, #windowingsystem

Methods included from TkComm

_at, _callback_entry?, _callback_entry_class?, _curr_cmd_id, _fromUTF8, _genobj_for_tkwidget, _next_cmd_id, _toUTF8, array2tk_list, #bind, #bind_all, #bind_append, #bind_append_all, #bind_remove, #bind_remove_all, #bindinfo, #bindinfo_all, bool, image_obj, install_cmd, #install_cmd, list, num_or_str, number, procedure, simplelist, string, #subst, tk_tcl2ruby, uninstall_cmd, #uninstall_cmd, window

Methods included from TkUtil

_conv_args, #_conv_args, #_fromUTF8, _get_eval_enc_str, #_get_eval_enc_str, #_get_eval_string, _get_eval_string, _symbolkey2str, #_symbolkey2str, #_toUTF8, bool, #bool, callback, eval_cmd, #hash_kv, hash_kv, install_cmd, num_or_str, #num_or_str, number, #number, string, #string, uninstall_cmd

Methods included from TkEvent

#install_bind, #install_bind_for_event_class

Instance Method Details

#coords_3D_to_pixel(x, y, z) ⇒ Object



199
200
201
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 199

def coords_3D_to_pixel(x, y, z)
  list(tk_call_without_enc('::Plotchart::coords3DToPixel', @path, x, y, z))
end

#coords_to_pixel(x, y) ⇒ Object



195
196
197
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 195

def coords_to_pixel(x, y)
  list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y))
end

#determine_scale(xmax, ymax) ⇒ Object



216
217
218
219
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 216

def determine_scale(xmax, ymax)
  tk_call_without_enc('::Plotchart::determineScale', @path, xmax, ymax)
  self
end

#pixel_to_coords(x, y) ⇒ Object



212
213
214
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 212

def pixel_to_coords(x, y)
  list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y))
end

#polar_coordinates(radmax) ⇒ Object



203
204
205
206
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 203

def polar_coordinates(radmax)
  tk_call_without_enc('::Plotchart::polarCoordinates', @path, radmax)
  self
end

#polar_to_pixel(rad, phi) ⇒ Object



208
209
210
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 208

def polar_to_pixel(rad, phi)
  list(tk_call_without_enc('::Plotchart::polarToPixel', @path, rad, phi))
end

#save_plot(filename) ⇒ Object



141
142
143
144
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 141

def save_plot(filename)
  tk_call_without_enc(@chart, 'saveplot', filename)
  self
end

#set_zoom_panObject



221
222
223
224
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 221

def set_zoom_pan()
  tk_call_without_enc('::Plotchart::setZoomPan', @path)
  self
end

#title(str) ⇒ Object



136
137
138
139
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 136

def title(str)
  tk_call_without_enc(@chart, 'title', _get_eval_enc_str(str))
  self
end

#view_port(*args) ⇒ Object

args := pxmin, pymin, pxmax, pymax



177
178
179
180
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 177

def view_port(*args) # args := pxmin, pymin, pxmax, pymax
  tk_call_without_enc('::Plotchart::viewPort', @path, *(args.flatten))
  self
end

#world_3D_coordinates(*args) ⇒ Object



188
189
190
191
192
193
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 188

def world_3D_coordinates(*args) 
  # args := xmin, ymin, zmin, xmax, ymax, zmax
  tk_call_without_enc('::Plotchart::world3DCoordinates', 
                      @path, *(args.flatten))
  self
end

#world_coordinates(*args) ⇒ Object

args := xmin, ymin, xmax, ymax



182
183
184
185
186
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 182

def world_coordinates(*args) # args := xmin, ymin, xmax, ymax
  tk_call_without_enc('::Plotchart::worldCoordinates', 
                      @path, *(args.flatten))
  self
end

#xconfig(key, value = None) ⇒ Object



156
157
158
159
160
161
162
163
164
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 156

def xconfig(key, value=None)
  if key.kind_of?(Hash)
    tk_call_without_enc(@chart, 'xconfig', *hash_kv(key, true))
  else
    tk_call_without_enc(@chart, 'xconfig', 
                        "-#{key}", _get_eval_enc_str(value))
  end
  self
end

#xtext(str) ⇒ Object



146
147
148
149
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 146

def xtext(str)
  tk_call_without_enc(@chart, 'xtext', _get_eval_enc_str(str))
  self
end

#yconfig(key, value = None) ⇒ Object



166
167
168
169
170
171
172
173
174
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 166

def yconfig(key, value=None)
  if key.kind_of?(Hash)
    tk_call_without_enc(@chart, 'yconfig', *hash_kv(key, true))
  else
    tk_call_without_enc(@chart, 'yconfig', 
                        "-#{key}", _get_eval_enc_str(value))
  end
  self
end

#ytext(str) ⇒ Object



151
152
153
154
# File 'ext/lib/tkextlib/tcllib/plotchart.rb', line 151

def ytext(str)
  tk_call_without_enc(@chart, 'ytext', _get_eval_enc_str(str))
  self
end