#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <array.au3>
#include <WindowsConstants.au3>
#include 'GUICtrlRibbon.au3'

$hGui = GUICreate ( "test", 800, 500, -1, -1)
;~ GUISetBkColor( 0x99B9E3 );Gui HG Blau
;~ GUISetBkColor( 0x4C4C4C );Gui HG Schwarz
 GUISetBkColor( 0xC9CCD5 );Gui HG

$hBar = _GUICtrlRibbon_Create( $hGui);, 'silver')

;------------------------------------------------------------------------------------------------------ BEGIN TAB Start
$hTab_Start = _GUICtrlRibbon_CreateTab( $hBar, 'Start' )
$hTab_Start_Left = _GUICtrlRibbon_GetLeftClkCtrlHandle($hTab_Start)
$hBar_Context = _GUICtrlRibbon_CreateContextMenu($hTab_Start)
$hBar_Minimize = GUICtrlCreateMenuItem("Minimize The Ribbon",$hBar_Context)
$hBar_Maximize = GUICtrlCreateMenuItem("Maximize The Ribbon",$hBar_Context)

$hItem_Zwischenablage = _GUICtrlRibbon_CreateTabItem ( $hTab_Start, 'Zwischenablage' , 163 )
$hGrandButton_Einfuegen = _GUICtrlRibbon_CreateGrandButton($hItem_Zwischenablage,'',467,'Einfügen',52, True )
$hEinfuegen_Context = _GUICtrlRibbon_CreateContextMenu($hGrandButton_Einfuegen)
$OptionsEinfuegen = GUICtrlCreateMenuItem("Einfügen", $hEinfuegen_Context)
$OptionsInhaltEinfuegen = GUICtrlCreateMenuItem("Inhalte Einfügen", $hEinfuegen_Context)
$OptionsHypEinfuegen = GUICtrlCreateMenuItem("Als Hyperlink einfügen", $hEinfuegen_Context)
$hSmallButton_Ausschneiden = _GUICtrlRibbon_CreateSmallButton($hItem_Zwischenablage,'',176,1,'Ausschneiden',100)
$hSmallButton_Kopieren = _GUICtrlRibbon_CreateSmallButton($hItem_Zwischenablage,'',232,2,'Kopieren',100)
$hSmallButton_Uebertragen = _GUICtrlRibbon_CreateSmallButton($hItem_Zwischenablage,'',1375,3,'Übertragen',100)

