Bwidget Source Code
Check-in [e2c80d8f35]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:*** empty log message ***
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e2c80d8f35f341b1fe17aad2170dc1a94419365f
User & Date: ericm 1999-09-16 15:36:22
Context
1999-09-16
15:36
Adding a ChangeLog check-in: 5a459c8574 user: ericm tags: trunk
15:36
*** empty log message *** check-in: e2c80d8f35 user: ericm tags: trunk
1999-09-14
05:44
Fixed bug during installation of images. check-in: 3eb21375f9 user: wart tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to notebook.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
607
608
609
610
611
612
613









614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631









632
633
634
635
636
637
638
...
783
784
785
786
787
788
789




790
791
792
793
794
795
796
...
840
841
842
843
844
845
846









847
848
849
850
851
852
853
# ------------------------------------------------------------------------------
#  notebook.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: notebook.tcl,v 1.1.1.1 1999/08/03 20:20:23 ericm Exp $
# ------------------------------------------------------------------------------
#  Index of commands:
#     - NoteBook::create
#     - NoteBook::configure
#     - NoteBook::cget
#     - NoteBook::compute_size
#     - NoteBook::insert
................................................................................
    }

    foreach page $data(pages) {
        _draw_page $path $page 0
    }
    _draw_area   $path
    _draw_arrows $path









}


# ------------------------------------------------------------------------------
#  Command NoteBook::_draw_page
# ------------------------------------------------------------------------------
proc NoteBook::_draw_page { path page create } {
    variable $path
    upvar 0  $path data

    # --- calcul des coordonnees et des couleurs de l'onglet ---------------------------------
    set pos [lsearch $data(pages) $page]
    set bg  [Widget::getoption $path -background]
    set h   $data(hpage)
    set xd  [_get_x_page $path $pos]
    set xf  [expr {$xd + $data($page,width)}]
    set lt  [list $xd $h $xd 4 [expr {$xd+3}] 1 $xf 1]
    set lb  [list $xf 1 [expr {$xf+3}] 4 [expr {$xf+3}] [expr {$h-3}] [expr {$xf+6}] $h]









    set img [Widget::getoption $path.f$page -image]
    if { $data(select) == $page } {
        set fgt   $data(lbg)
        set fgb   $data(dbg)
        set ytext [expr {$h/2-1}]
        if { $img == "" } {
            set xtext [expr {$xd+9}]
................................................................................

    set w   [expr {[winfo width  $path]-1}]
    set h   [expr {[winfo height $path]-1}]
    set bd  [Widget::getoption $path -borderwidth]
    set x0  [expr {$bd-1}]
    set y0  $data(hpage)
    set y1  $h




    set dbg $data(dbg)
    set sel $data(select)
    if {  $sel == "" } {
        set xd  [expr {$w/2}]
        set xf  $xd
        set lbg $data(dbg)
    } else {
................................................................................

# ------------------------------------------------------------------------------
#  Command NoteBook::_resize
# ------------------------------------------------------------------------------
proc NoteBook::_resize { path } {
    _draw_area   $path
    _draw_arrows $path









}


# ------------------------------------------------------------------------------
#  Command NoteBook::_realize
# ------------------------------------------------------------------------------
proc NoteBook::_realize { path } {


|







 







>
>
>
>
>
>
>
>
>



|

|












>
>
>
>
>
>
>
>
>







 







>
>
>
>







 







>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
...
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
...
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
...
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
# ------------------------------------------------------------------------------
#  notebook.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: notebook.tcl,v 1.2 1999/09/16 15:36:22 ericm Exp $
# ------------------------------------------------------------------------------
#  Index of commands:
#     - NoteBook::create
#     - NoteBook::configure
#     - NoteBook::cget
#     - NoteBook::compute_size
#     - NoteBook::insert
................................................................................
    }

    foreach page $data(pages) {
        _draw_page $path $page 0
    }
    _draw_area   $path
    _draw_arrows $path
    # ericm
    set foo [lindex [split [winfo geometry $path] +] 0]
    foreach {w h} [split $foo x] {
	break
    }
#    $path:cmd scale all 0 0 1.0 -1.0
#    $path:cmd itemconfigure window -anchor sw
#    $path:cmd move all 0 $h
    # ericm
}


# -----------------------------------------------------------------------------
#  Command NoteBook::_draw_page
# -----------------------------------------------------------------------------
proc NoteBook::_draw_page { path page create } {
    variable $path
    upvar 0  $path data

    # --- calcul des coordonnees et des couleurs de l'onglet ---------------------------------
    set pos [lsearch $data(pages) $page]
    set bg  [Widget::getoption $path -background]
    set h   $data(hpage)
    set xd  [_get_x_page $path $pos]
    set xf  [expr {$xd + $data($page,width)}]
    set lt  [list $xd $h $xd 4 [expr {$xd+3}] 1 $xf 1]
    set lb  [list $xf 1 [expr {$xf+3}] 4 [expr {$xf+3}] [expr {$h-3}] [expr {$xf+6}] $h]
    # ericm
#    set nbh [expr {[winfo height $path]-1} - $data(hpage)]
#    set nlt {}
#    set nlb {}
#    foreach {x y} $lt { lappend nlt $x [expr $y + $nbh] }
#    foreach {x y} $lb { lappend nlb $x [expr $y + $nbh] }
#    set lb $nlb
#    set lt $nlt
    # ericm
    set img [Widget::getoption $path.f$page -image]
    if { $data(select) == $page } {
        set fgt   $data(lbg)
        set fgb   $data(dbg)
        set ytext [expr {$h/2-1}]
        if { $img == "" } {
            set xtext [expr {$xd+9}]
................................................................................

    set w   [expr {[winfo width  $path]-1}]
    set h   [expr {[winfo height $path]-1}]
    set bd  [Widget::getoption $path -borderwidth]
    set x0  [expr {$bd-1}]
    set y0  $data(hpage)
    set y1  $h
    # ericm
#    set y0 [expr $y0 - $data(hpage)]
#    set y1 [expr $y1 - $data(hpage)]
    # ericm
    set dbg $data(dbg)
    set sel $data(select)
    if {  $sel == "" } {
        set xd  [expr {$w/2}]
        set xf  $xd
        set lbg $data(dbg)
    } else {
................................................................................

# ------------------------------------------------------------------------------
#  Command NoteBook::_resize
# ------------------------------------------------------------------------------
proc NoteBook::_resize { path } {
    _draw_area   $path
    _draw_arrows $path
    # ericm
    set foo [lindex [split [winfo geometry $path] +] 0]
    foreach {w h} [split $foo x] {
	break
    }
#    $path:cmd scale all 0 0 1.0 -1.0
#    $path:cmd itemconfigure window -anchor sw
#    $path:cmd move all 0 $h
    # ericm
}


# ------------------------------------------------------------------------------
#  Command NoteBook::_realize
# ------------------------------------------------------------------------------
proc NoteBook::_realize { path } {