/usr/include/vdkb2/vdkb.h is in vdkbuilder2 2.4.0-4.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | /*
* ===========================
* VDK Builder
* Version 0.1
* Revision 0.0
* November 1998
* ===========================
*
* Copyright (C) 1998,1999 Mario Motta
* Developed by Mario Motta <mmotta@guest.net>
*
* Based on VDK Library
* Copyright (C) 1998, Mario Motta
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
*/
#ifndef _vdkbuilder_h
#define _vdkbuilder_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if USE_XDB
#include <vdkxdb2/vdkxdb.h>
#include <vdkxdb2/vdkxtable.h>
#endif
#if HAVE_GNOME
#include <vdk/vdkgnomeapp.h>
#endif
#include <vdk/vdk.h>
#include <vdkb2/vdkb_types.h>
#include <vdkb2/vdkb_logo.h>
#include <vdkb2/vdkb_editor.h>
#include <vdkb2/vdkb_prjman.h>
#include <vdkb2/vdkb_ide_def.h>
#include <vdkb2/vdkb_maker.h>
#include <vdkb2/vdkb_plugin.h>
#include <vdk/panelbar.h>
#include <vdkb2/vdkb_frmlist.h>
#include <vdkb2/vdkb_compodb.h>
#include <vdkb2/vdkb_lru.h>
#include <sys/types.h>
/*
AUTOMA STATES
*/
enum
{
automa_error = -1,
automa_end = 0,
automa_init,
automa_editor_on,
automa_editor_off,
automa_prjman_on,
automa_prjman_off,
automa_edit_form_on,
automa_edit_form_off
};
// not more used
#define MAIN_PROGRESS_BLOCK 30
/*
drag and drop sources table
contains:
object: drag source widget
classid: drag source widget class id
used to set OperationalState.action_target
to the proper id as is done by pressing
a widget toolbar button
*/
class DnDBuilderEntry
{
public:
VDKObject* object;
int classid;
DnDBuilderEntry(VDKObject* object = NULL, int classid = -1):
object(object),classid(classid) {}
~DnDBuilderEntry() {}
bool operator == (DnDBuilderEntry& entry)
{ return object == entry.object; }
};
/*
completions, code templates and hints
*/
typedef VDKValueList<DnDBuilderEntry> DnDBuilderList;
typedef VDKValueListIterator<DnDBuilderEntry> DnDBuilderListIterator;
typedef VDKValueList<VDKString> TokenList;
typedef VDKValueListIterator<VDKString> TokenListIterator;
/*
hint class
*/
class VDKHint
{
public:
VDKString key,hint;
VDKHint(): key((char*) ""),hint((char*) "") { }
VDKHint(char* k, char* h): key(k),hint(h) { }
~VDKHint() { }
VDKHint(VDKHint& h) { key = h.key; hint = h.hint; }
VDKHint& operator=(VDKHint& h)
{ key = h.key; hint = h.hint; return *this;
}
bool operator==(VDKHint& h)
{
return key == h.key;
}
bool operator<(VDKHint& h)
{
return key < h.key;
}
};
typedef VDKBtree<VDKHint> HintBTree;
//////////////////////////////////
// VDKBUILDER MAIN FORM
/////////////////////////////////
typedef VDKArray<VDKMenuItem*> LRUItemsArray;
class VDKBMainForm: public VDKForm
{
private:
VDKBLogo *logo;
//VDKTimer *timer;
VDKPoint _defSize;
// for mozilla
pid_t mozpid;
int mozstatus;
// members
protected:
// main menu stuff
VDKMenubar *menubar;
VDKMenuItem *file_menu;
VDKMenuItem *new_item,*open_item,*reopen_item,
*save_item,*saveall_item,*quit_item;
// an array of last recently used projects menu items
LRUItemsArray lru_items;
LRUManager* lrumanager;
VDKMenuItem *newform_item,
*newunit_item,*newprj_item;
VDKMenu *newformmenu,*reopenmenu;
VDKMenuItem *newformdefault_item,
*newformscrolled_item,* newformpaned_item;
VDKMenuItem *openfile_item,
*openunit_item,*openprj_item;
VDKMenuItem *edit_menu;
VDKMenuItem *search_menu,
*search_item,*repeat_search_item,*replace_item;
VDKMenuItem *view_menu;
VDKMenuItem *viewunits_item, *viewforms_item;
VDKMenuItem *prj_menu;
VDKMenuItem *prjmake_item,
*prjmakeclean_item,
*prjoptions_item,
*prjdebug_item;
VDKMenuItem *compo_menu,*edhint_item;
VDKMenuItem *tools_menu,*envset_item,*exec_item,*xdb_menuitem;
#if USE_XDB
VDKMenu *xdb_menu;
VDKMenuItem *xdb_opentables;
#endif
VDKMenuItem *ac_menu;
VDKMenuItem *ac_autogen,*ac_make,*ac_makeclean,
*ac_makedist,*ac_makedistclean;
VDKMenuItem *help_menu;
VDKMenuItem *help_index,*help_vdk,*help_about;
// VDKToolbar *toolbar1;
VDKHLButton *unitlist_nb,*toggle_nb,*formlist_nb,*runprj_nb;
VDKHLButton *nb_array1[5];
// VDKToolbar *toolbar;
VDKHLButton *newprj_nb, *newunit_nb, *newform_nb,
*loadprj_nb, *loadfile_nb, *saveprj_nb,*savefile_nb;
VDKHLButton *nb_array[8];
// VDKCustomButton *reset,*emacs;
VDKHLButton *reset,*emacs;
VDKNotebook *widget_folder;
// VDKToolbar *text_widgets_bar, *button_widgets_bar,
// *containers_widgets_bar, *misc_widgets_bar,*plugin_widgets_bar;
VDKHLButtonBar *text_widgets_bar, *button_widgets_bar,
*containers_widgets_bar, *misc_widgets_bar,*plugin_widgets_bar;
#if USE_XDB
// VDKToolbar *xdb_widgets_bar;
VDKHLButtonBar *xdb_widgets_bar;
#endif
#if HAVE_GNOME
// VDKToolbar *gnome_widgets_bar;
VDKHLBUttonBar *gnome_widgets_bar;
#endif
// subsystems
VDKBEditor *editor;
VDKBProjectManager *prjman;
VDKBMaker *maker;
VDKBFormListForm* formlistform;
// member functions
protected:
void MakeMainMenu();
VDKBox* MakeToolBox();
// VDKToolbar* MakeContainerWidgetFolder();
VDKHLButtonBar* MakeContainerWidgetFolder();
// VDKToolbar* MakeButtonsWidgetFolder();
VDKHLButtonBar* MakeButtonsWidgetFolder();
// VDKToolbar* MakeTextWidgetFolder();
VDKHLButtonBar* MakeTextWidgetFolder();
// VDKToolbar* MakeMiscWidgetFolder();
VDKHLButtonBar* MakeMiscWidgetFolder();
// VDKToolbar* MakePluginWidgetFolder();
VDKHLButtonBar* MakePluginWidgetFolder();
#if USE_XDB
// VDKToolbar* MakeXdbWidgetFolder();
VDKHLButtonBar* MakeXdbWidgetFolder();
#endif
#if HAVE_GNOME
//VDKToolbar* MakeGnomeWidgetFolder();
VDKHLButtonBar* MakeGnomeWidgetFolder();
#endif
VDKString ToBeToggled; // form/unit to be toggled
// disabled for now
// VDKToolbar* MakeDlgWidgetFolder();
bool ContinueSetup(VDKObject*);
void OnShow(VDKForm* sender);
void OnMove(VDKForm* sender);
void OnResize(VDKForm* sender,VDKPoint& p);
void OnFormActivate(VDKForm* sender, bool in_out);
// response functions
bool Quit(VDKObject*);
bool About(VDKObject*);
bool HandleToolbar(VDKObject*);
bool HandleToolbar1(VDKObject*);
bool HandleContainersWidgetsBar(VDKObject*);
bool HandleButtonsWidgetsBar(VDKObject*);
bool HandleTextWidgetsBar(VDKObject*);
bool HandleAllWidgetsBar(VDKObject*);
bool CanClose();
bool NewUnit(VDKObject*);
bool NewForm(VDKObject*);
bool OpenFile(VDKObject*);
bool OnReopenMenu(VDKObject*);
bool SaveProject(VDKObject*);
bool FileSave(VDKObject*);
bool OpenProject(VDKObject*);
bool ProjectOptions(VDKObject*);
bool Search(VDKObject*);
bool RepeatSearch(VDKObject*);
bool ReplaceText(VDKObject*);
bool SetBuilderEnvironment(VDKObject*);
void OnIconize(VDKForm*);
void OnRestore(VDKForm*);
bool RunDebugger(VDKObject*);
bool RunGrep(VDKObject* sender);
bool OpenHintsEditor(VDKObject* sender);
bool ViewForms(VDKObject* sender);
/* emacs support as external editor */
bool CallEmacsServer(VDKObject*);
/* in vdkb_acsupport.cc */
bool AcAutogen(VDKObject* sender);
bool AcMake(VDKObject* sender);
bool AcMakeClean(VDKObject* sender);
bool AcMakeDist(VDKObject* sender);
bool AcMakeDistclean(VDKObject* sender);
bool VDKBHelp(VDKObject*);
/* xdb support */
#if USE_XDB
bool OnOpenXdbTables(VDKObject* sender);
#endif
//
bool BrowseCompoDb(VDKObject* sender);
//
void CallMaker(char * args[], char* pth,int output);
/*
editor completions, code templates and hints
*/
bool LoadTokens();
bool SaveTokens();
bool LoadHints();
public:
VDKBMainForm(VDKApplication* , gchar* );
~VDKBMainForm();
void Setup();
void OnChildClosing(VDKForm* child);
void Automa(int state = automa_end);
VDKBEditor* MakeEditor();
VDKBEditor* Editor() { return editor; }
LRUManager* LruManager() { return lrumanager; }
bool NewProject(VDKObject*);
VDKBProjectManager * PrjManager() { return prjman; }
VDKBFormListForm* Formlistform() { return formlistform; }
bool Reset(VDKObject*);
// VDKToolbar* Toolbar1() { return toolbar1; }
void EnableToggleFormUnit(bool active, char* file);
bool Make(VDKObject*);
void RunExecutable();
#if HAVE_GNOME
void EnableGnomeWidgets(bool flag);
#endif
// for Mozilla
bool RunMozilla(VDKObject*, char* html);
bool MozillaMourn(VDKObject*);
int MozillaPid() {return mozpid;}
void MozillaPid(int p) {mozpid=p;}
int MozillaStatus() {return mozstatus;}
void MozillaStatus(int p) {mozstatus=p;}
static void MozillaReaper(int);
void LoadEditorWithErrors(VDKBStringList* list);
void UpdateLRU();
bool OnLRUTimer(VDKObject* sender);
DECLARE_SIGNAL_MAP(VDKBMainForm);
DECLARE_SIGNAL_LIST(VDKBMainForm);
};
///////////////////////////////////////
#if HAVE_GNOME
class VDKBuilder: public VDKGnomeApplication
#else
class VDKBuilder: public VDKApplication
#endif
{
protected:
VDKBPluginList plugin_list;
public:
#if USE_XDB
VDKXDatabase* theXdb;
#endif
VDKString user_home,user_cwd;
//
static VDKBDefaults ideDefaults;
VDKBuilder(int* argc, char** argv, char* rc = NULL);
~VDKBuilder();
void Setup();
VDKBPluginList& PluginList() { return plugin_list; }
};
#endif
|