new Desktop::Editor
- From: Martijn van Beers <martijn earthling net>
- To: gnome-components-list gnome org
- Cc: gnome-hackers nuclecu unam mx, gnome-devel-list gnome org
- Subject: new Desktop::Editor
- Date: Tue, 21 Sep 1999 02:09:50 +0200
Hi,
I finally came up with a new Desktop::Editor interface that
will hopefully comply with everybody's wishes.
* It uses the Persist interfaces from bonobo
* it lets you edit without showing a window
* It still has the ui stuff because I think that will be
useful for for example mail-editors or ide-editors.
* EditorStream has a search interface so you don't have
to transfer all the text just to search. (this is not
an UI function ;)
eagerly awaiting your comments/questions/flames/praise, :)
Martijn
P.S. sorry for CC'ing to several lists, but I don't know
who is on what list, and I want a lot of people to see
and comment on this.
---
#ifndef __DESKTOP_EDITOR_IDL__
#define __DESKTOP_EDITOR_IDL__
module Desktop {
/* This interface is intended as an add-on to GNOME::Stream
*/
interface EditorStream : GNOME::Unknown {
typedef long SearchOption;
/* whether the search-string is a regexp */
const SearchOption SEARCH_REGEX = 1;
/* whether to ignore case while searching */
const SearchOption SEARCH_ICASE = 2;
/* whether to search backwards */
const SearchOption SEARCH_REVERSE = 4;
/**
* search:
* @regexp: the string or POSIX regexp to find
* @whence: scroll from where
* @flags: Options modifying the search
*
* lets you search for a string in the stream. The read/write
* pointer for the Stream is set to the position of the
* found string. The search-string can optionally be a
* regular expression (Editors do not have to support this)
*
* Returns TRUE if there was a match and FALSE if there wasn't
*/
boolean search (in string regexp,
in SEEKFROM whence,
in SearchOption flags);
}
/* This interface should also implement the GNOME::PersistFile
* and GNOME::PersistStream interfaces
*/
interface Editor : GNOME::Unknown {
/* whether the file is visible in any window */
attribute boolean visible;
/**
* access_as_stream:
*
* Returns a GNOME::Stream/Desktop::EditorStream hybrid object
* through which you can * manipulate the contents of the editor.
*/
Object access_as_stream (void);
/**
* scroll_pos:
* @offset: how much to scroll
* @whence: scroll from where
*
* This method allows you change the position of the cursor
* in the editor window on a character basis.
*/
void scroll_pos (in long offset,
in SEEKFROM whence) raises OutOfRange);
/**
* scroll_pos:
* @offset: how much to scroll
* @whence: scroll from where
*
* This method allows you change the position of the cursor
* in the editor window on a line basis.
*/
void scroll_line (in long offset,
in SEEKFROM whence) raises (OutOfRange);
};
};
--
Martijn van Beers <martijn@earthling.net>
'Don't worry if it sounds odd. Believe me, you are talking to
someone who has seen a lot of stuff that is odd. And I don't
mean biscuits.' --- Arthur Dent
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]