1 /* $Id: window.h,v 1.31 2007/03/04 23:26:06 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 GetSelection(Widget widget
, int *left
, int *right
);
49 int GetSimpleSelection(textBuffer
*buf
, int *left
, int *right
);
50 char *GetTextRange(Widget widget
, int left
, int right
);
51 WindowInfo
*FindWindowWithFile(const char *name
, const char *path
);
52 void SetAutoIndent(WindowInfo
*window
, int state
);
53 void SetShowMatching(WindowInfo
*window
, int state
);
54 void SetFonts(WindowInfo
*window
, const char *fontName
, const char *italicName
,
55 const char *boldName
, const char *boldItalicName
);
56 void SetColors(WindowInfo
*window
, const char *textFg
, const char *textBg
,
57 const char *selectFg
, const char *selectBg
, const char *hiliteFg
,
58 const char *hiliteBg
, const char *lineNoFg
, const char *cursorFg
);
59 void SetOverstrike(WindowInfo
*window
, int overstrike
);
60 void SetAutoWrap(WindowInfo
*window
, int state
);
61 void SetWrapMargin(WindowInfo
*window
, int margin
);
62 void SetAutoScroll(WindowInfo
*window
, int margin
);
63 void SplitPane(WindowInfo
*window
);
64 Widget
GetPaneByIndex(WindowInfo
*window
, int paneIndex
);
65 int WidgetToPaneIndex(WindowInfo
*window
, Widget w
);
66 void ClosePane(WindowInfo
*window
);
67 int GetShowTabBar(WindowInfo
*window
);
68 void ShowTabBar(WindowInfo
*window
, int state
);
69 void ShowStatsLine(WindowInfo
*window
, int state
);
70 void ShowISearchLine(WindowInfo
*window
, int state
);
71 void TempShowISearch(WindowInfo
*window
, int state
);
72 void ShowLineNumbers(WindowInfo
*window
, int state
);
73 void SetModeMessage(WindowInfo
*window
, const char *message
);
74 void ClearModeMessage(WindowInfo
*window
);
75 WindowInfo
*WidgetToWindow(Widget w
);
76 void AddSmallIcon(Widget shell
);
77 void SetTabDist(WindowInfo
*window
, int tabDist
);
78 void SetEmTabDist(WindowInfo
*window
, int emTabDist
);
79 int CloseAllDocumentInWindow(WindowInfo
*window
);
80 WindowInfo
*CreateDocument(WindowInfo
*shellWindow
, const char *name
,
81 char *geometry
, int iconic
);
82 WindowInfo
*TabToWindow(Widget tab
);
83 void RaiseDocument(WindowInfo
*window
);
84 void RaiseDocumentWindow(WindowInfo
*window
);
85 void RaiseFocusDocumentWindow(WindowInfo
*window
, Boolean focus
);
86 WindowInfo
*MarkLastDocument(WindowInfo
*window
);
87 WindowInfo
*MarkActiveDocument(WindowInfo
*window
);
88 void NextDocument(WindowInfo
*window
);
89 void PreviousDocument(WindowInfo
*window
);
90 void LastDocument(WindowInfo
*window
);
91 int NDocuments(WindowInfo
*window
);
92 WindowInfo
*MoveDocument(WindowInfo
*toWindow
, WindowInfo
*window
);
93 WindowInfo
*DetachDocument(WindowInfo
*window
);
94 void MoveDocumentDialog(WindowInfo
*window
);
95 WindowInfo
* GetTopDocument(Widget w
);
96 Boolean
IsTopDocument(const WindowInfo
*window
);
97 int IsIconic(WindowInfo
*window
);
98 int IsValidWindow(WindowInfo
*window
);
99 void RefreshTabState(WindowInfo
*window
);
100 void ShowWindowTabBar(WindowInfo
*window
);
101 void RefreshMenuToggleStates(WindowInfo
*window
);
102 void RefreshWindowStates(WindowInfo
*window
);
103 void AllWindowsBusy(const char* message
);
104 void AllWindowsUnbusy(void);
105 void SortTabBar(WindowInfo
*window
);
106 void SetBacklightChars(WindowInfo
*window
, char *applyBacklightTypes
);
107 void SetToggleButtonState(WindowInfo
*window
, Widget w
, Boolean state
,
109 void SetSensitive(WindowInfo
*window
, Widget w
, Boolean sensitive
);
110 void CleanUpTabBarExposeQueue(WindowInfo
*window
);
111 #endif /* NEDIT_WINDOW_H_INCLUDED */