Changeset 157

Show
Ignore:
Timestamp:
03/08/07 20:28:40 (2 years ago)
Author:
tulloss2
Message:

updated GTK stuff a bit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/client/linux-settop-gui/linux-settop-gui.csproj

    r109 r157  
    4040  --> 
    4141  <ItemGroup> 
     42    <Compile Include="Graphics.cs" /> 
    4243    <Compile Include="topwindow.cs" /> 
    4344  </ItemGroup> 
     
    4849    <Reference Include="gtk-dotnet, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> 
    4950    <Reference Include="gtk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> 
     51    <Reference Include="Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL"> 
     52      <SpecificVersion>False</SpecificVersion> 
     53      <HintPath>..\..\libraries\Mono.Cairo.dll</HintPath> 
     54    </Reference> 
    5055    <Reference Include="System" /> 
    5156    <Reference Include="System.Data" /> 
  • dmp/trunk/client/linux-settop-gui/topwindow.cs

    r109 r157  
    2525        ToolButton playButton; 
    2626 
     27                //Create backgrounds 
     28                DrawingArea topBG = new DrawingArea(); 
     29 
    2730        //Initialize all our etc. containers 
    2831        Toolbar controlButtons = new Toolbar(); 
     
    3033        VBox playerV = new VBox(false, 6); 
    3134        Layout mainLayout = new Layout(null, null); 
    32         Layout topLayout = new Layout(null, null); 
     35               Layout topLayout = new Layout(null, null); 
    3336 
    3437        //Initialize containers for song info area 
     
    4952        { 
    5053            Application.Init(); 
    51  
    52             resFile. 
    5354 
    5455            newWin = new Window("Rubicon Music Player"); 
     
    9495            topLayout.Put(controlButtons, 0, 0); 
    9596            topLayout.Put(songInfo, winWidth / 2, 30); 
     97                        topLayout.Put(topBG, 0, 0); 
     98                        topBG.ExposeEvent += new ExposeEventHandler(topBG_ExposeEvent); 
    9699 
    97100            playerH.SetSizeRequest(winWidth, winHeight - TOPFRAME_HEIGHT); 
     
    146149        } 
    147150 
     151                void topBG_ExposeEvent(object o, ExposeEventArgs args) 
     152                { 
     153                        Cairo.Context g = Gdk.Context.CreateDrawable(topBG.GdkWindow); 
     154                        Cairo.PointD p1, p2, p3, p4; 
     155                        p1 = new Cairo.PointD(10, 10); 
     156                        p2 = new Cairo.PointD(100, 10); 
     157                        p3 = new Cairo.PointD(100, 100); 
     158                        p4 = new Cairo.PointD(10, 100); 
     159 
     160                        // g is a Graphics object                
     161                        g.MoveTo(p1); 
     162                        g.LineTo(p2); 
     163                        g.LineTo(p3); 
     164                        g.LineTo(p4); 
     165                        g.LineTo(p1); 
     166                        g.ClosePath(); 
     167 
     168                        g.Color = new Cairo.Color(0, 0, 0); 
     169                        g.FillPreserve(); 
     170                        g.Color = new Cairo.Color(1, 0, 0); 
     171                        g.Stroke(); 
     172                } 
     173 
    148174        void songInfo_Realized(object o, EventArgs events) 
    149175        { 
    150176            //Fixed songInfo = (Fixed)o; 
    151  
     177                        /* 
    152178            Gdk.Pixbuf playBuf = new Gdk.Pixbuf("./icons/media-playback-start.png"); 
    153179            Gdk.Pixmap playMap, playMask; 
     
    157183            songInfo.AppPaintable = true; 
    158184            songInfo.Style.SetBgPixmap(StateType.Normal, playMap); 
     185                         * */ 
    159186        } 
    160187