Public Member Functions | Public Attributes | Private Attributes | List of all members
emcalc_gui.TextView Class Reference

Public Member Functions

def __init__ (self)
 
def get_window (self)
 
def cb_hide_window (self, widget, data=None)
 

Public Attributes

 text_window
 
 textbuffer
 

Private Attributes

 __margin
 

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.

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

Member Function Documentation

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

Definition at line 334 of file emcalc_gui.py.

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

Definition at line 331 of file emcalc_gui.py.

References emcalc_gui.TextView.text_window.

331  def get_window(self) :
332  return self.text_window
333 
def get_window(self)
Definition: emcalc_gui.py:331

Member Data Documentation

emcalc_gui.TextView.__margin
private

Definition at line 304 of file emcalc_gui.py.

emcalc_gui.TextView.text_window

Definition at line 305 of file emcalc_gui.py.

Referenced by emcalc_gui.TextView.get_window().

emcalc_gui.TextView.textbuffer

Definition at line 319 of file emcalc_gui.py.


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