UNIXworkcode

1 /******************************************************************************* 2 * * 3 * window.h -- Nirvana Editor Window header file * 4 * * 5 * Copyright 2004 The NEdit Developers * 6 * * 7 * This is free software; you can redistribute it and/or modify it under the * 8 * terms of the GNU General Public License as published by the Free Software * 9 * Foundation; either version 2 of the License, or (at your option) any later * 10 * version. In addition, you may distribute versions of this program linked to * 11 * Motif or Open Motif. See README for details. * 12 * * 13 * This software is distributed in the hope that it will be useful, but WITHOUT * 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 16 * more details. * 17 * * 18 * You should have received a copy of the GNU General Public License along with * 19 * software; if not, write to the Free Software Foundation, Inc., 59 Temple * 20 * Place, Suite 330, Boston, MA 02111-1307 USA * 21 * * 22 * Nirvana Text Editor * 23 * July 31, 2001 * 24 * * 25 *******************************************************************************/ 26 27 #ifndef NEDIT_WINDOW_H_INCLUDED 28 #define NEDIT_WINDOW_H_INCLUDED 29 30 #include "nedit.h" 31 #include "textBuf.h" 32 33 #include <X11/Intrinsic.h> 34 35 void LoadColorProfileResources(Display *display, ColorProfile *profile); 36 void AttachSessionMgrHandler(Widget appShell); 37 WindowInfo *CreateWindow(const char *title, char *geometry, int iconic); 38 void CloseWindow(WindowInfo *window); 39 int NWindows(void); 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, IndentStyle state); 51 void SetShowMatching(WindowInfo *window, ShowMatchingStyle state); 52 void SetFonts(WindowInfo *window, const char *fontName, const char *italicName, 53 const char *boldName, const char *boldItalicName); 54 void SetColorProfile(WindowInfo *window, ColorProfile *profile); 55 void LoadColorProfile(Widget w, ColorProfile *profile); 56 void EnableWindowResourceDB(const WindowInfo *window); 57 void SetOverstrike(WindowInfo *window, int overstrike); 58 void SetAutoWrap(WindowInfo *window, WrapStyle 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 ShowEncodingInfoBar(WindowInfo *window, int state); 71 void SetEncodingInfoBarLabel(WindowInfo *window, char *message); 72 void SetModeMessage(WindowInfo *window, const char *message); 73 void ClearModeMessage(WindowInfo *window); 74 WindowInfo *WidgetToWindow(Widget w); 75 void AddSmallIcon(Widget shell); 76 void SetTabDist(WindowInfo *window, int tabDist); 77 void SetEmTabDist(WindowInfo *window, int emTabDist); 78 int CloseAllDocumentInWindow(WindowInfo *window); 79 WindowInfo* CreateDocument(WindowInfo* shellWindow, const char* name); 80 WindowInfo *TabToWindow(Widget tab); 81 void RaiseDocument(WindowInfo *window); 82 void RaiseDocumentWindow(WindowInfo *window); 83 void RaiseFocusDocumentWindow(WindowInfo *window, Boolean focus); 84 WindowInfo *MarkLastDocument(WindowInfo *window); 85 WindowInfo *MarkActiveDocument(WindowInfo *window); 86 void NextDocument(WindowInfo *window); 87 void PreviousDocument(WindowInfo *window); 88 void LastDocument(WindowInfo *window); 89 int NDocuments(WindowInfo *window); 90 int NUnsavedDocuments(WindowInfo *window); 91 WindowInfo *MoveDocument(WindowInfo *toWindow, WindowInfo *window); 92 WindowInfo *DetachDocument(WindowInfo *window); 93 void MoveDocumentDialog(WindowInfo *window); 94 WindowInfo* GetTopDocument(Widget w); 95 Boolean IsTopDocument(const WindowInfo *window); 96 int IsIconic(WindowInfo *window); 97 int IsValidWindow(WindowInfo *window); 98 void RefreshTabState(WindowInfo *window); 99 void ShowWindowTabBar(WindowInfo *window); 100 void RefreshMenuToggleStates(WindowInfo *window); 101 void RefreshWindowStates(WindowInfo *window); 102 void AllWindowsBusy(const char* message); 103 void AllWindowsUnbusy(void); 104 void SortTabBar(WindowInfo *window); 105 void SwitchTabs(Widget from, Widget to); 106 void SetHighlightCursorLine(WindowInfo *window, Boolean state); 107 void SetIndentRainbow(WindowInfo *window, Boolean state); 108 void SetAnsiColors(WindowInfo *window, Boolean state); 109 void SetBacklightChars(WindowInfo *window, char *applyBacklightTypes); 110 void SetToggleButtonState(WindowInfo *window, Widget w, Boolean state, 111 Boolean notify); 112 void SetSensitive(WindowInfo *window, Widget w, Boolean sensitive); 113 void CleanUpTabBarExposeQueue(WindowInfo *window); 114 void SetEncoding(WindowInfo *window, const char *encoding); 115 void SetFilter(WindowInfo *window, const char *filter); 116 void SetZoom(WindowInfo *window, int step); 117 void SetEncErrors(WindowInfo *window, EncError *errors, size_t numErrors); 118 void ReloadWindowResources(WindowInfo *window, Boolean updateMenuBar); 119 #endif /* NEDIT_WINDOW_H_INCLUDED */ 120