Package dtk :: Package ui :: Module dialog :: Class DialogBox

Class DialogBox

source code


Dialog box to standard dialog layout and ui detail.

If you want build a dialog, you should use this standard.

Instance Methods
 
__init__(self, title, default_width=None, default_height=None, mask_type=None, close_callback=None, modal=True, window_hint=gtk.gdk.WINDOW_TYPE_HINT_DIALOG, window_pos=None, skip_taskbar_hint=True, resizable=False)
Initialize DialogBox class.
source code
 
get_mask_func(self, widget, padding_left=0, padding_right=0, padding_top=0, padding_bottom=0)
Get mask function to render background, you can use this function to return "render function" to draw your ui to keep same style.
source code

Inherited from window.Window: add_move_event, add_toggle_event, close_window, draw_mask, get_edge, get_shadow_size, hide_shadow, is_disable_window_maximized, min_window, resize_window, show_shadow, show_window, toggle_fullscreen_window, toggle_max_window

Method Details

__init__(self, title, default_width=None, default_height=None, mask_type=None, close_callback=None, modal=True, window_hint=gtk.gdk.WINDOW_TYPE_HINT_DIALOG, window_pos=None, skip_taskbar_hint=True, resizable=False)
(Constructor)

source code 

Initialize DialogBox class.

Parameters:
  • title - Dialog title.
  • default_width - Width of dialog, default is None.
  • default_height - Height of dialog, default is None.
  • mask_type - Background mask type, it allow use below type:
    • DIALOG_MASK_SINGLE_PAGE single mask style, use in single page that background mask include dialog button area.
    • DIALOG_MASK_GLASS_PAGE glass mask style, similar DIALOG_MASK_SINGLE_PAGE but with different color.
    • DIALOG_MASK_MULTIPLE_PAGE multiple mask style, use in multiple page that background mask not include dialog button area.
    • DIALOG_MASK_TAB_PAGE tab mask style, use in preference page that background mask not include button area.
Overrides: window.Window.__init__

get_mask_func(self, widget, padding_left=0, padding_right=0, padding_top=0, padding_bottom=0)

source code 

Get mask function to render background, you can use this function to return "render function" to draw your ui to keep same style.

Parameters:
  • widget - DialogBox widget.
  • padding_left - Padding at left side.
  • padding_right - Padding at right side.
  • padding_top - Padding at top side.
  • padding_bottom - Padding at bottom side.