Back to index

unity  6.0.0
ResultRenderer.cpp
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright 2011 Canonical Ltd.
00004  *
00005  * This program is free software: you can redistribute it and/or modify it
00006  * under the terms of the GNU Lesser General Public License version 3, as
00007  * published by the  Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranties of
00011  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00012  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00013  * License for more details.
00014  *
00015  * You should have received a copy of both the GNU Lesser General Public
00016  * License version 3 along with this program.  If not, see
00017  * <http://www.gnu.org/licenses/>
00018  *
00019  * Authored by: Gordon Allott <gord.allott@canonical.com>
00020  *
00021  */
00022 
00023 
00024 
00025 #include "ResultRenderer.h"
00026 
00027 namespace unity
00028 {
00029 namespace dash
00030 {
00031 NUX_IMPLEMENT_OBJECT_TYPE(ResultRenderer);
00032 
00033 ResultRenderer::ResultRenderer(NUX_FILE_LINE_DECL)
00034   : InitiallyUnownedObject(NUX_FILE_LINE_PARAM)
00035   , width(50)
00036   , height(50)
00037 {
00038 }
00039 
00040 ResultRenderer::~ResultRenderer()
00041 {
00042 }
00043 
00044 void ResultRenderer::Render(nux::GraphicsEngine& GfxContext,
00045                             Result& row,
00046                             ResultRendererState state,
00047                             nux::Geometry& geometry, int x_offset, int y_offset)
00048 {
00049   nux::GetPainter().PushDrawSliceScaledTextureLayer(GfxContext, geometry, nux::eBUTTON_NORMAL, nux::color::White, nux::eAllCorners);
00050 }
00051 
00052 void ResultRenderer::Preload(Result& row)
00053 {
00054   // pre-load the given row
00055 }
00056 
00057 void ResultRenderer::Unload(Result& row)
00058 {
00059   // unload any resources
00060 }
00061 
00062 
00063 }
00064 }