コード例 #1
0
	void _GuiMacDrawingArea_shellResize (GuiObject widget) {
		iam_drawingarea;
		if (my d_resizeCallback) {
			struct structGuiDrawingAreaResizeEvent event = { me, 0 };
			event. width = widget -> width;
			event. height = widget -> height;
			try {
				my d_resizeCallback (my d_resizeBoss, & event);
			} catch (MelderError) {
				Melder_flushError ("Window resizing not completely handled.");
			}
		}
	}
コード例 #2
0
ファイル: GuiDrawingArea.cpp プロジェクト: READSEARCH/praat
	static gboolean _GuiGtkDrawingArea_resizeCallback (GuiObject widget, GtkAllocation *allocation, gpointer void_me) {
		iam (GuiDrawingArea);
		if (my d_resizeCallback) {
			struct structGuiDrawingArea_ResizeEvent event { me, 0 };
			trace (U"drawingArea resized to ", allocation -> width, U" x ", allocation -> height, U".");
			event. width = allocation -> width;
			event. height = allocation -> height;
			//g_debug("%d %d", allocation->width, allocation->height);
			try {
				my d_resizeCallback (my d_resizeBoss, & event);
			} catch (MelderError) {
				Melder_flushError (U"Window resizing not completely handled.");
			}
			return true;
		}
		return false;
	}