Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
863fab113b | |||
83dd23b8a9 | |||
2714560c38 | |||
e48c75df72 | |||
1de1f787e7 | |||
1b3dd3ce98 | |||
0e6c34d2a0 | |||
325034bbc0 | |||
fc9b98f09e | |||
a497b028ca |
4
Makefile
4
Makefile
@@ -53,9 +53,9 @@ DEBUG:=1
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG -DVERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
else
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=3 -DVERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
@@ -37,6 +37,10 @@
|
||||
|
||||
const uint32_t nbLineAllocatedInBase = 300;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
const char * g_pointerForTheDisplayLine[] = {"%1d", "%2d","%3d","%4d","%5d","%6d","%7d","%8d","%9d","%d"};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -236,7 +240,33 @@ void BufferText::DrawLineNumber(DrawerManager &drawer,char *myPrint, int32_t li
|
||||
drawer.Text(myColorManager->Get(COLOR_CODE_LINE_NUMBER), 1, positionY, tmpLineNumber);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Update internal data of the pointer to display
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
/*
|
||||
void BufferText::UpdatePointerNumber(void)
|
||||
{
|
||||
// get the number of line in the buffer
|
||||
int32_t maxNumberLine = m_EdnBuf.NumberOfLines();
|
||||
//int32_t maxNumberLine = 2096;
|
||||
if (10 > maxNumberLine) { m_nbColoneForLineNumber = 1;
|
||||
} else if (100 > maxNumberLine) { m_nbColoneForLineNumber = 2;
|
||||
} else if (1000 > maxNumberLine) { m_nbColoneForLineNumber = 3;
|
||||
} else if (10000 > maxNumberLine) { m_nbColoneForLineNumber = 4;
|
||||
} else if (100000 > maxNumberLine) { m_nbColoneForLineNumber = 5;
|
||||
} else if (1000000 > maxNumberLine) { m_nbColoneForLineNumber = 6;
|
||||
} else if (1000000 > maxNumberLine) { m_nbColoneForLineNumber = 7;
|
||||
} else if (10000000 > maxNumberLine) { m_nbColoneForLineNumber = 8;
|
||||
} else if (100000000 > maxNumberLine) { m_nbColoneForLineNumber = 9;
|
||||
} else { m_nbColoneForLineNumber = 10;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* @brief Display the curent buffer with all the probematic imposed by the xharset and the user contraint.
|
||||
*
|
||||
@@ -842,7 +872,7 @@ void BufferText::cursorMove(int32_t gtkKey)
|
||||
case GDK_Page_Up:
|
||||
# endif
|
||||
//EDN_INFO("keyEvent : <PAGE-UP>");
|
||||
TextDMoveUp(m_displaySize.x);
|
||||
TextDMoveUp(m_displaySize.y);
|
||||
break;
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_Page_Down:
|
||||
@@ -850,7 +880,7 @@ void BufferText::cursorMove(int32_t gtkKey)
|
||||
case GDK_Page_Down:
|
||||
# endif
|
||||
//EDN_INFO("keyEvent : <PAGE-DOWN>");
|
||||
TextDMoveDown(m_displaySize.x);
|
||||
TextDMoveDown(m_displaySize.y);
|
||||
break;
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_Begin:
|
||||
@@ -968,33 +998,47 @@ void BufferText::AddChar(char * UTF8data)
|
||||
m_EdnBuf.Insert(m_cursorPos, tmpVect);
|
||||
SetInsertPosition(m_cursorPos+1, true);
|
||||
} else {
|
||||
if (true == globals::IsSetCtrl() ) {
|
||||
m_cursorPos = m_EdnBuf.UnIndent(SELECTION_PRIMARY);
|
||||
// Indent depend of the multiline in the selection ...
|
||||
// count the number of line :
|
||||
int32_t nbSelectedLines = m_EdnBuf.CountLines(SelectionStart, SelectionEnd);
|
||||
if (0 == nbSelectedLines) {
|
||||
Edn::VectorType<int8_t> tmpVect;
|
||||
tmpVect.PushBack(0x09);
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect);
|
||||
SetInsertPosition(SelectionStart+tmpVect.Size(), true);
|
||||
} else {
|
||||
m_cursorPos = m_EdnBuf.Indent(SELECTION_PRIMARY);
|
||||
if (true == globals::IsSetShift() ) {
|
||||
m_cursorPos = m_EdnBuf.UnIndent(SELECTION_PRIMARY);
|
||||
} else {
|
||||
m_cursorPos = m_EdnBuf.Indent(SELECTION_PRIMARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
actionDone = true;
|
||||
} else if (UTF8data[0] == '\n') {
|
||||
Edn::VectorType<int8_t> tmpVect;
|
||||
tmpVect.PushBack('\n');
|
||||
// if Auto indent Enable ==> we get the start of the previous line and add it to tne new one
|
||||
if (true == globals::IsSetAutoIndent() ) {
|
||||
int32_t l_lineStart;
|
||||
// Get the begin of the line or the begin of the line befor selection
|
||||
if (false == haveSelectionActive) {
|
||||
l_lineStart = m_EdnBuf.StartOfLine(m_cursorPos);
|
||||
} else {
|
||||
l_lineStart = m_EdnBuf.StartOfLine(SelectionStart);
|
||||
}
|
||||
// add same characters in the temporar buffer
|
||||
for (int32_t kk=l_lineStart; kk<m_cursorPos; kk++) {
|
||||
if (' ' == m_EdnBuf[kk]) {
|
||||
tmpVect.PushBack(' ');
|
||||
} else if('\t' == m_EdnBuf[kk]) {
|
||||
tmpVect.PushBack('\t');
|
||||
if (true == globals::IsSetShift()) {
|
||||
tmpVect.PushBack('\r');
|
||||
} else {
|
||||
tmpVect.PushBack('\n');
|
||||
// if Auto indent Enable ==> we get the start of the previous line and add it to tne new one
|
||||
if (true == globals::IsSetAutoIndent() ) {
|
||||
int32_t l_lineStart;
|
||||
// Get the begin of the line or the begin of the line befor selection
|
||||
if (false == haveSelectionActive) {
|
||||
l_lineStart = m_EdnBuf.StartOfLine(m_cursorPos);
|
||||
} else {
|
||||
break;
|
||||
l_lineStart = m_EdnBuf.StartOfLine(SelectionStart);
|
||||
}
|
||||
// add same characters in the temporar buffer
|
||||
for (int32_t kk=l_lineStart; kk<m_cursorPos; kk++) {
|
||||
if (' ' == m_EdnBuf[kk]) {
|
||||
tmpVect.PushBack(' ');
|
||||
} else if('\t' == m_EdnBuf[kk]) {
|
||||
tmpVect.PushBack('\t');
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -339,25 +339,8 @@ gint BufferView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, g
|
||||
//EDN_INFO(" plop %d / %d = %d ==> %d", (uint32_t)event->y, fontHeight, ((uint32_t)event->y / fontHeight), selectBuf);
|
||||
if ( 0 <= selectBuf) {
|
||||
self->SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, selectBuf);
|
||||
/*
|
||||
MainWindows *window = MainWindows::getInstance();
|
||||
EDN_INFO(" Event on Buffer " << selectBuf);
|
||||
// set the new seected Buffer
|
||||
window->SetSelected(selectBuf);
|
||||
*/
|
||||
}
|
||||
}/* else if (event->type == GDK_3BUTTON_PRESS) {
|
||||
EDN_INFO("mouse-event BT1 ==> Triple Clicked");
|
||||
}else if (event->type == GDK_BUTTON_RELEASE) {
|
||||
EDN_INFO("mouse-event BT1 ==> Realease");
|
||||
}*/
|
||||
} else if (event->button == 2) {
|
||||
/*
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
EDN_INFO("mouse-event BT2 PRESS");
|
||||
self->m_menuContext->Show(event->x, event->y, false);
|
||||
}
|
||||
*/
|
||||
} else if (event->button == 3) {
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
EDN_INFO("mouse-event BT3 PRESS");
|
||||
@@ -368,7 +351,8 @@ gint BufferView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, g
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EDN_INFO("mouse-event BT? PRESS");
|
||||
// not usefull to redraw
|
||||
return true;
|
||||
}
|
||||
gtk_widget_queue_draw( widget );
|
||||
return true;
|
||||
|
@@ -85,7 +85,7 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
||||
#else
|
||||
ExitIconeFile = "./data/imagesSources/delete-24px.png";
|
||||
#endif
|
||||
// TODO : find a good way to chenge the size of an image
|
||||
// TODO : find a good way to change the size of an image
|
||||
GtkWidget *myImageQuit = gtk_image_new_from_file(ExitIconeFile.c_str());
|
||||
GtkIconSize mySize = GTK_ICON_SIZE_SMALL_TOOLBAR;
|
||||
//EDN_DEBUG(" plop : " << mySize);
|
||||
@@ -100,9 +100,24 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
||||
|
||||
// add the real menu bar
|
||||
gtk_box_pack_start( GTK_BOX (hboxMenu), m_MenuBar.GetWidget(), FALSE, FALSE, 0);
|
||||
|
||||
GdkColor color;
|
||||
GtkStateType tmpppppp = GTK_STATE_NORMAL;
|
||||
//GtkStateType tmpppppp = GTK_STATE_ACTIVE;
|
||||
//GtkStateType tmpppppp = GTK_STATE_PRELIGHT;
|
||||
//GtkStateType tmpppppp = GTK_STATE_SELECTED;
|
||||
//GtkStateType tmpppppp = GTK_STATE_INSENSITIVE;
|
||||
//gdk_color_parse ("green", &color);
|
||||
//gtk_widget_modify_fg(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||
//gdk_color_parse ("blue", &color);
|
||||
//gtk_widget_modify_bg(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||
gdk_color_parse ("red", &color);
|
||||
gtk_widget_modify_text(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||
//gdk_color_parse ("orange", &color);
|
||||
gtk_widget_modify_base(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||
|
||||
// Add title
|
||||
|
||||
m_internalTitleLabel = gtk_label_new("Edn");
|
||||
gtk_box_pack_start( GTK_BOX (hboxMenu), m_internalTitleLabel, FALSE, FALSE, 0);
|
||||
#endif
|
||||
// **********************************************************
|
||||
// * Horizontal ELEMENTS : *
|
||||
@@ -150,12 +165,20 @@ void MainWindows::SetTitle(Edn::File &fileName, bool isModify)
|
||||
}
|
||||
tmp += "Edn";
|
||||
gtk_window_set_title(GTK_WINDOW(m_mainWindow), tmp.c_str());
|
||||
if (fileName.GetShortFilename() != "") {
|
||||
tmp = fileName.GetFolder();
|
||||
} else {
|
||||
tmp = "Edn";
|
||||
}
|
||||
gtk_label_set_text(GTK_LABEL(m_internalTitleLabel), tmp.c_str());
|
||||
|
||||
}
|
||||
|
||||
void MainWindows::SetNoTitle(void)
|
||||
{
|
||||
Edn::String tmp = "Edn";
|
||||
gtk_window_set_title(GTK_WINDOW(m_mainWindow), tmp.c_str());
|
||||
gtk_label_set_text(GTK_LABEL(m_internalTitleLabel), tmp.c_str());
|
||||
}
|
||||
|
||||
void MainWindows::OnMessage(int32_t id, int32_t dataID)
|
||||
|
@@ -58,6 +58,7 @@ class MainWindows: public Singleton<MainWindows>, public MsgBroadcast
|
||||
void SetNoTitle(void);
|
||||
// main windows widget :
|
||||
GtkWidget * m_mainWindow;
|
||||
GtkWidget * m_internalTitleLabel;
|
||||
BufferView m_BufferView;
|
||||
CodeView m_CodeView;
|
||||
MenuBar m_MenuBar;
|
||||
|
@@ -187,6 +187,11 @@ class MenuBarMain
|
||||
m_message.PushBack(message);
|
||||
// create ITEM
|
||||
GtkWidget *tmpWidget = gtk_image_menu_item_new_from_stock( title, AccelKey::getInstance()->GetAccel() );
|
||||
GdkColor color;
|
||||
gdk_color_parse ("red", &color);
|
||||
gtk_widget_modify_fg(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||
gtk_widget_modify_bg(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||
gtk_widget_modify_text(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||
// set grisage :
|
||||
gtk_widget_set_sensitive(tmpWidget, enable);
|
||||
// add to the menu :
|
||||
|
@@ -155,54 +155,40 @@ void WindowsManager::OnMessage(int32_t id, int32_t dataID)
|
||||
break;
|
||||
case EDN_MSG__GUI_SHOW_ABOUT:
|
||||
{
|
||||
// dlg to confirm the quit event :
|
||||
GtkWidget *myDialog = gtk_dialog_new_with_buttons("About",
|
||||
NULL,
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_QUIT, GTK_RESPONSE_NO,
|
||||
NULL);
|
||||
// this element did not apear in the miniature of the windows
|
||||
gtk_window_set_skip_pager_hint(GTK_WINDOW(myDialog), TRUE);
|
||||
GtkWidget *myContentArea = gtk_dialog_get_content_area( GTK_DIALOG(myDialog));
|
||||
GtkWidget *myLabel = gtk_label_new("");
|
||||
gtk_label_set_markup (GTK_LABEL (myLabel),
|
||||
"<b>Name :</b> Edn\n"
|
||||
"<b>Version :</b> " VERSION_TAG_NAME "\n"
|
||||
"<b>Build Time :</b> " VERSION_BUILD_TIME "\n\n"
|
||||
"<b>Description :</b> Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n"
|
||||
" Source Code Editor\n\n"
|
||||
"<b>Copyright 2010 Edouard DUPIN, all right reserved</b>\n\n"
|
||||
"<b>Terms of license : </b>\n"
|
||||
"This software is distributed in the hope that it will be useful, but \n"
|
||||
"WITHOUT ANY WARRANTY\n"
|
||||
" <b>You can:</b>\n"
|
||||
" * Redistribute the sources code and binaries.\n"
|
||||
" * Modify the Sources code.\n"
|
||||
" * Use a part of the sources (less than 50%) in an other software,\n"
|
||||
" just write somewhere \"Edn is great\" visible by the user (on \n"
|
||||
" your product or on your website with a link to my page).\n"
|
||||
" * Redistribute the modification only if you want.\n"
|
||||
" * Send me the bug-fix (it could be great).\n"
|
||||
" * Pay me a beer or some other things.\n"
|
||||
" Print the source code on WC paper ...\n"
|
||||
" <b>You can NOT:</b>\n"
|
||||
" * Earn money with this Software (But I can).\n"
|
||||
" * Add malware in the Sources.\n"
|
||||
" * Do something bad with the sources.\n"
|
||||
" * Use it to travel in the space with a toaster.\n"
|
||||
"I reserve the right to change this licence. If it change the version of \n"
|
||||
"the copy you have keep its own license.\n\n"
|
||||
"<b>Sources : </b> git://github.com/HeeroYui/edn.git ");
|
||||
gtk_box_pack_start(GTK_BOX(myContentArea), myLabel, TRUE, TRUE, 0);
|
||||
|
||||
gtk_widget_show_all(myContentArea);
|
||||
int32_t result = gtk_dialog_run (GTK_DIALOG (myDialog));
|
||||
GtkWidget *myDialog = gtk_about_dialog_new();
|
||||
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(myDialog), "Edn");
|
||||
gtk_about_dialog_set_version( GTK_ABOUT_DIALOG(myDialog), VERSION_TAG_NAME);
|
||||
gtk_about_dialog_set_comments( GTK_ABOUT_DIALOG(myDialog), "Editeur De N'ours\n"
|
||||
"L'Editeur Desoxyribo-Nucleique.\n"
|
||||
"Source Code Editor\n"
|
||||
"Build Time : " VERSION_BUILD_TIME);
|
||||
gtk_about_dialog_set_copyright( GTK_ABOUT_DIALOG(myDialog), "Copyright 2010 Edouard DUPIN, all right reserved");
|
||||
gtk_about_dialog_set_license( GTK_ABOUT_DIALOG(myDialog), "This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY\n\n"
|
||||
"You can:\n"
|
||||
" * Redistribute the sources code and binaries.\n"
|
||||
" * Modify the Sources code.\n"
|
||||
" * Use a part of the sources (less than 50%) in an other software, just write somewhere \"Edn is great\" visible by the user (on your product or on your website with a link to my page).\n"
|
||||
" * Redistribute the modification only if you want.\n"
|
||||
" * Send me the bug-fix (it could be great).\n"
|
||||
" * Pay me a beer or some other things.\n"
|
||||
" * Print the source code on WC paper ...\n\n"
|
||||
"You can NOT:\n"
|
||||
" * Earn money with this Software (But I can).\n"
|
||||
" * Add malware in the Sources.\n"
|
||||
" * Do something bad with the sources.\n"
|
||||
" * Use it to travel in the space with a toaster.\n\n"
|
||||
"I reserve the right to change this licence. If it change the version of the copy you have keep its own license.");
|
||||
gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(myDialog), true);
|
||||
# if USE_GTK_VERSION_3_0
|
||||
gtk_about_dialog_set_license_type(GTK_ABOUT_DIALOG(myDialog), GTK_LICENSE_CUSTOM);
|
||||
# endif
|
||||
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(myDialog), "http://HeeroYui.github.com/edn");
|
||||
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(myDialog), "Edn on github");
|
||||
const char * listAutor[] = {"Edouard DUPIN", NULL};
|
||||
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(myDialog), listAutor);
|
||||
// Display About
|
||||
gtk_dialog_run(GTK_DIALOG(myDialog));
|
||||
gtk_widget_destroy(myDialog);
|
||||
switch (result)
|
||||
{
|
||||
case GTK_RESPONSE_NO:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EDN_MSG__GUI_SHOW_GOTO_LINE:
|
||||
|
@@ -61,17 +61,10 @@ static cairo_font_face_t * m_cairoFont[2][2] = {{NULL, NULL},{ NULL, NULL}};
|
||||
static cairo_font_face_t * m_cairoFont[2][2] = {{NULL, NULL},{ NULL, NULL}};
|
||||
void Display::Init(void)
|
||||
{
|
||||
/*
|
||||
charWidth = gdk_char_width(myFont[FONT_ITALIC_YES][FONT_BOLD_NO], 'Z');
|
||||
EDN_INFO("Font Width = %d", charWidth);
|
||||
charHeignt = gdk_char_height(myFont[FONT_ITALIC_YES][FONT_BOLD_NO], 'Z');
|
||||
EDN_INFO("Font Height = %d", charHeignt);
|
||||
*/
|
||||
|
||||
m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
|
||||
m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
|
||||
m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
|
||||
m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
|
||||
if ( NULL == m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]) {
|
||||
EDN_ASSERT(FALSE, "basic font ERROR");
|
||||
}
|
||||
@@ -96,10 +89,10 @@ void Display::Init(void)
|
||||
void Display::UnInit(void)
|
||||
{
|
||||
// clean the builder...
|
||||
free(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]);
|
||||
free(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO]);
|
||||
free(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES]);
|
||||
free(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES]);
|
||||
cairo_font_face_destroy(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]);
|
||||
cairo_font_face_destroy(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO]);
|
||||
cairo_font_face_destroy(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES]);
|
||||
cairo_font_face_destroy(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES]);
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +282,7 @@ void DrawerManager::SpaceText(color_ts & SelectColor, int32_t x, int32_t y,int32
|
||||
void DrawerManager::Flush(void)
|
||||
{
|
||||
if (true == m_haveWork) {
|
||||
//EDN_WARNING("flush : \"" << m_dataToDisplay << "\"");
|
||||
//EDN_WARNING("flush : \"" << m_dataToDisplay << "\"" << " bold=" << m_selectColor->GetBold() << " italic=" << m_selectColor->GetItalic());
|
||||
m_haveWork = false;
|
||||
|
||||
cairo_set_font_face(m_cairo, Display::GetFont(m_selectColor->GetBold(), m_selectColor->GetItalic()));
|
||||
|
@@ -593,18 +593,18 @@ void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &mov
|
||||
# elif USE_GTK_VERSION_2_0
|
||||
case GDK_KP_Tab:
|
||||
# endif
|
||||
// shift + TAB ... same as a tab here ...
|
||||
case 0xfe20: //GDK_ISO_Left_Tab
|
||||
case 65289:
|
||||
key = (int32_t)'\t';
|
||||
break;
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_KP_Enter:
|
||||
key = GDK_KEY_Return;
|
||||
break;
|
||||
# elif USE_GTK_VERSION_2_0
|
||||
case GDK_KP_Enter:
|
||||
key = GDK_Return;
|
||||
break;
|
||||
# endif
|
||||
key = '\n';
|
||||
break;
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_KP_F1:
|
||||
case GDK_KEY_F1:
|
||||
@@ -1038,17 +1038,129 @@ void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &mov
|
||||
# endif
|
||||
key = 0x08;
|
||||
break;
|
||||
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_dead_grave:
|
||||
case GDK_KEY_dead_acute:
|
||||
case GDK_KEY_dead_circumflex:
|
||||
case GDK_KEY_dead_tilde:
|
||||
case GDK_KEY_dead_macron:
|
||||
case GDK_KEY_dead_breve:
|
||||
case GDK_KEY_dead_abovedot:
|
||||
case GDK_KEY_dead_diaeresis:
|
||||
case GDK_KEY_dead_abovering:
|
||||
case GDK_KEY_dead_doubleacute:
|
||||
case GDK_KEY_dead_caron:
|
||||
case GDK_KEY_dead_cedilla:
|
||||
case GDK_KEY_dead_ogonek:
|
||||
case GDK_KEY_dead_iota:
|
||||
case GDK_KEY_dead_voiced_sound:
|
||||
case GDK_KEY_dead_semivoiced_sound:
|
||||
case GDK_KEY_dead_belowdot:
|
||||
case GDK_KEY_dead_hook:
|
||||
case GDK_KEY_dead_horn:
|
||||
case GDK_KEY_dead_stroke:
|
||||
case GDK_KEY_dead_abovecomma:
|
||||
case GDK_KEY_dead_abovereversedcomma:
|
||||
case GDK_KEY_dead_doublegrave:
|
||||
case GDK_KEY_dead_belowring:
|
||||
case GDK_KEY_dead_belowmacron:
|
||||
case GDK_KEY_dead_belowcircumflex:
|
||||
case GDK_KEY_dead_belowtilde:
|
||||
case GDK_KEY_dead_belowbreve:
|
||||
case GDK_KEY_dead_belowdiaeresis:
|
||||
case GDK_KEY_dead_invertedbreve:
|
||||
case GDK_KEY_dead_belowcomma:
|
||||
case GDK_KEY_dead_currency:
|
||||
case GDK_KEY_dead_a:
|
||||
case GDK_KEY_dead_A:
|
||||
case GDK_KEY_dead_e:
|
||||
case GDK_KEY_dead_E:
|
||||
case GDK_KEY_dead_i:
|
||||
case GDK_KEY_dead_I:
|
||||
case GDK_KEY_dead_o:
|
||||
case GDK_KEY_dead_O:
|
||||
case GDK_KEY_dead_u:
|
||||
case GDK_KEY_dead_U:
|
||||
case GDK_KEY_dead_small_schwa:
|
||||
case GDK_KEY_dead_capital_schwa:
|
||||
# elif USE_GTK_VERSION_2_0
|
||||
case GDK_dead_grave:
|
||||
case GDK_dead_acute:
|
||||
case GDK_dead_circumflex:
|
||||
key = '^';
|
||||
break;
|
||||
case GDK_dead_tilde:
|
||||
case GDK_dead_macron:
|
||||
case GDK_dead_breve:
|
||||
case GDK_dead_abovedot:
|
||||
case GDK_dead_diaeresis:
|
||||
case GDK_dead_abovering:
|
||||
case GDK_dead_doubleacute:
|
||||
case GDK_dead_caron:
|
||||
case GDK_dead_cedilla:
|
||||
case GDK_dead_ogonek:
|
||||
case GDK_dead_iota:
|
||||
case GDK_dead_voiced_sound:
|
||||
case GDK_dead_semivoiced_sound:
|
||||
case GDK_dead_belowdot:
|
||||
case GDK_dead_hook:
|
||||
case GDK_dead_horn:
|
||||
case GDK_dead_stroke:
|
||||
case GDK_dead_abovecomma:
|
||||
case GDK_dead_abovereversedcomma:
|
||||
case GDK_dead_doublegrave:
|
||||
case GDK_dead_belowring:
|
||||
case GDK_dead_belowmacron:
|
||||
case GDK_dead_belowcircumflex:
|
||||
case GDK_dead_belowtilde:
|
||||
case GDK_dead_belowbreve:
|
||||
case GDK_dead_belowdiaeresis:
|
||||
case GDK_dead_invertedbreve:
|
||||
case GDK_dead_belowcomma:
|
||||
case GDK_dead_currency:
|
||||
key = '?';
|
||||
break;
|
||||
case GDK_dead_a:
|
||||
EDN_INFO("dead a");
|
||||
//key = 'a';
|
||||
break;
|
||||
case GDK_dead_A:
|
||||
case GDK_dead_e:
|
||||
case GDK_dead_E:
|
||||
case GDK_dead_i:
|
||||
case GDK_dead_I:
|
||||
case GDK_dead_o:
|
||||
case GDK_dead_O:
|
||||
case GDK_dead_u:
|
||||
case GDK_dead_U:
|
||||
case GDK_dead_small_schwa:
|
||||
case GDK_dead_capital_schwa:
|
||||
# endif
|
||||
key = '?';
|
||||
break;
|
||||
# ifdef USE_GTK_VERSION_3_0
|
||||
case GDK_KEY_Caps_Lock:
|
||||
# elif USE_GTK_VERSION_2_0
|
||||
case GDK_Caps_Lock:
|
||||
# endif
|
||||
controlKey = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Transform in unicode the input :
|
||||
//EDN_INFO("key : " << key);
|
||||
int32_t unichar = gdk_keyval_to_unicode(key);
|
||||
//EDN_INFO("unichar : " << unichar);
|
||||
if (unichar == 0) {
|
||||
Utf8Out[0] = (char)key;
|
||||
Utf8Out[1] = '\0';
|
||||
//EDN_INFO("NON UTF8 : " << Utf8Out);
|
||||
} else {
|
||||
// Generate UTF8 form UniCode
|
||||
convertUnicodeToUtf8(unichar, Utf8Out);
|
||||
//EDN_INFO("UTF8 : " << Utf8Out);
|
||||
#if 0
|
||||
printf(" convertUnicodeToUtf8 : \"0x%08x\" ==> unichar=%d %s\n", key, unichar, Utf8Out);
|
||||
for (int32_t uu=0; uu < strlen(Utf8Out); uu++) {
|
||||
|
193
avancement.boo
193
avancement.boo
@@ -1,131 +1,70 @@
|
||||
# For the first realease 1.0 :
|
||||
* Syst<73>mes :
|
||||
- Affichage ligne par ligne
|
||||
- Correction du bug de hl(sub patern empty)
|
||||
- Verifier si le hldisplay reaserch marche avec l'id et pas l'id-1
|
||||
- Gestion correct des charsets
|
||||
* Gui :
|
||||
- Confirmer avant de fermer
|
||||
- Demander de sauver
|
||||
- Controle des droits
|
||||
- Hl-gui management
|
||||
- Event quand un fichier ouvert a changer
|
||||
- Affichage des fichiers binaires
|
||||
- Ctags phase 1
|
||||
- Project manager phase 1
|
||||
|
||||
# action a faire (ordonner par r<>vision) :
|
||||
* 0.2.X :
|
||||
- gui : Amelioration du full-screen et du display de base (sans l'entete de la fenetre)
|
||||
- gui : Mise en place d'un display ligne par ligne
|
||||
- gui : ascenceur quand n<>cessaire
|
||||
- gui : Demander la cr<63>ation de nouveaux fichier quand il n'existe pas (a l'ouverture en ligne de commande)
|
||||
- sys : Mise en place des colorisation de base pour le
|
||||
* java script
|
||||
* SQL
|
||||
- Catch Shift+TAB
|
||||
- Correction du bug des entr<74> bizard tel que les chapot et les guillemets
|
||||
- pb de s<>lection quand la ligne est pleine et la premi<6D>re ligne s<>ctionn<6E>e.
|
||||
- PB de copier coller sur les <20><><EFBFBD> ...
|
||||
- PB sur le caplock et les caract<63>re multiples type chapot ...
|
||||
- PB du entrer sur le kaypad qui fait un <CR> ==> ajouter la fonction shift+enter qui cree un <CR>
|
||||
- catch F[1-12] ==> for user function
|
||||
* 0.3.X :
|
||||
- Charset UTF-8 et iso 8859-15 correcte
|
||||
- Transformation de charset a la vol<6F>e
|
||||
- Charset par defaut
|
||||
- D<EFBFBD>tection de charset (<28> mettre dans les todo de charset)
|
||||
==> regarder les librairies open sources
|
||||
* 0.4.X :
|
||||
- SEARCH : get selected text in the search windows
|
||||
- SEARCH : Select the search windows when call crtl+F
|
||||
- gui : ordonner les fichier ouvert par nom ...
|
||||
* 0.5.X :
|
||||
- project : list of current files open
|
||||
- gui : Parameters : et en autre la taille de la police ... et voir pour la r<>cup<75>rer sur le system... et ce serait cool...
|
||||
- sys : replace ALL
|
||||
|
||||
# Text Editor
|
||||
|
||||
- 90% Indent group with Tabulation and shift+tabulation
|
||||
- 100% Basic smart indent : Recopy the start of the previous line when return (copy '\t' and ' ')
|
||||
- 0% Replace Tab with space when press the key
|
||||
- 0% Request save user when quit the software
|
||||
- 0% Hide/Display scroll element when not usefull
|
||||
- 10% Regular expression search
|
||||
- 80% Colorisation syntaxique
|
||||
- 80% Copier / coller ==> probleme sur les caract<63>res sp<73>ciaux comme <20> <20> <20> ...
|
||||
- 10% Search
|
||||
- 10% Replace
|
||||
- 80% Undo / Redo ajout de caract<63>res autre que " ", "\t" et "\n"
|
||||
- 0% Selectionner en colone
|
||||
- 0% Supression multiple de ligne par la commande ctrl+D
|
||||
- 0% Multi-file search ==> display it in a result buffer (clickable only)
|
||||
- 0% basic UTF8 string management ==> bad with the curent buffer
|
||||
- 0% Replace in all elements of the project file or a part
|
||||
- 0% Multiple Text Editor in the same Time
|
||||
- 0% Support des Macros ==> In python ??? or other ...
|
||||
|
||||
# Ctags :
|
||||
- 100% Parse (use the ctags parser)
|
||||
- 100% Find
|
||||
- 50% Jump
|
||||
- 10% History of move (with display)
|
||||
|
||||
# Buffer Viewer :
|
||||
- 100% Right menu
|
||||
- 100% Display buffer in color
|
||||
- 100% Display buffer Saved / not Saved
|
||||
- 0% Image of the type of buffer (optionnal)
|
||||
|
||||
# Configuration :
|
||||
- 0% Creer une IHM pour les configurations de base
|
||||
- 0% Creer une IHM pour l'edition du hightliner syntaxique (quand il marchera...)
|
||||
- 0% Creer une IHM pour les couleurs (voir la lier avec l'IHM pour le hightliner)
|
||||
- 0% saugegarde automatique de la configuration ou sur demande...
|
||||
|
||||
# Project manager :
|
||||
- 0% Faire un editeur des dossiers du projet a ouvrir ==> automatiquement ajouter dans les Ctags
|
||||
- 0% Base
|
||||
- 0% Save All
|
||||
- 0% TreeView
|
||||
|
||||
# Tree View :
|
||||
- 0% View
|
||||
- 0% Open File
|
||||
- 0% Jump to the curent File
|
||||
- 0% Hide CVS / Git / SVN elements
|
||||
|
||||
# Diff :
|
||||
- 0% generate a Diff between files
|
||||
- 0% same in binary
|
||||
|
||||
# Git :
|
||||
- 0% Diff with the current wersion commited (local)
|
||||
- 0% Git branch local display (as gitk --all) ...
|
||||
- 0% view git chawan history ... (git Log)
|
||||
|
||||
# CVS :
|
||||
- 0% check the version with CVS
|
||||
- 0% commit
|
||||
- 0% display the Branch
|
||||
- 0% Select a new repository ...
|
||||
|
||||
# Publication :
|
||||
- 0% faire une publication du logiciel sur le Web... (need a stable version)
|
||||
- 0% faire un package
|
||||
|
||||
# Repository :
|
||||
- 0% create my own repository (@home)
|
||||
- 0% manage right with Git
|
||||
- 0% create a website fot it (@home)
|
||||
- 0% reserve edn.org
|
||||
|
||||
# plugin : (never i think ...)
|
||||
- 0% Comprendre comment faire un system avec des plugin (interne et simple)...
|
||||
- 0% En c++ compiler seulement, pas d'interface pyton ou autre c'est trop moche.
|
||||
|
||||
* 0.2.X :
|
||||
- gui : Amelioration du full-screen et du display de base (sans l'entete de la fenetre)
|
||||
- gui : Mise en place d'un display ligne par ligne
|
||||
- gui : ascenceur quand n<>cessaire
|
||||
- gui : Demander la cr<63>ation de nouveaux fichier quand il n'existe pas (a l'ouverture en ligne de commande)
|
||||
- sys : Mise en place des colorisation de base pour le
|
||||
* java script
|
||||
* SQL
|
||||
- sys : replace TAB with space when Tab is pressed
|
||||
- sys : Catch F[1-12] ==> for user personal event
|
||||
- BUG : Correction du bug des entr<74> bizard tel que les chapot et les guillemets
|
||||
- BUG : de s<>lection quand la ligne est pleine et la premi<6D>re ligne s<>ctionn<6E>e. ==> regarder apr<70>s avoir fait le display ligne par ligne...
|
||||
- BUG : de copier coller sur les <20><><EFBFBD> ...
|
||||
- BUG : les caract<63>re multiples type chapot ...
|
||||
- BUG : italique non g<>n<EFBFBD>r<EFBFBD>
|
||||
* 0.3.X :
|
||||
- SEARCH : get selected text in the search windows
|
||||
- SEARCH : Select the search windows when call crtl+F
|
||||
- sys : personal property file in the ~/.edn ou ~/.gnome/edn
|
||||
- gui : Ordonner les fichier ouvert par nom ...
|
||||
- gui : parameter gui : et en autre la taille de la police ... et voir pour la r<>cup<75>rer sur le system... et ce serait cool...
|
||||
- gui : Color list selection
|
||||
- gui : Hightlight gui management
|
||||
* 0.4.X :
|
||||
- sys : Charset UTF-8 et iso 8859-15 correcte
|
||||
- sys : Transformation de charset a la vol<6F>e
|
||||
- sys : Charset par defaut
|
||||
- Sys : D<>tection de charset (<28> mettre dans les todo de charset)
|
||||
==> regarder les librairies open sources
|
||||
* 0.5.X :
|
||||
- prj : list of current files open
|
||||
- prj : open ctags file
|
||||
- sys : replace ALL
|
||||
- sys : Undo / Redo ajout de caract<63>res autre que " ", "\t" et "\n"
|
||||
* 0.6.X :
|
||||
- sys : right management ...
|
||||
- HL : Normalyse all the system of regular expression with <> chapot ...
|
||||
- HL : sub parsing of the reg exp
|
||||
- sys : update all language
|
||||
* 0.7.X :
|
||||
- sys : Select in colones
|
||||
- sys : Select all the same search in the current buffer ... ( HL en vert ou jaune ...)
|
||||
- sys : Multi-file search ==> display it in a result buffer (clickable only)
|
||||
* 0.9.X :
|
||||
- int : Redo all the doxygen ...
|
||||
* 1.0.X :
|
||||
- gui : open file in binary
|
||||
- sys : compare binary files
|
||||
- sys : compare normal files
|
||||
* 1.1.X :
|
||||
- gui : Display content of a folder
|
||||
- gui : add a treeview display
|
||||
- sys : evenement losqu'un fichier est modifier a l'exterieur...
|
||||
- sys : image du type de fichier dans le buffer list view
|
||||
* 1.2.X :
|
||||
- PRJ : treeview des dossier a ouvrir
|
||||
- PRJ : GUI de management
|
||||
- PRJ : Save all in project
|
||||
- SYS : Save all modify files
|
||||
* 1.3.X :
|
||||
- sys : version system management (git, cvs, ...)
|
||||
* 1.4.X :
|
||||
- SYS : Macro generation and acquisition
|
||||
* 1.5.X :
|
||||
- GDB : Acces interne pour un debuggeur ==> comme cgdb ... avec l'acces assembleur en plus
|
||||
|
||||
# note utiles :
|
||||
http://majutsushi.github.com/tagbar/ ==> je devrais regarder ca pour savoir ce que je peux faire avec du ctags
|
||||
CTags : Set the parsing methode : "ctags -R --fields=+n Sources/"
|
||||
CTags : Set the parsing methode : "ctags -R --fields=+n Sources/ /usr/include/gtk-3.0/"
|
||||
|
@@ -39,7 +39,7 @@
|
||||
</rule>
|
||||
<rule name="my comment">
|
||||
<color>comment</color>
|
||||
<start>//</start>
|
||||
<start>(//|@)</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@for|done|do|while|in|if|then|else|fi\@</start>
|
||||
<start>\@for|done|do|while|in|if|elif|then|else|fi\@</start>
|
||||
</rule>
|
||||
<rule name="my Variable">
|
||||
<color>keyword</color>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
</rule>
|
||||
<rule name="global inclusion">
|
||||
<color>preprocesseur</color>
|
||||
<start>global </start>
|
||||
<start>global( |\t)+</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
|
Reference in New Issue
Block a user