Back to index

unity  6.0.0
QuicklistMenuItemCheckmark.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright (C) 2010 Canonical Ltd
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU 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,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  *
00017  * Authored by: Mirco Müller <mirco.mueller@canonical.com>
00018  * Authored by: Jay Taoko <jay.taoko@canonical.com>
00019  */
00020 
00021 #ifndef QUICKLISTMENUITEMCHECKMARK_H
00022 #define QUICKLISTMENUITEMCHECKMARK_H
00023 
00024 #include <Nux/Nux.h>
00025 #include <Nux/View.h>
00026 #include <NuxGraphics/CairoGraphics.h>
00027 
00028 #include "QuicklistMenuItem.h"
00029 
00030 #include <X11/Xlib.h>
00031 
00032 namespace unity
00033 {
00034 
00035 class QuicklistMenuItemCheckmark : public QuicklistMenuItem
00036 {
00037 public:
00038   QuicklistMenuItemCheckmark(DbusmenuMenuitem* item,
00039                              NUX_FILE_LINE_PROTO);
00040 
00041   QuicklistMenuItemCheckmark(DbusmenuMenuitem* item,
00042                              bool              debug,
00043                              NUX_FILE_LINE_PROTO);
00044 
00045   ~QuicklistMenuItemCheckmark();
00046 
00047 protected:
00048 
00049   void PreLayoutManagement();
00050 
00051   long PostLayoutManagement(long layoutResult);
00052 
00053   void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);
00054 
00055   void DrawContent(nux::GraphicsEngine& gfxContext, bool forceDraw);
00056 
00057   void PostDraw(nux::GraphicsEngine& gfxContext, bool forceDraw);
00058 
00059   virtual const gchar* GetDefaultText();
00060 
00061   virtual void UpdateTexture();
00062   virtual int CairoSurfaceWidth();
00063 };
00064 
00065 } // NAMESPACE
00066 
00067 #endif // QUICKLISTMENUITEMCHECKMARK_H