OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [toplevelwin.ith] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# TopLevelWin class definition for GDBtk.
2
# Copyright 1998, 1999 Cygnus Solutions
3
#
4
# This program is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License (GPL) as published by
6
# the Free Software Foundation; either version 2 of the License, or (at
7
# your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
 
14
 
15
class TopLevelWin {
16
  inherit ManagedWin
17
 
18
  private variable frame ""
19
 
20
  constructor {args} {
21
    debug $itk_interior
22
 
23
    # create a container frame
24
    conFrame $itk_interior.container
25
    pack $itk_interior.container -fill both -expand 1
26
 
27
    # set up bindings for group iconification/deiconification
28
    # NOT IMPLEMENTED YET
29
    #set top [winfo toplevel [namespace tail $this]]
30
    #bind_for_toplevel_only $top  {
31
    #     manage_iconify iconify
32
    #}
33
    #bind_for_toplevel_only $top  {
34
    #     manage_iconify deiconify
35
    #}
36
    incr numTopWins
37
  }
38
 
39
  public method conFrame {win} {
40
    set frame [cyg::panedwindow $win -height 5i]
41
    return $frame.con
42
  }
43
 
44
  public method conAdd {child args} {
45
    parse_args {{resizable 1}}
46
    $frame add $child -margin 0 -resizable $resizable
47
    return [$frame childsite $child].con
48
  }
49
 
50
  public method sizeWinByChild {child} {
51
    if {[catch {$frame childsite $child} childWin]} {
52
      debug "Could not find child $child"
53
      return
54
    }
55
    set width [winfo reqwidth $childWin]
56
    $frame configure -width $width
57
 
58
  }
59
 
60
  destructor {
61
    debug
62
    incr numTopWins -1
63
  }
64
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.