medit/moo/mooedit/mooedit-private.h

79 lines
2.8 KiB
C
Raw Normal View History

2006-05-21 18:11:05 -05:00
/*
2005-09-06 16:21:05 +00:00
* mooedit-private.h
2005-06-22 18:20:32 +00:00
*
2010-12-21 20:15:45 -08:00
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
2005-06-22 18:20:32 +00:00
*
* This file is part of medit. medit is free software; you can
* redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License,
* or (at your option) any later version.
2005-06-22 18:20:32 +00:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
2005-07-24 04:58:57 +00:00
*/
2005-06-22 18:20:32 +00:00
2016-01-03 05:13:00 -08:00
#pragma once
2005-06-22 18:20:32 +00:00
2010-02-01 22:44:03 -08:00
#include "mooedit/mooedit-impl.h"
2011-01-18 01:16:25 -08:00
#include "mooedit/mooeditprogress.h"
2016-01-01 22:25:53 -08:00
#include "moocpp/strutils.h"
2015-12-31 04:53:46 -08:00
#include "moocpp/utils.h"
2016-01-01 23:38:51 -08:00
#include "moocpp/gobjptrtypes.h"
2005-06-22 18:20:32 +00:00
2008-09-15 03:59:22 -05:00
#define MOO_EDIT_IS_UNTITLED(edit) (!(edit)->priv->file)
2010-12-12 02:29:20 -08:00
struct MooEditPrivate {
2015-12-31 16:41:12 -08:00
MooEditPrivate();
2015-12-31 04:53:46 -08:00
~MooEditPrivate();
2016-01-03 05:13:00 -08:00
MooEditor* editor;
2011-01-17 03:01:11 -08:00
2016-01-03 05:13:00 -08:00
moo::gobjptr<GtkTextBuffer> buffer;
std::vector<moo::gobjptr<MooEditView>> views;
moo::gobjref<MooEditView> active_view;
bool dead_active_view;
2005-06-22 18:20:32 +00:00
2016-01-03 05:13:00 -08:00
gulong changed_handler_id;
gulong modified_changed_handler_id;
guint apply_config_idle;
bool in_recheck_config;
2005-06-22 18:20:32 +00:00
/***********************************************************************/
/* Document
2006-12-04 04:54:12 -06:00
*/
2016-01-03 05:13:00 -08:00
moo::gobjptr<GFile> file;
moo::gstr filename;
moo::gstr norm_name;
moo::gstr display_filename;
moo::gstr display_basename;
2005-06-22 18:20:32 +00:00
2016-01-03 05:13:00 -08:00
moo::gstr encoding;
MooLineEndType line_end_type;
MooEditStatus status;
2005-06-22 18:20:32 +00:00
2016-01-03 05:13:00 -08:00
guint file_monitor_id;
bool modified_on_disk;
bool deleted_from_disk;
// file sync event source ID
2016-01-03 05:13:00 -08:00
guint sync_timeout_id;
2016-01-03 05:13:00 -08:00
MooEditState state;
MooEditProgress* progress;
2011-01-18 01:16:25 -08:00
/***********************************************************************/
/* Bookmarks
2006-12-04 04:54:12 -06:00
*/
2016-01-03 05:13:00 -08:00
GSList* bookmarks; /* sorted by line number */
guint update_bookmarks_idle;
bool enable_bookmarks;
2006-04-20 03:57:05 -05:00
/***********************************************************************/
/* Actions
2006-12-04 04:54:12 -06:00
*/
2016-01-03 05:13:00 -08:00
MooActionCollection* actions;
};
2010-12-18 23:58:18 -08:00
void _moo_edit_remove_untitled (MooEdit *doc);