1 /* $Id: window.h,v 1.33 2008/01/04 22:11:05 yooden Exp $ */
2 /*******************************************************************************
4 * window.h -- Nirvana Editor Window header file *
6 * Copyright 2004 The NEdit Developers *
8 * This is free software; you can redistribute it and/or modify it under the *
9 * terms of the GNU General Public License as published by the Free Software *
10 * Foundation; either version 2 of the License, or (at your option) any later *
11 * version. In addition, you may distribute versions of this program linked to *
12 * Motif or Open Motif. See README for details. *
14 * This software is distributed in the hope that it will be useful, but WITHOUT *
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
19 * You should have received a copy of the GNU General Public License along with *
20 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *
21 * Place, Suite 330, Boston, MA 02111-1307 USA *
23 * Nirvana Text Editor *
26 *******************************************************************************/
28 #ifndef NEDIT_WINDOW_H_INCLUDED
29 #define NEDIT_WINDOW_H_INCLUDED
34 #include <X11/Intrinsic.h>
36 void AttachSessionMgrHandler(Widget appShell
);
37 WindowInfo
*CreateWindow(const char *title
, char *geometry
, int iconic
);
38 void CloseWindow(WindowInfo
*window
);
40 void UpdateWindowTitle(const WindowInfo
*window
);
41 void UpdateWindowReadOnly(WindowInfo
*window
);
42 void UpdateStatsLine(WindowInfo
*window
);
43 void UpdateWMSizeHints(WindowInfo
*window
);
44 void UpdateMinPaneHeights(WindowInfo
*window
);
45 void UpdateNewOppositeMenu(WindowInfo
*window
, int openInTab
);
46 void SetWindowModified(WindowInfo
*window
, int modified
);
47 void MakeSelectionVisible(WindowInfo
*window
, Widget textPane
);
48 int GetSimpleSelection(textBuffer
*buf
, int *left
, int *right
);
49 WindowInfo
*FindWindowWithFile(const char *name
, const char *path
);
50 void SetAutoIndent(WindowInfo
*window
, int state
);
51 void SetShowMatching(WindowInfo
*window
, int state
);
52 void SetFonts(WindowInfo
*window
, const char *fontName
, const char *italicName
,
53 const char *boldName
, const char *boldItalicName
);
54 void SetColors(WindowInfo
*window
, const char *textFg
, const char *textBg
,
55 const char *selectFg
, const char *selectBg
, const char *hiliteFg
,
56 const char *hiliteBg
, const char *lineNoFg
, const char *cursorFg
);
57 void SetOverstrike(WindowInfo
*window
, int overstrike
);
58 void SetAutoWrap(WindowInfo
*window
, int state
);
59 void SetAutoScroll(WindowInfo
*window
, int margin
);
60 void SplitPane(WindowInfo
*window
);
61 Widget
GetPaneByIndex(WindowInfo
*window
, int paneIndex
);
62 int WidgetToPaneIndex(WindowInfo
*window
, Widget w
);
63 void ClosePane(WindowInfo
*window
);
64 int GetShowTabBar(WindowInfo
*window
);
65 void ShowTabBar(WindowInfo
*window
, int state
);
66 void ShowStatsLine(WindowInfo
*window
, int state
);
67 void ShowISearchLine(WindowInfo
*window
, int state
);
68 void TempShowISearch(WindowInfo
*window
, int state
);
69 void ShowLineNumbers(WindowInfo
*window
, int state
);
70 void SetModeMessage(WindowInfo
*window
, const char *message
);
71 void ClearModeMessage(WindowInfo
*window
);
72 WindowInfo
*WidgetToWindow(Widget w
);
73 void AddSmallIcon(Widget shell
);
74 void SetTabDist(WindowInfo
*window
, int tabDist
);
75 void SetEmTabDist(WindowInfo
*window
, int emTabDist
);
76 int CloseAllDocumentInWindow(WindowInfo
*window
);
77 WindowInfo
* CreateDocument(WindowInfo
* shellWindow
, const char* name
);
78 WindowInfo
*TabToWindow(Widget tab
);
79 void RaiseDocument(WindowInfo
*window
);
80 void RaiseDocumentWindow(WindowInfo
*window
);
81 void RaiseFocusDocumentWindow(WindowInfo
*window
, Boolean focus
);
82 WindowInfo
*MarkLastDocument(WindowInfo
*window
);
83 WindowInfo
*MarkActiveDocument(WindowInfo
*window
);
84 void NextDocument(WindowInfo
*window
);
85 void PreviousDocument(WindowInfo
*window
);
86 void LastDocument(WindowInfo
*window
);
87 int NDocuments(WindowInfo
*window
);
88 WindowInfo
*MoveDocument(WindowInfo
*toWindow
, WindowInfo
*window
);
89 WindowInfo
*DetachDocument(WindowInfo
*window
);
90 void MoveDocumentDialog(WindowInfo
*window
);
91 WindowInfo
* GetTopDocument(Widget w
);
92 Boolean
IsTopDocument(const WindowInfo
*window
);
93 int IsIconic(WindowInfo
*window
);
94 int IsValidWindow(WindowInfo
*window
);
95 void RefreshTabState(WindowInfo
*window
);
96 void ShowWindowTabBar(WindowInfo
*window
);
97 void RefreshMenuToggleStates(WindowInfo
*window
);
98 void RefreshWindowStates(WindowInfo
*window
);
99 void AllWindowsBusy(const char* message
);
100 void AllWindowsUnbusy(void);
101 void SortTabBar(WindowInfo
*window
);
102 void SetBacklightChars(WindowInfo
*window
, char *applyBacklightTypes
);
103 void SetToggleButtonState(WindowInfo
*window
, Widget w
, Boolean state
,
105 void SetSensitive(WindowInfo
*window
, Widget w
, Boolean sensitive
);
106 void CleanUpTabBarExposeQueue(WindowInfo
*window
);
107 #endif /* NEDIT_WINDOW_H_INCLUDED */