# -*- coding: utf-8 -*- module QDA::GUI # Generic module for a long-running window that is not the main # application window; deals with window placement etc module WorkAreaWindow def activate(*args) show raise end # returns a hash serialising the current shape and location of # this window, so it can later be unthawed def layout return { :x => position.x, :y => position.y, :w => size.width, :h => size.height } end # Doesn't really belong here? But useful def replace_control(old, new) old.containing_sizer.replace(old, new) old.destroy new.containing_sizer.layout end end end # Load shared menu bar and tool bar classes, and frame classes for # viewing specific Weft object types %w[ toolbars marking_window text_document image_document media_document category search query script codereview ].each do | insp | require "weft/wxgui/inspectors/#{insp}" end