Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
emcalc_gui.TextView Class Reference

Public Member Functions

def __init__
 
def get_window
 
def cb_hide_window
 

Public Attributes

 text_window
 
 textbuffer
 

Detailed Description

Definition at line 302 of file emcalc_gui.py.

Constructor & Destructor Documentation

def emcalc_gui.TextView.__init__ (   self)

Definition at line 303 of file emcalc_gui.py.

304  def __init__(self) :
305  self.__margin = 8
306  self.text_window = gtk.Window(gtk.WINDOW_TOPLEVEL)
307  self.text_window.set_title('Value with Text')
308  self.text_window.set_position(gtk.WIN_POS_MOUSE)
309  self.text_window.set_default_size(500, 300)
310 
311  vbox = gtk.VBox()
312  self.text_window.add(vbox)
313 
314  sw = gtk.ScrolledWindow()
315  sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
316  sw.set_border_width(self.__margin)
317  vbox.pack_start(sw)
318 
319  textview = gtk.TextView()
320  self.textbuffer = textview.get_buffer()
321  sw.add(textview)
322 
323  hbox = gtk.HButtonBox()
324  hbox.set_layout(gtk.BUTTONBOX_END)
325  hbox.set_border_width(self.__margin)
326  vbox.pack_start(hbox, expand=False)
327 
328  close_button = gtk.Button(stock = gtk.STOCK_CLOSE)
329  close_button.connect("clicked", self.cb_hide_window)
330  hbox.add(close_button)

Member Function Documentation

def emcalc_gui.TextView.cb_hide_window (   self,
  widget,
  data = None 
)

Definition at line 334 of file emcalc_gui.py.

335  def cb_hide_window(self, widget, data=None) :
336  self.text_window.hide_all()
337  return False
338 
339 
340 # ==================================================================
341 # main
# ==================================================================
def emcalc_gui.TextView.get_window (   self)

Definition at line 331 of file emcalc_gui.py.

332  def get_window(self) :
333  return self.text_window

Member Data Documentation

emcalc_gui.TextView.text_window

Definition at line 305 of file emcalc_gui.py.

emcalc_gui.TextView.textbuffer

Definition at line 319 of file emcalc_gui.py.


The documentation for this class was generated from the following file: