Sha256: c059f146d295e3e639f56ddcd2e5730c41260825108fa5c87a55535d127760bb

Contents?: true

Size: 1.28 KB

Versions: 6

Compression:

Stored size: 1.28 KB

Contents

Shoes.app do 
  stack do
    para "Muliple Monitor Test"
    st = Shoes.settings
    @eb = edit_box width: 400, height: 150
  end
  start do
    st = Shoes.settings
    dflt = st.monitor_default
    @eb.append "Default monitor is #{dflt}\n"
    st.monitor_count.times do |mon|
      @eb.append "Monitor #{mon} => #{st.monitor_geometry(mon)}\n"
    end
    (st.monitor_count- 1).times do |mon|
       flow do 
        newmon = (dflt ^ 1)
        button "New Window on #{newmon}" do
          window title: "Launched in #{newmon}", monitor: newmon do
            stack do
              para "My Monitor is #{app.monitor}"
              button "Dialog" do
                alert "Which Window?"
              end
              button "move down right" do
                x = self.left
                y = self.top
                @eb.append "from: #{x}, #{y}\n"
                self.move x+20, y+20
                x = self.left
                y = self.top
                @eb.append "to:   #{x}, #{y}\n"
              end
              @eb = edit_box width: 300, height: 150
            end
          end
        end
        button "Move This to #{newmon}" do
          app.monitor = newmon
        end
        button "Restore this to #{dflt}" do
         app.monitor = dflt
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb
lacci-0.2.1 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes3-tests/gapp/mon1.rb