Results 1 to 6 of 6

Thread: Ice with GUI

  1. #1
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100

    Ice with GUI

    I am using Ice with Gtk. I have my GUI running in its own thread; it reads a mutex protected queue on every idle event. When other threads want to update the GUI, they dump a function object on the thread (and so on, active object pattern). This works pretty well, but I'm wondering if I can use an Ice::Connection somehow to hook Ice into the Gtk main loop. This would make networked GUI clients a lot easier to write...
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    No, this is not possible. Ice is inherently multi-threaded, and doesn't have any kind of "main loop".

  3. #3
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100
    Have you guys done any work with X Windows type GUI's?
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  4. #4
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    You mean in combination with Ice? We used Qt from Trolltech in one project. This was under Windows, but it was supposedly portable to X11 as well. Most of us have some experience with X11 from former (non-Ice) projects.

  5. #5
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100
    Yes. How did you handle the threading?
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  6. #6
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    We used the same pattern that you use, that is, have the dispatch threads that trigger GUI activity pass function objects to the main thread.

    For long-running client->server invocations, we used a separate thread to send requests (so that the GUI does not block), and had the GUI main thread pass a function object to this thread.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ice 3.4.0 and GUI QT library
    By marcel in forum Bug Reports
    Replies: 2
    Last Post: 03-11-2010, 06:08 PM
  2. Replies: 3
    Last Post: 05-30-2009, 12:23 AM
  3. IceStorm with GUI Excel
    By Malin in forum Help Center
    Replies: 1
    Last Post: 01-11-2007, 01:57 PM
  4. Ice::Thread and GUI with Qt
    By catalin in forum Help Center
    Replies: 5
    Last Post: 09-08-2004, 10:20 AM
  5. Use ice in GUI (with mfc )
    By level in forum Help Center
    Replies: 1
    Last Post: 02-11-2004, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •