C++ (Cpp) i_widget Example

Introduction

The c++ (cpp) i_widget example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: C++ (Cpp)

Class/type: i_widget

Example#1
File: i_widget.hppProject: basisbit/neogfx

		bool same_surface(const i_widget& aWidget) const
		{
			if (has_surface() && aWidget.has_surface())
				return &surface() == &aWidget.surface();
			else
				return false;
		}

Example#2

	graphics_context::graphics_context(const i_widget& aWidget) :
		iSurface(aWidget.surface()),
		iNativeGraphicsContext(aWidget.surface().native_surface().create_graphics_context(aWidget)),
		iUnitsContext(*this),
		iDefaultFont(aWidget.font()),
		iOrigin(aWidget.origin()),
		iExtents(aWidget.extents()),
		iDrawingGlyphs(0)
	{
	}