Tools__WebBrowserPage.st
author Claus Gittinger <cg@exept.de>
Fri, 01 Jul 2011 15:13:38 +0200
changeset 9967 88b490b5e9bd
child 10066 cc32cec24c48
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9967
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ NameSpace: Tools }"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
ApplicationModel subclass:#WebBrowserPage
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'history webKitView urlHolder titleHolder bookmarkHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
		toolBarVisibleHolder bookmarkBarVisibleHolder'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	classVariableNames:''
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	poolDictionaries:''
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	category:'Interface-Browsers-Web'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!WebBrowserPage class methodsFor:'documentation'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
copyright
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 COPYRIGHT (c) 2006 by eXept Software AG
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
              All Rights Reserved
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 This software is furnished under a license and may be used
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 only in accordance with the terms of that license and with the
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 be provided or otherwise made available to, or used by, any
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 other person.  No title to or ownership of the software is
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 hereby transferred.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
!WebBrowserPage class methodsFor:'image specs'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
hideToolBarIcon
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    <resource: #image>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    ^ToolbarIconLibrary hideToolbarIcon
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    "Created: / 08-06-2011 / 12:09:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!WebBrowserPage class methodsFor:'interface specs'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
toolBarSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    "This resource specification was automatically generated
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
     by the UIPainter of ST/X."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    "Do not manually edit this!! If it is corrupted,
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
     the UIPainter may not be able to read the specification."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
     UIPainter new openOnClass:Tools::WebBrowserPage andSelector:#toolBarSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
     Tools::WebBrowserPage new openInterface:#toolBarSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    <resource: #canvas>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    ^ 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
     #(FullSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
        name: toolBarSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
        window: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
       (WindowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
          label: 'Tool Bar'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
          name: 'Tool Bar'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
          min: (Point 10 10)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
          bounds: (Rectangle 0 0 300 30)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
        )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
        component: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
       (SpecCollection
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
          collection: (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
           (MenuPanelSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
              name: 'ToolBarMenu'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
              layout: (LayoutFrame 0 0.0 0 0.0 100 0.0 0 1.0)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
              level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
              menu: toolBarMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
              textDefault: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
            )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
           (ViewSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
              name: 'URLPanel'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
              layout: (LayoutFrame 100 0.0 0 0 0 1 0 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
              level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
              component: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
             (SpecCollection
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
                collection: (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
                 (InputFieldSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
                    name: 'URLFIeld'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
                    layout: (LayoutFrame 2 0 5 0 -2 1 -3 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
                    model: urlHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
                    acceptOnLeave: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
                    acceptOnReturn: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
                    acceptOnTab: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
                    acceptOnPointerLeave: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
                    acceptIfUnchanged: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
                  )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
                 )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
               
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
              )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
            )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
           )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
         
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
        )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
      )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
windowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    "This resource specification was automatically generated
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
     by the UIPainter of ST/X."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    "Do not manually edit this!! If it is corrupted,
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
     the UIPainter may not be able to read the specification."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
     UIPainter new openOnClass:Tools::WebBrowserPage andSelector:#windowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
     Tools::WebBrowserPage new openInterface:#windowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
     Tools::WebBrowserPage open
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    <resource: #canvas>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    ^ 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
     #(FullSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
        name: windowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
        window: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
       (WindowSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
          label: 'Web Browser Page'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
          name: 'Web Browser Page'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
          labelChannel: titleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
          min: (Point 10 10)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
          bounds: (Rectangle 0 0 707 516)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
        )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
        component: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
       (SpecCollection
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
          collection: (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
           (ViewSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
              name: 'ToolBar'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
              layout: (LayoutFrame 0 0 0 0 0 1 40 0)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
              level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
              visibilityChannel: toolBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
              component: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
             (SpecCollection
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
                collection: (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
                 (ActionButtonSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
                    label: 'hideToolBarIcon'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
                    name: 'HideToolBarButton'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
                    layout: (LayoutFrame 0 0 0 0 13 0 0 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
                    activeHelpKey: hideToolBar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
                    level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                    hasCharacterOrientedLabel: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                    translateLabel: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                    model: hideToolbar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                  )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                 (UISubSpecification
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                    name: 'ToolBarSpec'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                    layout: (LayoutFrame 13 0 0 0 0 1 0 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
                    minorKey: toolBarSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
                  )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
                 )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
               
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
              )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
            )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
           (ViewSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
              name: 'BookmarkBar'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
              layout: (LayoutFrame 0 0 40 0 0 1 66 0)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
              visibilityChannel: bookmarkBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
              component: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
             (SpecCollection
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                collection: (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                 (ActionButtonSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                    label: 'hideToolBarIcon'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                    name: 'Button1'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                    layout: (LayoutFrame 0 0 0 0 13 0 0 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                    activeHelpKey: hideToolBar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                    level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                    hasCharacterOrientedLabel: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                    translateLabel: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                    model: hideBookmarkBar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
                  )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                 (SubCanvasSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                    name: 'Bookmarks'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                    layout: (LayoutFrame 13 0 3 0 0 1 -3 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                    level: 0
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                    hasHorizontalScrollBar: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                    hasVerticalScrollBar: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                    miniScrollerHorizontal: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                    majorKey: BookmarkBar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
                    subAspectHolders: 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
                   (Array
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
                      
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
                     (SubChannelInfoSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
                        subAspect: bookmarkHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
                        aspect: bookmarkHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
                      ) 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
                     (SubChannelInfoSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
                        subAspect: bookmarksHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
                        aspect: bookmarkListHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
                      )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
                    )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
                    createNewApplication: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                    createNewBuilder: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                  )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
                 )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
               
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
              )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
            )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
           (NonScrollableArbitraryComponentSpec
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
              name: 'PageContents'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
              layout: (LayoutFrame 0 0 67 0 0 1 0 1)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
              component: webKitView
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
            )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
           )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
         
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
        )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
      )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
!WebBrowserPage class methodsFor:'menu specs'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
toolBarMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
    "This resource specification was automatically generated
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
     by the MenuEditor of ST/X."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
    "Do not manually edit this!! If it is corrupted,
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
     the MenuEditor may not be able to read the specification."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
     MenuEditor new openOnClass:Tools::WebBrowserPage andSelector:#toolBarMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
     (Menu new fromLiteralArrayEncoding:(Tools::WebBrowserPage toolBarMenu)) startUp
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    "
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
    <resource: #menu>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
    ^ 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
     #(Menu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
        (
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
         (MenuItem
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
            enabled: canGoBackAspect
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
            label: 'Back'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
            itemValue: goBack
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
            translateLabel: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
            isButton: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
            submenuChannel: goBackMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
            labelImage: (ResourceRetriever XPToolbarIconLibrary historyBackIcon)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
          )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
         (MenuItem
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
            enabled: canGoForwardAspect
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
            label: 'Forward'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
            itemValue: goForward
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
            translateLabel: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
            isButton: true
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
            submenuChannel: goForwardMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
            labelImage: (ResourceRetriever XPToolbarIconLibrary historyForwardIcon)
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
          )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
         )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
        nil
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
        nil
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
      )
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
!WebBrowserPage methodsFor:'actions'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
hideBookmarkBar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
    <resource: #uiCallback>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
    self bookmarkBarVisibleHolder value: false
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    "Modified: / 10-06-2011 / 23:57:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
hideToolbar
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    <resource: #uiCallback>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
    self toolBarVisibleHolder value: false.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
    "Modified: / 10-06-2011 / 23:58:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
switchToBookmarkEntry: bookmark
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
    self bookmarkHolder value: bookmark.    
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
    history goTo: bookmark.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    self urlHolder value: bookmark url.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
    "Created: / 16-06-2011 / 16:10:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
!WebBrowserPage methodsFor:'aspects'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
bookmarkBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
    "return/create the 'bookmarkBarVisibleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    bookmarkBarVisibleHolder isNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
        bookmarkBarVisibleHolder := true asValue.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
        bookmarkBarVisibleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
    ^ bookmarkBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
    "Modified: / 10-06-2011 / 23:56:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
bookmarkBarVisibleHolder:something
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
    "set the 'bookmarkBarVisibleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
    |oldValue newValue|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
    bookmarkBarVisibleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
        oldValue := bookmarkBarVisibleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
        bookmarkBarVisibleHolder removeDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
    bookmarkBarVisibleHolder := something.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    bookmarkBarVisibleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
        bookmarkBarVisibleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    newValue := bookmarkBarVisibleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
    oldValue ~~ newValue ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
        self update:#value with:newValue from:bookmarkBarVisibleHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
bookmarkHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    "return/create the 'bookmarkHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
    bookmarkHolder isNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
        bookmarkHolder := ValueHolder new.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
    ^ bookmarkHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
bookmarkListHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
    ^BookmarkList forWebBrowser
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
    "Created: / 08-06-2011 / 12:16:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
titleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
    "return/create the 'titleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
    titleHolder isNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
        titleHolder := ValueHolder new.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
        titleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
    ^ titleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
titleHolder:something
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
    "set the 'titleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
    |oldValue newValue|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
    titleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
        oldValue := titleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
        titleHolder removeDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
    titleHolder := something.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
    self webKitView title: titleHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
    titleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
        titleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    newValue := titleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
    oldValue ~~ newValue ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
        self update:#value with:newValue from:titleHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
    "Modified: / 08-06-2011 / 14:51:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
toolBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
    "return/create the 'toolBarVisibleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
    toolBarVisibleHolder isNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
        toolBarVisibleHolder := true asValue.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
        toolBarVisibleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
    ^ toolBarVisibleHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
    "Modified: / 10-06-2011 / 23:57:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
toolBarVisibleHolder:something
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
    "set the 'toolBarVisibleHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
    |oldValue newValue|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
    toolBarVisibleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
        oldValue := toolBarVisibleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
        toolBarVisibleHolder removeDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
    toolBarVisibleHolder := something.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
    toolBarVisibleHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
        toolBarVisibleHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
    newValue := toolBarVisibleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
    oldValue ~~ newValue ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
        self update:#value with:newValue from:toolBarVisibleHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
urlHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
    "return/create the 'urlHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
    urlHolder isNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
        urlHolder := 'http://google.com' asValue.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
        urlHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
    ^ urlHolder
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
    "Modified: / 08-06-2011 / 15:06:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
urlHolder:something
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
    "set the 'urlHolder' value holder (automatically generated)"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
    |oldValue newValue|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
    urlHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
        oldValue := urlHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
        urlHolder removeDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
    urlHolder := something.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
    self webKitView url: urlHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
    urlHolder notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
        urlHolder addDependent:self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
    newValue := urlHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
    oldValue ~~ newValue ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
        self update:#value with:newValue from:urlHolder.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
    "Modified: / 08-06-2011 / 14:27:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
webKitView
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
    webKitView ifNil:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
        webKitView := WebKitView new
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
                        url: self urlHolder;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
                        title: self titleHolder;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
            
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
                        yourself.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
    ^webKitView.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
    "Created: / 07-06-2011 / 22:50:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
    "Modified: / 08-06-2011 / 14:26:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
!WebBrowserPage methodsFor:'aspects-queries'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
canGoBackAspect
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
    ^(AspectAdaptor forAspect:#canGoBack)                
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
                subjectChannel: history;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
                yourself.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
    "Modified: / 21-07-2009 / 22:39:57 / Jan Vrany <vranyj1@fel.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
    "Created: / 01-09-2009 / 22:38:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
    "Modified: / 08-06-2011 / 12:36:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
canGoForwardAspect
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
   ^(AspectAdaptor forAspect:#canGoForward)                
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
                subjectChannel: history;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
                yourself.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
    "Modified: / 21-07-2009 / 22:39:57 / Jan Vrany <vranyj1@fel.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
    "Created: / 01-09-2009 / 22:39:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
    "Modified: / 08-06-2011 / 12:36:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
!WebBrowserPage methodsFor:'change & update'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
update:something with:aParameter from:changedObject
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
    "Invoked when an object that I depend upon sends a change notification."
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
    "stub code automatically generated - please change as required"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
    changedObject == urlHolder ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
         self updateBookmark.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
         ^ self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
    changedObject == titleHolder ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
         self updateBookmark.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
         ^ self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
    changedObject == toolBarVisibleHolder ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
         self updateToollBarAndBookmarkBarVisibility.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
         ^ self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
    changedObject == bookmarkBarVisibleHolder ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
         self updateToollBarAndBookmarkBarVisibility.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
         ^ self.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
    
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
    super update:something with:aParameter from:changedObject
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
    "Modified: / 10-06-2011 / 23:53:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
updateBookmark
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
    | url title bookmark |
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
    url := self urlHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    title := self titleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
    ((bookmark := self bookmarkHolder value) notNil and:[bookmark url = url]) ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
        self bookmarkHolder value label: title.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
    ] ifFalse:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
        self bookmarkHolder value: (Bookmark forUrl: url label: title).
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
        history goTo: self bookmarkHolder value
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
    ]
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
    "Created: / 08-06-2011 / 12:19:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
    "Modified: / 08-06-2011 / 14:55:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
updateToollBarAndBookmarkBarVisibility
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
    |toolBarVisible toolBar bookmarkBarVisible bookmarkBar pageContent topOffset h|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    builder ifNil:[^self].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    toolBar := self componentAt:#ToolBar.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    bookmarkBar := self componentAt:#BookmarkBar.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
    topOffset := 0.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    toolBar isNil ifFalse:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
        toolBarVisible := self toolBarVisibleHolder value.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
        toolBarVisible ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
            topOffset := topOffset + toolBar height.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
        ]
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
    bookmarkBar isNil ifFalse:[    
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
        bookmarkBarVisible := self bookmarkBarVisibleHolder value.     
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
        bookmarkBarVisible ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
            h := bookmarkBar height.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
            bookmarkBar layout topOffset:topOffset.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
            bookmarkBar layout bottomOffset:topOffset + h.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
            bookmarkBar container notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
                bookmarkBar containerChangedSize.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
            ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
            topOffset := topOffset + h. 
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
        ]
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    pageContent := self componentAt:#PageContents.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    pageContent notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
        pageContent layout topOffset:topOffset.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
        pageContent container notNil ifTrue:[
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
            pageContent containerChangedSize.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
        ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
    ].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    "Created: / 10-06-2011 / 23:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
!WebBrowserPage methodsFor:'hooks'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
commonPostOpen
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
    self updateToollBarAndBookmarkBarVisibility
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
    "Created: / 11-06-2011 / 00:00:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
!WebBrowserPage methodsFor:'initialization'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
initialize
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
    super initialize.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
    history := NavigationHistory new.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
    "Created: / 08-06-2011 / 12:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
!WebBrowserPage methodsFor:'menu-actions'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
goBack
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
    self switchToHistoryEntry: history goBack
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
    "Created: / 22-02-2008 / 10:16:30 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
    "Modified: / 22-02-2008 / 17:18:43 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
    "Modified: / 08-06-2011 / 14:56:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
goForward
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
    self switchToHistoryEntry: history goForward
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
    "Created: / 22-02-2008 / 10:16:30 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
    "Modified: / 22-02-2008 / 17:18:56 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
    "Modified: / 08-06-2011 / 14:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
switchToHistoryEntry: bookmark
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
    self urlHolder value: bookmark url
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
    "Created: / 08-06-2011 / 15:01:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
!WebBrowserPage methodsFor:'menu-dynamic'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
goBackMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
    <resource: #programMenu>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
    | menu |
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
    menu := Menu new.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
    history goBackItems do:
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
        [:historyEntry|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
        menu addItem:
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
            (MenuItem new
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
                label: historyEntry label;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
                value:[self switchToHistoryEntry: historyEntry])].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   628
    ^menu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   629
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    "Created: / 22-02-2008 / 16:55:18 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
    "Modified: / 27-02-2008 / 11:54:08 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
    "Modified: / 08-06-2011 / 15:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   634
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
goForwardMenu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   636
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   637
    <resource: #programMenu>
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   638
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   639
    | menu |
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   640
    menu := Menu new.
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   641
    history goForwardItems do:
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   642
        [:historyEntry|
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   643
        menu addItem:
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
            (MenuItem new
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
                label: historyEntry label;
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
                value:[self switchToHistoryEntry: historyEntry])].
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
    ^menu
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
    "Created: / 22-02-2008 / 16:55:18 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
    "Modified: / 27-02-2008 / 11:54:27 / janfrog"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
    "Modified: / 08-06-2011 / 15:01:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
! !
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
!WebBrowserPage class methodsFor:'documentation'!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
version_CVS
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
    ^ '$Header: /cvs/stx/stx/libtool/Tools__WebBrowserPage.st,v 1.1 2011-07-01 13:13:38 cg Exp $'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
!
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
version_SVN
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
    ^ '§Id§'
88b490b5e9bd initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   662
! !