Re: [gedit-list] =?windows-1252?q?I_don=27t_understand_the_function_o?= =?windows-1252?q?f_REAL_and_VIRTUAL_document_and_view=85_in_Gedit_?= =?windows-1252?q?=22multiviews=22_branch?=

The main reason for this is that I am binding properties and signals between 2 views/docs.

So think that the current opened document where you want to make the split is the REAL document/view
and the one splitted (the new document) is the virtual document. We need these to know the documents/views

On Tue, Nov 10, 2009 at 10:23 AM, Klein Stéphane <stephane harobed org> wrote:

I study the source code of Gedit "multiviews" branch (

I don't understang the function of REAL and VIRTUAL document and view…

Example :


A simple enum.

   typedef struct _Binding
       GeditDocument      *docs[N_STATES];
       GtkWidget              *views[N_STATES];

       gulong                  insert_text_id[N_STATES];
       gulong                  delete_range_id[N_STATES];

       GeditDataBinding       *bindings[LAST_PROPERTY];
   } Binding;

The binding structure, here is where it is saved the bindings and the gulongs for the signals, insert-text,
delete-range and of course are saved the 2 docs and the 2 views.

   typedef struct _VirtualDocument
       GList                  *bindings; /* List of Binding */
   } VirtualDocument;

This structure is to manage several bindings, so in this way we can have several splits of the same
document. Have a look at the split function to know how things work.

   typedef struct _DestroyData
       GtkWidget *view;
       VirtualDocument *vdoc;
   } DestroyData;

And this is of course the data used to free all the stuff.

Can you write some information about this part ?

Thanks for your help,

gedit-list mailing list
gedit-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]