#include <gtk/gtk.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include "search.c"
Go to the source code of this file.
Functions | |
void | edit_copy () |
Copy operation is done here. | |
void | edit_cut () |
All menu functions of the C editor are invoked with this function. | |
void | edit_paste () |
Paste operation is done here. | |
void | edit_select () |
select operation is done here | |
void | file_new () |
new file creation | |
void | file_open () |
Opening existing file. | |
void | file_quit () |
Quits the application. | |
void | file_save () |
Saving the file. | |
void | file_saveas () |
Save as operation. | |
void | help_about () |
This describes about the C-editor. | |
void | help_contents () |
Help function is called. | |
void | search_find () |
Find operation is done here. | |
void | search_replace () |
Replace operation is done here. | |
void | show_about (void) |
This tells about the editor. | |
void | show_help (void) |
Explains the functions available. | |
Variables | |
GtkWidget * | entry |
These give entry text. | |
GtkItemFactory * | main_menu |
Creates the main_menu. | |
GtkItemFactoryEntry | menu_def [] |
This is the GtkItemFactoryEntry structure used to generate new menus. | |
GtkWidget * | view |
Creates the text_view. |
void edit_copy | ( | ) |
void edit_cut | ( | ) |
void edit_paste | ( | ) |
void edit_select | ( | ) |
void file_new | ( | ) |
void file_open | ( | ) |
Opening existing file.
Definition at line 125 of file menu.c.
References buf, load_file(), save_if_modified(), and view.
void file_quit | ( | ) |
Quits the application.
Definition at line 158 of file menu.c.
References save_if_modified(), and window.
void file_save | ( | ) |
void file_saveas | ( | ) |
void help_about | ( | ) |
void help_contents | ( | ) |
void search_find | ( | ) |
void search_replace | ( | ) |
Replace operation is done here.
Definition at line 73 of file menu.c.
References text_find_replace().
void show_about | ( | void | ) |
This tells about the editor.
Definition at line 219 of file search.c.
References window1.
Referenced by help_about().
void show_help | ( | void | ) |
Explains the functions available.
Definition at line 245 of file search.c.
References window1.
Referenced by help_contents().
GtkWidget* entry |
These give entry text.
Definition at line 12 of file fileselect.c.
Referenced by file_new(), load_file(), main(), and save_file().
GtkItemFactory* main_menu |
GtkItemFactoryEntry menu_def[] |
Initial value:
{ { (char *)"/_File", NULL, NULL, 0, (char *)"<Branch>", NULL }, { (char *)"/File/_New", (char *)"<control>N", file_new, 0, NULL }, { (char *)"/File/_Open...", (char *)"<control>O", file_open, 0,NULL }, { (char *)"/File/_Save", (char *)"<control>S", file_save,0,NULL }, { (char *)"/File/Save _As...", NULL, file_saveas,0,NULL }, { (char *)"/File/sep", NULL, NULL, 0, (char *)"<Separator>", NULL }, { (char *)"/File/_Quit", (char *)"<control>Q", file_quit, 0,NULL }, { (char *)"/_Edit", NULL, NULL, 0, (char *)"<Branch>", NULL }, { (char *)"/Edit/C_ut", (char *)"<control>X", edit_cut, 0,NULL }, { (char *)"/Edit/_Copy", (char *)"<control>C", edit_copy ,0,NULL }, { (char *)"/Edit/_Paste", (char *)"<control>V", edit_paste, 0,NULL}, { (char *)"/Edit/sep", NULL, NULL, 0, (char *)"<Separator>", NULL }, { (char *)"/Edit/Select All", NULL, edit_select, NULL, NULL }, { (char *)"/_Search", NULL, NULL, 0, (char *)"<Branch>", NULL }, { (char *)"/Search/_Find", (char *)"<control>F" , search_find, 0,NULL }, { (char *)"/Search/_Replace", (char *)"<control>R" , search_replace, 0,NULL }, { (char *)"/_Help", NULL, NULL, 0, (char *)"<Branch>", NULL }, { (char *)"/Help/_Contents", (char *)"<control>H", help_contents,0,NULL }, { (char *)"/Help/_About", NULL , help_about, 0, "<Item>" }, }
Item 1: The menu path. The letter after the underscore indicates an accelerator key once the menu is open. Item 2: The accelerator key for the entry Item 3: The callback function. Item 4: The callback action. This changes the parameters with which the function is called. The default is 0. Item 5: The item type, used to define what kind of an item it is. Here are the possible values:
NULL -> "<Item>" "" -> "<Item>" "<Title>" -> create a title item "<Item>" -> create a simple item "<CheckItem>" -> create a check item "<ToggleItem>" -> create a toggle item "<RadioItem>" -> create a radio item "<path>" -> path of a radio item to link against "<Separator>" -> create a separator "<Branch>" -> create an item to hold sub items (optional) "<LastBranch>" -> create a right justified branch
Definition at line 188 of file menu.c.
Referenced by main().
GtkWidget* view |