summaryrefslogtreecommitdiff
path: root/ldmicro/ldmicro.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldmicro/ldmicro.cpp')
-rw-r--r--ldmicro/ldmicro.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp
index fbf2b3d..e0bf5f3 100644
--- a/ldmicro/ldmicro.cpp
+++ b/ldmicro/ldmicro.cpp
@@ -42,6 +42,7 @@ QIcon* MWIcon;
QMenuBar* MainMenu;
QGroupBox* CursorObject;
HWID DrawWindow;
+WM_SCROLL scrollbar;
// parameters used to capture the mouse when implementing our totally non-
// general splitter control
//static HHOOK MouseHookHandle;
@@ -70,9 +71,6 @@ char CurrentCompileFile[MAX_PATH];
// project file.
PlcProgram Prog;
-/// Function to safely quit program gtk main loop
-gboolean LD_WM_Close_call(GtkWidget *widget, GdkEvent *event, gpointer user_data);
-
//-----------------------------------------------------------------------------
// Get a filename with a common dialog box and then save the program to that
// file and then set our default filename to that.
@@ -358,6 +356,7 @@ static void ProcessMenu(int code)
case MNU_NEW:
if(CheckSaveUserCancels()) break;
NewProgram();
+ DrawWindow->resize(scrollbar->size());
strcpy(CurrentSaveFile, "");
strcpy(CurrentCompileFile, "");
GenerateIoListDontLoseSelection();
@@ -366,6 +365,7 @@ static void ProcessMenu(int code)
break;
case MNU_OPEN:
+ DrawWindow->resize(scrollbar->size());
if(CheckSaveUserCancels()) break;
OpenDialog();
break;
@@ -704,12 +704,22 @@ void PaintWidget::keyPressEvent(QKeyEvent* event)
return;
}
+void MyWidget::resizeEvent(QResizeEvent *event)
+{
+ DrawWindow->resize(scrollbar->size());
+}
+
void MyWidget::closeEvent(QCloseEvent* event)
{
if(CheckSaveUserCancels())
event->ignore();
else
+ {
event->accept();
+ FreezeWindowPos(MainWindow);
+ IoListHeight = IoList->height();
+ FreezeDWORD(IoListHeight);
+ }
/*GdkRectangle allocation;
gtk_widget_get_allocation(GTK_WIDGET(view), &allocation);