$hItem_Schriftart = _GUICtrlRibbon_CreateTabItem ( $hTab_Start, 'Schriftart' , 80 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',694,1 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1697,2 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1727,3 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1504,1 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1600,2 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1487,3 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',724,1 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',1719,2 )
_GUICtrlRibbon_CreateSmallButton($hItem_Schriftart,'',166,3 )

$hItem_Absatz = _GUICtrlRibbon_CreateTabItem ( $hTab_Start, 'Formatvorlagen' , 187 )
$hGrandButton_Formatvorlage = _GUICtrlRibbon_CreateGrandButton($hItem_Absatz,'',240,'Formatvorlage ändern',75 )
_GUICtrlRibbon_CreateSmallButton($hItem_Absatz,'',1783,1 ,'Standart',100)
_GUICtrlRibbon_CreateSmallButton($hItem_Absatz,'',5,2 ,'kein Leerraum',100)
_GUICtrlRibbon_CreateSmallButton($hItem_Absatz,'',203,3 ,'Überschrift',100)

$hItem_Bearbeiten = _GUICtrlRibbon_CreateTabItem ( $hTab_Start, 'Bearbeiten' , 89 )
_GUICtrlRibbon_CreateSmallButton($hItem_Bearbeiten,'' ,1339,1 ,'Suchen',78 )
_GUICtrlRibbon_CreateSmallButton($hItem_Bearbeiten,'' ,212,2 ,'Ersetzen',78 )
_GUICtrlRibbon_CreateSmallButton($hItem_Bearbeiten,'' ,1440,3 ,'Markieren',78 )
;------------------------------------------------------------------------------------------------------ END TAB Start

;------------------------------------------------------------------------------------------------------ BEGIN TAB Einfügen
$hTab_Einfuegen = _GUICtrlRibbon_CreateTab( $hBar, 'Einfügen' )
$hTab_Einfuegen_Left = _GUICtrlRibbon_GetLeftClkCtrlHandle($hTab_Einfuegen)

$hItem_Seiten = _GUICtrlRibbon_CreateTabItem ( $hTab_Einfuegen, 'Seiten' , 197 )
$hGrandButton_Deckblatt = _GUICtrlRibbon_CreateGrandButton($hItem_Seiten,'',371,'Deckblatt','',True)
$hContextDeckblatt = _GUICtrlRibbon_CreateContextMenu($hGrandButton_Deckblatt)
GUICtrlCreateMenuItem("Test1", $hContextDeckblatt)
GUICtrlCreateMenuItem("Test2", $hContextDeckblatt)
GUICtrlCreateMenuItem("Test3", $hContextDeckblatt)

_GUICtrlRibbon_CreateGrandButton($hItem_Seiten,'',412,'Leere Seite' )
_GUICtrlRibbon_CreateGrandButton($hItem_Seiten,'',462,'Seitenumbruch',80)

$hItem_Tabellen = _GUICtrlRibbon_CreateTabItem ( $hTab_Einfuegen, 'Tabellen' , 65 )
_GUICtrlRibbon_CreateGrandButton($hItem_Tabellen,'',611,'Tabelle','',True)

$hItem_Illustrationen = _GUICtrlRibbon_CreateTabItem ( $hTab_Einfuegen, 'Illustrationen' , 273 )
_GUICtrlRibbon_CreateGrandButton($hItem_Illustrationen,'',358,'Grafik' )
_GUICtrlRibbon_CreateGrandButton($hItem_Illustrationen,'',137,'Clipart' )
_GUICtrlRibbon_CreateGrandButton($hItem_Illustrationen,'',78,'Formen','',True )
_GUICtrlRibbon_CreateGrandButton($hItem_Illustrationen,'',312,'Smartart' )
_GUICtrlRibbon_CreateGrandButton($hItem_Illustrationen,'',473,'Diagramm' )

$hItem_Hyperlinks = _GUICtrlRibbon_CreateTabItem ( $hTab_Einfuegen, 'Hyperlinks' , 186 )
_GUICtrlRibbon_CreateGrandButton($hItem_Hyperlinks,'',700,'Hyperlink' )
_GUICtrlRibbon_CreateGrandButton($hItem_Hyperlinks,'',264,'Textmarke' )
_GUICtrlRibbon_CreateGrandButton($hItem_Hyperlinks,'',169,'Querverweis',70 )
;------------------------------------------------------------------------------------------------------ END TAB Einfügen

;------------------------------------------------------------------------------------------------------ BEGIN TAB Seitenlayout
$hTab_Seitenlayout = _GUICtrlRibbon_CreateTab( $hBar, 'Seitenlayout' )
$hTab_Seitenlayout_Left = _GUICtrlRibbon_GetLeftClkCtrlHandle($hTab_Seitenlayout)

$hItem_Designs = _GUICtrlRibbon_CreateTabItem ( $hTab_Seitenlayout, 'Designs' , 150 )
_GUICtrlRibbon_CreateGrandButton($hItem_Designs,'',674,'Designs','',True )
_GUICtrlRibbon_CreateSmallButton($hItem_Designs,'' ,698,1 ,'Farben',87 )
_GUICtrlRibbon_CreateSmallButton($hItem_Designs,'' ,700,2 ,'Schriftarten',87 )
_GUICtrlRibbon_CreateSmallButton($hItem_Designs,'' ,699,3 ,'Effekte',87 )

$hItem_SeiteEinrichten = _GUICtrlRibbon_CreateTabItem ( $hTab_Seitenlayout, 'Seite einrichten' , 337 )
_GUICtrlRibbon_CreateGrandButton($hItem_SeiteEinrichten,'',493,'Seiten -ränder' )
_GUICtrlRibbon_CreateGrandButton($hItem_SeiteEinrichten,'',671,'Orientierung',65 )
_GUICtrlRibbon_CreateGrandButton($hItem_SeiteEinrichten,'',284,'Größe','',True )
_GUICtrlRibbon_CreateGrandButton($hItem_SeiteEinrichten,'',144,'Spalten','',True )
_GUICtrlRibbon_CreateSmallButton($hItem_SeiteEinrichten,'',1755,1 ,'Umbrüche',105)
_GUICtrlRibbon_CreateSmallButton($hItem_SeiteEinrichten,'',1531,2 ,'Zeilennummern',105)
_GUICtrlRibbon_CreateSmallButton($hItem_SeiteEinrichten,'',1472,3 ,'Silbentrennung',105)

$hItem_Seitenhintergrund = _GUICtrlRibbon_CreateTabItem ( $hTab_Seitenlayout, 'Seitenhintergrund' , 226 )
_GUICtrlRibbon_CreateGrandButton($hItem_Seitenhintergrund,'',378,'Wasserzeichen',82,True )
_GUICtrlRibbon_CreateGrandButton($hItem_Seitenhintergrund,'',141,'Seitenfarbe',62,True )
_GUICtrlRibbon_CreateGrandButton($hItem_Seitenhintergrund,'',709,'Seitenränder',67,True )
;------------------------------------------------------------------------------------------------------ END TAB Seitenlayout
GUISetState(@SW_SHOW,$hGui)
_GUICtrlRibbon_RestoreTab($hTab_Start);aktiven Tab setzen

While 1
	Switch _GUICtrlRibbon_GetMsg()
		Case $hTab_Start_Left, $hTab_Einfuegen_Left, $hTab_Seitenlayout_Left
			_GUICtrlRibbon_RestoreContextMenuAtMouse($hBar_Context)
		Case $hBar_Minimize
			_GUICtrlRibbon_MinimizeRibbon($hBar)
		Case $hBar_Maximize
			_GUICtrlRibbon_RestoreRibbon($hBar)
		Case -3
			Exit

		Case $OptionsEinfuegen
			MsgBox ( 0,"","Einfügen" )

		Case $OptionsHypEinfuegen
			MsgBox ( 0,"","Hyperlink Einfügen" )

		Case $OptionsInhaltEinfuegen
			MsgBox ( 0,"","Inhalt Einfügen" )

		Case $hTab_Start
			_GUICtrlRibbon_RestoreTab($hTab_Start)

		Case $hGrandButton_Einfuegen
			_GUICtrlRibbon_RestoreContextMenu($hEinfuegen_Context)

		Case $hTab_Einfuegen
			_GUICtrlRibbon_RestoreTab($hTab_Einfuegen)

		Case $hTab_Seitenlayout
			_GUICtrlRibbon_RestoreTab($hTab_Seitenlayout)

		Case $hSmallButton_Ausschneiden
			MsgBox ( 0,"","Ausschneiden" )

		Case $hSmallButton_Kopieren
			MsgBox ( 0,"","Kopieren" )

		Case $hSmallButton_Uebertragen
			MsgBox ( 0,"","Übertragen" )

		Case $hGrandButton_Formatvorlage
			MsgBox ( 0,"","Formatvorlage ändern" )

		Case $hGrandButton_Deckblatt
			_GUICtrlRibbon_RestoreContextMenu ($hContextDeckblatt)

	EndSwitch
WEnd