[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n
Subject:    draft+thoughts
From:       Simon Hausmann <tronical () gmx ! net>
Date:       1999-02-20 21:24:57
[Download RAW message or body]

Hi,

I finished writing a draft of the new Konqueror interfaces and I tried to
explain some things in regard to the a-common-gui-for-Konqueror problem.

Please let me know what you think of it, what you think is perhaps missing or
what is actually wrong (it can be easily possible that I forgot something or
there's a fundamental error in my thoughts).

Thanks :-)

Bye,
 Simon

P.S.: Don't expect any mails from me before Wednesday, because I'm on a kind of
       vacation.

--
Simon Hausmann - Tronical^Colorfast - <tronical@gmx.net> - IRCNet #colorfast

we have joy, we have fun, we have linux on our sun

["konqueror.idl" (text/x-c)]

#ifndef __konqueror_idl__
#define __konqueror_idl__

#include <kom.idl>
#include <openparts.idl>
#include <openparts_ui.idl>

module Konqueror
{

  const string eventCreateViewGUIMenuBar = "Konqueror/GUI/createMenuBar";
  const string eventCreateViewGUIToolBar = "Konqueror/GUI/createToolBar";

  interface View;
  
  interface GUI : KOM::Base
  {
    void setGUIPart( in OpenParts::Part part );
    
    void addGUIClient( in View view );
    void removeGUIClient( in View view );
  };

  struct EventOpenURL
  {
    string url;
  };
  const string eventOpenURL = "Konqueror/OpenURL";

  interface View : OpenParts::Part
  {
    /*
     * A full featured Konqueror View has to
     *  (1) map the eventOpenURL event (which has a
     *      structure EventOpenURL as parameter)
     *  (2) implement/emit the following signals:
     *      - signal void started( in string url );
     *      - signal void completed();
     */

    string url();
    
    void stop();
    
    /*
     * setStatusBar is called by the assigned GUI in order to give
     * a view access to the statusbar.
     * (do not register "yourself" as new client by the mainwindow's 
     *  statusbar manager)
     */
    void setStatusBar( in OpenPartsUI::StatusBar statusBar );
  };

  interface IconView : View
  {
  };
  
  interface HTMLView : View
  {
  };
  
  interface TreeView : View
  {
  };
  
  interface PartView : View
  {
    void setPart( in OpenParts::Part part );
    OpenParts::Part part();
  };
    
  interface MainView : OpenParts::Part
  {
    long insertView( in View view );
    View view( in long id );
    void removeView( in long id );
  };
  
  interface MainWindow : OpenParts::MainWindow
  {
  };
  
  interface Application : OpenParts::Application
  {
    GUI createKonquerorGUI();
    
    MainView createMainView();
    IconView createIconView();
    HTMLView createHTMLView();
    TreeView createTreeView();
    PartView createPartView();
  };
  
};

#endif

["INTERNALS" (text/english)]


 (1) the main view
-------------------

This is what happens when a view gets embedded into a Konqueror Main View:

First of all the view gets the main view assigned as part parent. This will
notify the main view (=parent) instead of notifying the mainwindow when the
view (=child part) gets activated. This event (OpenParts::eventChildGotFocus)
is filtered by the main view's GUI (implementation of the Konqueror::GUI 
interface) which will then send two events to the view 
(eventCreateViewGUIMenuBar and eventCreateViewGUIToolBar) . These events
should be mapped by the view thus giving the view a chance to provide view
specific entries in the menubar/toolbar.
In addition when the view gets registered by the main view's GUI the GUI
implementation will call the setStatusBar method of the view in order to
give the view access to the main view GUI's statusbar.

 (2) how to embedd a konqueror view in your application
--------------------------------------------------------

In order to give the view the GUI of Konqueror you will have to call the
createKonquerorGUI method of Konqueror::Application to get an implementation
of the GUI interface. Them you have to call the GUI's setGUIPart method with
the view as argument to tell the GUI where to filter the part menubar/toolbar
creation events from. In addition you have to call the addGUIClient method
in order to let the GUI send the two ViewGUI events to give the view a chance
to provide view specific entries in the menubar/toolbar when the part gets
activated.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic